fix warnings and some reloading issues

This commit is contained in:
Eduardo Bart
2012-04-27 01:54:14 -03:00
parent da1baf9673
commit d0b839a4eb
28 changed files with 106 additions and 62 deletions

View File

@@ -81,11 +81,15 @@ function Battle.terminate()
battleButton = nil
battleWindow:destroy()
battleWindow = nil
mouseWidget:destroy()
mouseWidget = nil
disconnect(Creature, { onSkullChange = Battle.checkCreatureSkull,
onEmblemChange = Battle.checkCreatureEmblem } )
disconnect(g_game, { onAttackingCreatureChange = Battle.onAttack } )
Battle = nil
end
function Battle.toggle()

View File

@@ -5,10 +5,13 @@ Module
website: https://github.com/edubart/otclient
icon: battle.png
dependencies:
- game
@onLoad: |
dofile 'battle'
Battle.init()
@onUnload:
@onUnload: |
Battle.terminate()