mirror of
https://github.com/edubart/otclient.git
synced 2025-05-06 04:29:20 +02:00

* Started building the market UI. * More work on the market functionality. * Fixes to the market protocol. (Known issue: if I use safeSend method from Market (like so: MarketProtocol.send~) is thinks it is a bot). * Fixes to the market offer class. * Outfit window will no longer display the mount box if you are using protocol < 870. * Added getFeature to playermount module. * Added isMarketable and getMarketData to the lua binding. * Added lua casts for MarketData. * Fixed typo in the module manager. * Added new 'light flat panel' for more variation (can change later) will require some graphics for market. * Added new functions to table lib. * Fixed some styling issues from previous commits.
24 lines
480 B
Lua
24 lines
480 B
Lua
PlayerMount = {}
|
|
|
|
function PlayerMount.init()
|
|
if g_game.getFeature(GamePlayerMount) then
|
|
g_keyboard.bindKeyDown('Ctrl+R', PlayerMount.toggleMount, gameRootPanel)
|
|
end
|
|
end
|
|
|
|
function PlayerMount.terminate()
|
|
if g_game.getFeature(GamePlayerMount) then
|
|
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
|
end
|
|
|
|
PlayerMount = nil
|
|
end
|
|
|
|
function PlayerMount.toggleMount()
|
|
g_game.mount(not g_game.isMounted())
|
|
end
|
|
|
|
function PlayerMount.dismount()
|
|
g_game.mount(false)
|
|
end
|