mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 20:14:54 +02:00
Finalized the mount system and the recently new skills/stats.
* Added mount options to the thing menu. * Reworked the mounting/dismounting. * Fixed up some skill module bugs. * Added alerts to stats like health, mana, capacity, and regeneration time (need to revise this one as it currently has no maximum).
This commit is contained in:
@@ -54,3 +54,26 @@ function Player:hasVip(creatureName)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function Player:isMounted()
|
||||
local outfit = self:getOutfit()
|
||||
return outfit.mount ~= nil and outfit.mount > 0
|
||||
end
|
||||
|
||||
function Player:toggleMount()
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
g_game.mount(not self:isMounted())
|
||||
end
|
||||
end
|
||||
|
||||
function Player:mount()
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
g_game.mount(true)
|
||||
end
|
||||
end
|
||||
|
||||
function Player:dismount()
|
||||
if g_game.getFeature(GamePlayerMounts) then
|
||||
g_game.mount(false)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user