mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user