Fixes to mounting, outfit randomizing, and added creature getSpeed to the lua binding.
This commit is contained in:
parent
f47a947bf3
commit
92e3c2cbd6
|
@ -242,7 +242,7 @@ function Outfit.randomize()
|
||||||
|
|
||||||
for k, section in pairs(outfitTemplate) do
|
for k, section in pairs(outfitTemplate) do
|
||||||
section:setChecked(true)
|
section:setChecked(true)
|
||||||
colorBoxes[math.random(1, #colorBoxes)]:setChecked(true)
|
colorBoxes[math.random(0, #colorBoxes)]:setChecked(true)
|
||||||
section:setChecked(false)
|
section:setChecked(false)
|
||||||
end
|
end
|
||||||
outfitTemplate[1]:setChecked(true)
|
outfitTemplate[1]:setChecked(true)
|
||||||
|
|
|
@ -11,11 +11,7 @@ function PlayerMount.terminate()
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerMount.toggleMount()
|
function PlayerMount.toggleMount()
|
||||||
if g_game.isMounted() then
|
g_game.mount(not g_game.isMounted())
|
||||||
g_game.mount(false)
|
|
||||||
else
|
|
||||||
g_game.mount(true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function PlayerMount.dismount()
|
function PlayerMount.dismount()
|
||||||
|
|
|
@ -1054,7 +1054,9 @@ void Game::mount(bool mount)
|
||||||
{
|
{
|
||||||
if(!canPerformGameAction())
|
if(!canPerformGameAction())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_protocolGame->sendMountStatus(mount);
|
m_protocolGame->sendMountStatus(mount);
|
||||||
|
m_mounted = mount;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Game::checkBotProtection()
|
bool Game::checkBotProtection()
|
||||||
|
|
|
@ -298,6 +298,7 @@ void OTClient::registerLuaFunctions()
|
||||||
g_lua.bindClassMemberFunction<Creature>("getId", &Creature::getId);
|
g_lua.bindClassMemberFunction<Creature>("getId", &Creature::getId);
|
||||||
g_lua.bindClassMemberFunction<Creature>("getName", &Creature::getName);
|
g_lua.bindClassMemberFunction<Creature>("getName", &Creature::getName);
|
||||||
g_lua.bindClassMemberFunction<Creature>("getHealthPercent", &Creature::getHealthPercent);
|
g_lua.bindClassMemberFunction<Creature>("getHealthPercent", &Creature::getHealthPercent);
|
||||||
|
g_lua.bindClassMemberFunction<Creature>("getSpeed", &Creature::getSpeed);
|
||||||
g_lua.bindClassMemberFunction<Creature>("getSkull", &Creature::getSkull);
|
g_lua.bindClassMemberFunction<Creature>("getSkull", &Creature::getSkull);
|
||||||
g_lua.bindClassMemberFunction<Creature>("getShield", &Creature::getShield);
|
g_lua.bindClassMemberFunction<Creature>("getShield", &Creature::getShield);
|
||||||
g_lua.bindClassMemberFunction<Creature>("getEmblem", &Creature::getEmblem);
|
g_lua.bindClassMemberFunction<Creature>("getEmblem", &Creature::getEmblem);
|
||||||
|
|
Loading…
Reference in New Issue