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:
BeniS
2013-01-29 19:26:32 +13:00
parent b7eef97239
commit ec30567d6b
10 changed files with 225 additions and 168 deletions

View File

@@ -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