Go to the documentation of this file.
40 if(m_enableSendExtendedOpcode) {
44 msg->addString(buffer);
68 int offset = msg->getMessageSize();
83 msg->addString(m_sessionKey);
84 msg->addString(m_characterName);
87 msg->addString(m_accountName);
89 msg->addU32(stdext::from_string<uint32>(m_accountName));
91 msg->addString(m_characterName);
92 msg->addString(m_accountPassword);
95 msg->addString(m_authenticatorToken);
99 msg->addU32(challengeTimestamp);
100 msg->addU8(challengeRandom);
103 std::string extended = callLuaField<std::string>(
"getLoginExtendedData");
104 if(!extended.empty())
105 msg->addString(extended);
109 assert(paddingBytes >= 0);
110 msg->addPaddingBytes(paddingBytes);
161 msg->addU8(path.size());
294 msg->addU8(countOrSubType);
303 msg->addU16(thingId);
304 msg->addU8(stackpos);
326 msg->addU8(ignoreCapacity ? 0x01 : 0x00);
327 msg->addU8(buyWithBackpack ? 0x01 : 0x00);
341 msg->addU8(ignoreEquipped ? 0x01 : 0x00);
357 msg->addU16(thingId);
358 msg->addU8(stackpos);
359 msg->addU32(creatureId);
367 msg->addU8(counterOffer ? 0x01 : 0x00);
392 msg->addU8(stackpos);
403 msg->addU8(fromStackPos);
405 msg->addU16(toThingId);
406 msg->addU8(toStackPos);
415 msg->addU16(thingId);
416 msg->addU8(stackpos);
417 msg->addU32(creatureId);
426 msg->addU16(thingId);
427 msg->addU8(stackpos);
435 msg->addU8(containerId);
443 msg->addU8(containerId);
452 msg->addString(text);
462 msg->addString(text);
471 msg->addU16(thingId);
472 msg->addU8(stackpos);
480 msg->addU32(creatureId);
489 if(message.length() > 255) {
490 g_logger.traceError(
"message too large");
502 msg->addString(receiver);
508 msg->addU16(channelId);
514 msg->addString(message);
529 msg->addU16(channelId);
537 msg->addU16(channelId);
545 msg->addString(receiver);
553 msg->addString(reporter);
561 msg->addString(reporter);
583 msg->addU8(fightMode);
584 msg->addU8(chaseMode);
585 msg->addU8(safeFight ? 0x01: 0x00);
595 msg->addU32(creatureId);
605 msg->addU32(creatureId);
615 msg->addU32(creatureId);
623 msg->addU32(creatureId);
631 msg->addU32(creatureId);
639 msg->addU32(creatureId);
654 msg->addU8(active ? 0x01 : 0x00);
671 msg->addString(name);
679 msg->addString(name);
694 msg->addU8(containerId);
710 msg->addU16(outfit.
getId());
712 msg->addU8(outfit.
getId());
732 g_logger.
error(
"ProtocolGame::sendMountStatus does not support the current protocol.");
740 msg->addString(name);
748 msg->addU32(playerId);
756 msg->addU32(playerId);
757 msg->addString(description);
759 msg->addU8(notifyLogin);
767 msg->addString(comment);
771 void ProtocolGame::sendRuleViolation(
const std::string& target,
int reason,
int action,
const std::string& comment,
const std::string& statement,
int statementId,
bool ipBanishment)
775 msg->addString(target);
778 msg->addString(comment);
779 msg->addString(statement);
780 msg->addU16(statementId);
781 msg->addU8(ipBanishment);
807 msg->addU16(questId);
817 msg->addString(characterName);
818 msg->addString(comment);
819 msg->addString(translation);
870 msg->addU32(offerId);
871 msg->addU8(productType);
874 msg->addString(name);
885 msg->addU32(entriesPerPage);
888 msg->addU8(entriesPerPage);
900 msg->addU8(serviceType);
902 msg->addString(categoryName);
913 msg->addU8(serviceType);
914 msg->addString(category);
924 msg->addString(recipient);
933 msg->addU8(entriesPerPage);
953 msg->addU16(position.
x);
954 msg->addU16(position.
y);
955 msg->addU8(position.
z);
void sendChangeMapAwareRange(int xrange, int yrange)
void sendCancelAttackAndFollow()
void sendExcludeFromOwnChannel(const std::string &name)
void sendBugReport(const std::string &comment)
void sendJoinChannel(int channelId)
void sendCloseNpcChannel()
void sendLeaveChannel(int channelId)
void sendNewNewRuleViolation(int reason, int action, const std::string &characterName, const std::string &comment, const std::string &translation)
void sendCancelRuleViolation()
void sendSeekInContainer(int cid, int index)
void sendOpenOwnChannel()
void sendUseOnCreature(const Position &pos, int thingId, int stackpos, uint creatureId)
@ ClientRequestStoreOffers
@ GameLoginPacketEncryption
void sendBuyItem(int itemId, int subType, int amount, bool ignoreCapacity, bool buyWithBackpack)
void addPosition(const OutputMessagePtr &msg, const Position &position)
void error(const std::string &what)
void send(const OutputMessagePtr &outputMessage)
void sendLoginPacket(uint challengeTimestamp, uint8 challengeRandom)
void sendMove(const Position &fromPos, int thingId, int stackpos, const Position &toPos, int count)
@ MessageGamemasterChannel
void sendPassLeadership(uint creatureId)
@ ClientOpenRuleViolation
void sendRotateItem(const Position &pos, int thingId, int stackpos)
void sendAnswerModalDialog(uint32 dialog, int button, int choice)
void sendAddVip(const std::string &name)
void sendDebugReport(const std::string &a, const std::string &b, const std::string &c, const std::string &d)
void sendInviteToOwnChannel(const std::string &name)
void sendRuleViolation(const std::string &target, int reason, int action, const std::string &comment, const std::string &statement, int statementId, bool ipBanishment)
void sendFollow(uint creatureId, uint seq)
uint16 getContentRevision()
void sendOpenTransactionHistory(int entriesPerPage)
void sendBuyStoreOffer(int offerId, int productType, const std::string &name)
void sendCloseContainer(int containerId)
void sendSellItem(int itemId, int subType, int amount, bool ignoreEquipped)
void sendShareExperience(bool active)
void enableXteaEncryption()
void sendRequestItemInfo(int itemId, int subType, int index)
void sendEditVip(uint playerId, const std::string &description, int iconId, bool notifyLogin)
void sendRequestStoreOffers(const std::string &categoryName, int serviceType)
void sendChangeFightModes(Otc::FightModes fightMode, Otc::ChaseModes chaseMode, bool safeFight, Otc::PVPModes pvpMode)
void sendInspectNpcTrade(int itemId, int count)
void sendLookCreature(uint creatureId)
void sendEditList(uint id, int doorId, const std::string &text)
@ ClientOpenPrivateChannel
void sendAutoWalk(const std::vector< Otc::Direction > &path)
uint8 translateMessageModeToServer(Otc::MessageMode mode)
void sendRemoveVip(uint playerId)
@ ClientAnswerModalDialog
void sendCloseRuleViolation(const std::string &reporter)
@ GameContainerPagination
void sendRequestQuestLog()
void sendRequestTrade(const Position &pos, int thingId, int stackpos, uint creatureId)
void sendInviteToParty(uint creatureId)
bool getFeature(Otc::GameFeature feature)
void sendAttack(uint creatureId, uint seq)
@ GameDoubleShopSellAmount
void sendOpenRuleViolation(const std::string &reporter)
virtual void send(const OutputMessagePtr &outputMessage)
@ GameIngameStoreServiceType
@ MessageChannelHighlight
void sendTalk(Otc::MessageMode mode, int channelId, const std::string &receiver, const std::string &message)
void sendInspectTrade(bool counterOffer, int index)
void sendEquipItem(int itemId, int countOrSubType)
void sendLook(const Position &position, int thingId, int stackpos)
void sendExtendedOpcode(uint8 opcode, const std::string &buffer)
@ ClientChangeMapAwareRange
void sendRevokeInvitation(uint creatureId)
@ ClientRequestTransactionHistory
@ MessageGamemasterPrivateTo
@ GameChangeMapAwareRange
void sendMountStatus(bool mount)
void sendBrowseField(const Position &position)
void sendUseItemWith(const Position &fromPos, int itemId, int fromStackPos, const Position &toPos, int toThingId, int toStackPos)
@ ClientExcludeFromOwnChannel
void sendTransferCoins(const std::string &recipient, int amount)
void sendJoinParty(uint creatureId)
@ ClientInviteToOwnChannel
void sendOpenPrivateChannel(const std::string &receiver)
void sendRequestTransactionHistory(int page, int entriesPerPage)
void sendEditText(uint id, const std::string &text)
void sendRequestQuestLine(int questId)
void sendChangeOutfit(const Outfit &outfit)
void sendOpenStore(int serviceType, const std::string &category)
@ ClientOpenTransactionHistory
@ MessageChannelManagement
void sendUseItem(const Position &position, int itemId, int stackpos, int index)
void sendRequestChannels()
bool checkBotProtection()
ThingTypeManager g_things
@ ClientCancelAttackAndFollow
@ ClientCancelRuleViolation
void sendUpContainer(int containerId)
void sendRefreshContainer(int containerId)
@ ClientCloseRuleViolation