Fix 7.6 protocol issue / Typo
This commit is contained in:
parent
69ae324676
commit
ec012cb137
|
@ -1229,7 +1229,7 @@ void Game::setPVPMode(Otc::PVPModes pvpMode)
|
||||||
{
|
{
|
||||||
if(!canPerformGameAction())
|
if(!canPerformGameAction())
|
||||||
return;
|
return;
|
||||||
if(!g_game.getFeature(Otc::GameFeature::PVPModes))
|
if(!getFeature(Otc::GamePVPMode))
|
||||||
return;
|
return;
|
||||||
if(m_pvpMode == pvpMode)
|
if(m_pvpMode == pvpMode)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -30,8 +30,10 @@ int push_luavalue(const Outfit& outfit)
|
||||||
g_lua.setField("type");
|
g_lua.setField("type");
|
||||||
g_lua.pushInteger(outfit.getAuxId());
|
g_lua.pushInteger(outfit.getAuxId());
|
||||||
g_lua.setField("auxType");
|
g_lua.setField("auxType");
|
||||||
g_lua.pushInteger(outfit.getAddons());
|
if(g_game.getFeature(Otc::GamePlayerAddons)) {
|
||||||
g_lua.setField("addons");
|
g_lua.pushInteger(outfit.getAddons());
|
||||||
|
g_lua.setField("addons");
|
||||||
|
}
|
||||||
g_lua.pushInteger(outfit.getHead());
|
g_lua.pushInteger(outfit.getHead());
|
||||||
g_lua.setField("head");
|
g_lua.setField("head");
|
||||||
g_lua.pushInteger(outfit.getBody());
|
g_lua.pushInteger(outfit.getBody());
|
||||||
|
@ -54,8 +56,10 @@ bool luavalue_cast(int index, Outfit& outfit)
|
||||||
outfit.setId(g_lua.popInteger());
|
outfit.setId(g_lua.popInteger());
|
||||||
g_lua.getField("auxType", index);
|
g_lua.getField("auxType", index);
|
||||||
outfit.setAuxId(g_lua.popInteger());
|
outfit.setAuxId(g_lua.popInteger());
|
||||||
g_lua.getField("addons", index);
|
if(g_game.getFeature(Otc::GamePlayerAddons)) {
|
||||||
outfit.setAddons(g_lua.popInteger());
|
g_lua.getField("addons", index);
|
||||||
|
outfit.setAddons(g_lua.popInteger());
|
||||||
|
}
|
||||||
g_lua.getField("head", index);
|
g_lua.getField("head", index);
|
||||||
outfit.setHead(g_lua.popInteger());
|
outfit.setHead(g_lua.popInteger());
|
||||||
g_lua.getField("body", index);
|
g_lua.getField("body", index);
|
||||||
|
|
|
@ -705,12 +705,16 @@ void ProtocolGame::sendChangeOutfit(const Outfit& outfit)
|
||||||
{
|
{
|
||||||
OutputMessagePtr msg(new OutputMessage);
|
OutputMessagePtr msg(new OutputMessage);
|
||||||
msg->addU8(Proto::ClientChangeOutfit);
|
msg->addU8(Proto::ClientChangeOutfit);
|
||||||
msg->addU16(outfit.getId());
|
if(g_game.getFeature(Otc::GameLooktypeU16))
|
||||||
|
msg->addU16(outfit.getId());
|
||||||
|
else
|
||||||
|
msg->addU8(outfit.getId());
|
||||||
msg->addU8(outfit.getHead());
|
msg->addU8(outfit.getHead());
|
||||||
msg->addU8(outfit.getBody());
|
msg->addU8(outfit.getBody());
|
||||||
msg->addU8(outfit.getLegs());
|
msg->addU8(outfit.getLegs());
|
||||||
msg->addU8(outfit.getFeet());
|
msg->addU8(outfit.getFeet());
|
||||||
msg->addU8(outfit.getAddons());
|
if(g_game.getFeature(Otc::GamePlayerAddons))
|
||||||
|
msg->addU8(outfit.getAddons());
|
||||||
if(g_game.getFeature(Otc::GamePlayerMounts))
|
if(g_game.getFeature(Otc::GamePlayerMounts))
|
||||||
msg->addU16(outfit.getMount());
|
msg->addU16(outfit.getMount());
|
||||||
send(msg);
|
send(msg);
|
||||||
|
|
Loading…
Reference in New Issue