Fixed #165, Fine tune fixes!

* Fixed an issue with the cooldown timing.
* Fixed issue with 'right click' using items under players.
* Some changes to the minimap control (ctrl + mouse wheel to
  change floors and tweaked the zoom/move speeds).
* Fixed some bugs in the trade module.
* Added new Spells table for spell related functions
  (Also added getSpellByName and getSpellByWords).
* Fixed an issue with follow/attack cancelling (wasn't calling
  onFollowChanged for updates in battle, etc).
This commit is contained in:
BeniS
2013-01-07 04:04:49 +13:00
parent 3fa5993177
commit fddbafebd3
8 changed files with 124 additions and 66 deletions

View File

@@ -314,3 +314,21 @@ SpellGroups = {
[3] = 'Support',
[4] = 'Special'
}
Spells = {}
function Spells.getSpellByName(name)
return SpellInfo[name:lower():trim()]
end
function Spells.getSpellByWords(words)
local words = words:lower():trim()
for i,category in pairs(SpellInfo) do
for k,spell in pairs(category) do
if spell.words == words then
return spell
end
end
end
return nil
end