mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
fix warnings and some reloading issues
This commit is contained in:
@@ -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()
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user