Ascuas Funkeln
Rakkedo Game
- Joined
- Apr 14, 2013
- Messages
- 549
- Solutions
- 32
- Reaction score
- 305
- Location
- Poland
- GitHub
- AscuasFunkeln
Hello, i need thids
And this
Put in one thing... ??
What i mean?
Upgrade work perfect and getTotalArmor work only in "basic".
For example, if Helmet have Armor: 10, then function getTotalArmor return 10, but if we upgrade item and Helmet get now Armor: 11, function getTotalArmor return basic 10 value.
Extra armor from upgrade ofcourse work, but i have no idea where its stored and how to get it and put into getTotalArmor function.
Im not wait for "do it for me", i just need any suggestions, idea, help with solving this.
And this
Lua:
function Player.getTotalArmor(self)
local total = 0
local slots = { CONST_SLOT_HEAD, CONST_SLOT_NECKLACE, CONST_SLOT_ARMOR, CONST_SLOT_LEGS, CONST_SLOT_FEET, CONST_SLOT_RING }
local item
for i = 1, #slots do
item = self:getSlotItem(slots[i])
if item then
total = total + item:getType():getArmor()
end
end
return total
end
What i mean?
Upgrade work perfect and getTotalArmor work only in "basic".
For example, if Helmet have Armor: 10, then function getTotalArmor return 10, but if we upgrade item and Helmet get now Armor: 11, function getTotalArmor return basic 10 value.
Extra armor from upgrade ofcourse work, but i have no idea where its stored and how to get it and put into getTotalArmor function.
Im not wait for "do it for me", i just need any suggestions, idea, help with solving this.