Editing Module:AbilitiesGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 60: | Line 60: | ||
local ui_data = data[hero_name] | local ui_data = data[hero_name] | ||
if(ui_data == nil) then return "Hero Not Found" end | if(ui_data == nil) then return "Hero Not Found" end | ||
-- Iterate through the hero's abilities to find matching name | -- Iterate through the hero's abilities to find matching name | ||
for ability_num, ability in pairs(ui_data) do | for ability_num, ability in pairs(ui_data) do | ||
local current_name = Lang.get_string(ability.Key) | local current_name = Lang.get_string(ability.Key) | ||
if | if current_name == ability_name then | ||
return ability_num | return ability_num | ||
end | end | ||