int push_luavalue(const Outfit& outfit) { g_lua.createTable(0, 8); g_lua.pushInteger(outfit.getId()); g_lua.setField("type"); g_lua.pushInteger(outfit.getAuxId()); g_lua.setField("auxType"); 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()); g_lua.setField("body"); g_lua.pushInteger(outfit.getLegs()); g_lua.setField("legs"); g_lua.pushInteger(outfit.getFeet()); g_lua.setField("feet"); if(g_game.getFeature(Otc::GamePlayerMounts)) { g_lua.pushInteger(outfit.getMount()); g_lua.setField("mount"); } return 1; }
void ProtocolGame::sendChangeOutfit(const Outfit& outfit) { OutputMessage msg; msg.addU8(Proto::ClientChangeOutfit); msg.addU16(outfit.getId()); msg.addU8(outfit.getHead()); msg.addU8(outfit.getBody()); msg.addU8(outfit.getLegs()); msg.addU8(outfit.getFeet()); msg.addU8(outfit.getAddons()); send(msg); }
void ProtocolGame::sendSetOutfit(const Outfit& outfit) { OutputMessage oMsg; oMsg.addU8(Proto::ClientSetOutfit); oMsg.addU16(outfit.getId()); oMsg.addU8(outfit.getHead()); oMsg.addU8(outfit.getBody()); oMsg.addU8(outfit.getLegs()); oMsg.addU8(outfit.getFeet()); oMsg.addU8(outfit.getAddons()); send(oMsg); }
void ProtocolGame::sendChangeOutfit(const Outfit& outfit) { OutputMessagePtr msg(new OutputMessage); msg->addU8(Proto::ClientChangeOutfit); msg->addU16(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::GamePlayerMounts)) msg->addU16(outfit.getMount()); send(msg); }