Skip to content

Commit

Permalink
GetItemSlot() bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tianrenli92 committed Nov 12, 2015
1 parent d25ea5a commit 5fd64ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/vscripts/statcollection/lib/utilities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ end
-- String of item name, without the item_ prefix
function GetItemSlot(hero,slot)
local item = hero:GetItemInSlot(slot)
local itemName = ""

if item then
local itemName = string.gsub(item:GetAbilityName(),"item_","") or nil
itemName = string.gsub(item:GetAbilityName(),"item_","")
end

return itemName
Expand Down

0 comments on commit 5fd64ae

Please sign in to comment.