mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Fixes for last commits
This commit is contained in:
@@ -1,30 +1,15 @@
|
||||
PlayerMount = {}
|
||||
|
||||
-- private variables
|
||||
|
||||
-- private functions
|
||||
|
||||
-- public functions
|
||||
function PlayerMount.init()
|
||||
g_ui.importStyle('playermount.otui')
|
||||
|
||||
connect(g_game, { onDeath = PlayerMount.dismount,
|
||||
onGameEnd = PlayerMount.dismount })
|
||||
|
||||
g_keyboard.bindKeyDown('Ctrl+R', PlayerMount.toggleMount, gameRootPanel)
|
||||
end
|
||||
|
||||
function PlayerMount.terminate()
|
||||
disconnect(g_game, { onDeath = PlayerMount.dismount,
|
||||
onGameEnd = PlayerMount.dismount })
|
||||
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
||||
|
||||
g_keyboard.unbindKeyDown('Ctrl+R', PlayerMount.toggleMount, gameRootPanel)
|
||||
PlayerMount.reset()
|
||||
|
||||
PlayerMount = nil
|
||||
end
|
||||
|
||||
-- hooked events
|
||||
function PlayerMount.toggleMount()
|
||||
if g_game.isMounted() then
|
||||
g_game.mount(false)
|
||||
@@ -35,4 +20,4 @@ end
|
||||
|
||||
function PlayerMount.dismount()
|
||||
g_game.mount(false)
|
||||
end
|
||||
end
|
||||
|
@@ -2,10 +2,7 @@ Module
|
||||
name: game_playermount
|
||||
description: Manage player mounts
|
||||
author: BeniS
|
||||
website: www.otclient.info
|
||||
|
||||
dependencies:
|
||||
- client_entergame
|
||||
website: www.otclient.infox
|
||||
|
||||
@onLoad: |
|
||||
dofile 'playermount'
|
||||
|
Reference in New Issue
Block a user