mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Some fixes to spells/cooldowns.
* Fixed 'progress' bug for spells in the cooldown module. * Fixed a bug with GameForceFirstAutoWalkStep feature. * Moved the spells ID to its SpellInfo row. * Lower cased table functions (consistant).
This commit is contained in:
@@ -75,10 +75,6 @@ function setSpelllistProfile(name)
|
||||
end
|
||||
end
|
||||
|
||||
function getIconImageClip(id)
|
||||
return (((id-1)%12)*SpelllistSettings[SpelllistProfile].iconSize.width) .. ' ' .. ((math.ceil(id/12)-1)*SpelllistSettings[SpelllistProfile].iconSize.height) .. ' ' .. SpelllistSettings[SpelllistProfile].iconSize.width .. ' ' .. SpelllistSettings[SpelllistProfile].iconSize.height
|
||||
end
|
||||
|
||||
function online()
|
||||
if g_game.getFeature(GameSpellList) then
|
||||
spelllistButton:show()
|
||||
@@ -238,7 +234,7 @@ function initialiseSpelllist()
|
||||
tmpLabel:setHeight(SpelllistSettings[SpelllistProfile].iconSize.height + 4)
|
||||
tmpLabel:setTextOffset(topoint((SpelllistSettings[SpelllistProfile].iconSize.width + 10) .. ' ' .. (SpelllistSettings[SpelllistProfile].iconSize.height - 32)/2 + 3))
|
||||
tmpLabel:setImageSource('/images/game/spells/' .. SpelllistSettings[SpelllistProfile].iconFile)
|
||||
tmpLabel:setImageClip(getIconImageClip(iconId))
|
||||
tmpLabel:setImageClip(Spells.getImageClip(iconId, SpelllistProfile))
|
||||
tmpLabel:setImageSize(tosize(SpelllistSettings[SpelllistProfile].iconSize.width .. ' ' .. SpelllistSettings[SpelllistProfile].iconSize.height))
|
||||
tmpLabel.onClick = updateSpellInformation
|
||||
end
|
||||
@@ -416,4 +412,4 @@ function resetWindow()
|
||||
premiumRadioGroup:selectWidget(premiumBoxAny)
|
||||
|
||||
updateSpelllist()
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user