Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. function GetFrameCore(loadout)
  2.     local chassisModules = loadout.modules.chassis;
  3.  
  4.     for _, modInfo in pairs(chassisModules) do --chassis modules include cores and perks, need to find the core module
  5.         local itemTypeId = modInfo.item_sdb_id;
  6.         local itemId = modInfo.item_guid;
  7.  
  8.         local itemInfo = nil;
  9.  
  10.         if (itemId and itemId ~= 0) then
  11.             itemInfo = Player.GetItemInfo(itemId);
  12.         end
  13.  
  14.         if (not itemInfo) then
  15.             itemInfo = Game.GetItemInfoByType(itemTypeId);
  16.         end
  17.         if itemInfo.moduleType == "Battleframe Core" then
  18.             return modInfo.item_guid;
  19.         end
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement