915
edits
(Add exception to prevent summoningMaxhit from being seen as a combat stat for Familiars) |
(Add gem link to gem equipment slot) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 112: | Line 112: | ||
if result == nil and ZeroIfNil then result = 0 end | if result == nil and ZeroIfNil then result = 0 end | ||
return result | return result | ||
end | |||
function p.getItemValue(item) | |||
if type(item) == 'string' then | |||
-- Specific check if the item is GP (value of 1) | |||
if Shared.compareString('GP', item, true) | |||
or Shared.compareString('Gold Pieces', item, true) then | |||
return 1 | |||
end | |||
item = p.getItem(item) | |||
end | |||
if item then | |||
return item.sellsFor | |||
end | |||
return nil | |||
end | end | ||
Line 171: | Line 189: | ||
-- the checked stat is summoningMaxhit, the result is ignored. | -- the checked stat is summoningMaxhit, the result is ignored. | ||
function isNonZeroStat(statName, statVal) | function isNonZeroStat(statName, statVal) | ||
if | if statName == 'summoningMaxhit' and (p._canItemUseSlot(item, 'Summon1') or p._canItemUseSlot(item, 'Summon2')) then | ||
return false | return false | ||
end | end | ||
Line 353: | Line 371: | ||
["Passive"] = 'Combat Passive Slot', | ["Passive"] = 'Combat Passive Slot', | ||
["Summon1"] = 'Summoning', | ["Summon1"] = 'Summoning', | ||
["Summon2"] = 'Summoning' | ["Summon2"] = 'Summoning', | ||
["Gem"] = "Gems_(Equipment)" | |||
} | } | ||
local slotText = {} | local slotText = {} |
edits