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())
|
||||
return;
|
||||
if(!g_game.getFeature(Otc::GameFeature::PVPModes))
|
||||
if(!getFeature(Otc::GamePVPMode))
|
||||
return;
|
||||
if(m_pvpMode == pvpMode)
|
||||
return;
|
||||
|
|
|
@ -30,8 +30,10 @@ int push_luavalue(const Outfit& outfit)
|
|||
g_lua.setField("type");
|
||||
g_lua.pushInteger(outfit.getAuxId());
|
||||
g_lua.setField("auxType");
|
||||
g_lua.pushInteger(outfit.getAddons());
|
||||
g_lua.setField("addons");
|
||||
if(g_game.getFeature(Otc::GamePlayerAddons)) {
|
||||
g_lua.pushInteger(outfit.getAddons());
|
||||
g_lua.setField("addons");
|
||||
}
|
||||
g_lua.pushInteger(outfit.getHead());
|
||||
g_lua.setField("head");
|
||||
g_lua.pushInteger(outfit.getBody());
|
||||
|
@ -54,8 +56,10 @@ bool luavalue_cast(int index, Outfit& outfit)
|
|||
outfit.setId(g_lua.popInteger());
|
||||
g_lua.getField("auxType", index);
|
||||
outfit.setAuxId(g_lua.popInteger());
|
||||
g_lua.getField("addons", index);
|
||||
outfit.setAddons(g_lua.popInteger());
|
||||
if(g_game.getFeature(Otc::GamePlayerAddons)) {
|
||||
g_lua.getField("addons", index);
|
||||
outfit.setAddons(g_lua.popInteger());
|
||||
}
|
||||
g_lua.getField("head", index);
|
||||
outfit.setHead(g_lua.popInteger());
|
||||
g_lua.getField("body", index);
|
||||
|
|
|
@ -705,12 +705,16 @@ void ProtocolGame::sendChangeOutfit(const Outfit& outfit)
|
|||
{
|
||||
OutputMessagePtr msg(new OutputMessage);
|
||||
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.getBody());
|
||||
msg->addU8(outfit.getLegs());
|
||||
msg->addU8(outfit.getFeet());
|
||||
msg->addU8(outfit.getAddons());
|
||||
if(g_game.getFeature(Otc::GamePlayerAddons))
|
||||
msg->addU8(outfit.getAddons());
|
||||
if(g_game.getFeature(Otc::GamePlayerMounts))
|
||||
msg->addU16(outfit.getMount());
|
||||
send(msg);
|
||||
|
|
Loading…
Reference in New Issue