Otclient
14/8/2020
|
#include <protocolgame.h>
Public Member Functions | |
void | login (const std::string &accountName, const std::string &accountPassword, const std::string &host, uint16 port, const std::string &characterName, const std::string &authenticatorToken, const std::string &sessionKey) |
void | send (const OutputMessagePtr &outputMessage) |
void | sendExtendedOpcode (uint8 opcode, const std::string &buffer) |
void | sendLoginPacket (uint challengeTimestamp, uint8 challengeRandom) |
void | sendEnterGame () |
void | sendLogout () |
void | sendPing () |
void | sendPingBack () |
void | sendAutoWalk (const std::vector< Otc::Direction > &path) |
void | sendWalkNorth () |
void | sendWalkEast () |
void | sendWalkSouth () |
void | sendWalkWest () |
void | sendStop () |
void | sendWalkNorthEast () |
void | sendWalkSouthEast () |
void | sendWalkSouthWest () |
void | sendWalkNorthWest () |
void | sendTurnNorth () |
void | sendTurnEast () |
void | sendTurnSouth () |
void | sendTurnWest () |
void | sendEquipItem (int itemId, int countOrSubType) |
void | sendMove (const Position &fromPos, int thingId, int stackpos, const Position &toPos, int count) |
void | sendInspectNpcTrade (int itemId, int count) |
void | sendBuyItem (int itemId, int subType, int amount, bool ignoreCapacity, bool buyWithBackpack) |
void | sendSellItem (int itemId, int subType, int amount, bool ignoreEquipped) |
void | sendCloseNpcTrade () |
void | sendRequestTrade (const Position &pos, int thingId, int stackpos, uint creatureId) |
void | sendInspectTrade (bool counterOffer, int index) |
void | sendAcceptTrade () |
void | sendRejectTrade () |
void | sendUseItem (const Position &position, int itemId, int stackpos, int index) |
void | sendUseItemWith (const Position &fromPos, int itemId, int fromStackPos, const Position &toPos, int toThingId, int toStackPos) |
void | sendUseOnCreature (const Position &pos, int thingId, int stackpos, uint creatureId) |
void | sendRotateItem (const Position &pos, int thingId, int stackpos) |
void | sendCloseContainer (int containerId) |
void | sendUpContainer (int containerId) |
void | sendEditText (uint id, const std::string &text) |
void | sendEditList (uint id, int doorId, const std::string &text) |
void | sendLook (const Position &position, int thingId, int stackpos) |
void | sendLookCreature (uint creatureId) |
void | sendTalk (Otc::MessageMode mode, int channelId, const std::string &receiver, const std::string &message) |
void | sendRequestChannels () |
void | sendJoinChannel (int channelId) |
void | sendLeaveChannel (int channelId) |
void | sendOpenPrivateChannel (const std::string &receiver) |
void | sendOpenRuleViolation (const std::string &reporter) |
void | sendCloseRuleViolation (const std::string &reporter) |
void | sendCancelRuleViolation () |
void | sendCloseNpcChannel () |
void | sendChangeFightModes (Otc::FightModes fightMode, Otc::ChaseModes chaseMode, bool safeFight, Otc::PVPModes pvpMode) |
void | sendAttack (uint creatureId, uint seq) |
void | sendFollow (uint creatureId, uint seq) |
void | sendInviteToParty (uint creatureId) |
void | sendJoinParty (uint creatureId) |
void | sendRevokeInvitation (uint creatureId) |
void | sendPassLeadership (uint creatureId) |
void | sendLeaveParty () |
void | sendShareExperience (bool active) |
void | sendOpenOwnChannel () |
void | sendInviteToOwnChannel (const std::string &name) |
void | sendExcludeFromOwnChannel (const std::string &name) |
void | sendCancelAttackAndFollow () |
void | sendRefreshContainer (int containerId) |
void | sendRequestOutfit () |
void | sendChangeOutfit (const Outfit &outfit) |
void | sendMountStatus (bool mount) |
void | sendAddVip (const std::string &name) |
void | sendRemoveVip (uint playerId) |
void | sendEditVip (uint playerId, const std::string &description, int iconId, bool notifyLogin) |
void | sendBugReport (const std::string &comment) |
void | sendRuleViolation (const std::string &target, int reason, int action, const std::string &comment, const std::string &statement, int statementId, bool ipBanishment) |
void | sendDebugReport (const std::string &a, const std::string &b, const std::string &c, const std::string &d) |
void | sendRequestQuestLog () |
void | sendRequestQuestLine (int questId) |
void | sendNewNewRuleViolation (int reason, int action, const std::string &characterName, const std::string &comment, const std::string &translation) |
void | sendRequestItemInfo (int itemId, int subType, int index) |
void | sendAnswerModalDialog (uint32 dialog, int button, int choice) |
void | sendBrowseField (const Position &position) |
void | sendSeekInContainer (int cid, int index) |
void | sendBuyStoreOffer (int offerId, int productType, const std::string &name) |
void | sendRequestTransactionHistory (int page, int entriesPerPage) |
void | sendRequestStoreOffers (const std::string &categoryName, int serviceType) |
void | sendOpenStore (int serviceType, const std::string &category) |
void | sendTransferCoins (const std::string &recipient, int amount) |
void | sendOpenTransactionHistory (int entriesPerPage) |
void | sendChangeMapAwareRange (int xrange, int yrange) |
void | addPosition (const OutputMessagePtr &msg, const Position &position) |
void | setMapDescription (const InputMessagePtr &msg, int x, int y, int z, int width, int height) |
int | setFloorDescription (const InputMessagePtr &msg, int x, int y, int z, int width, int height, int offset, int skip) |
int | setTileDescription (const InputMessagePtr &msg, Position position) |
Outfit | getOutfit (const InputMessagePtr &msg) |
ThingPtr | getThing (const InputMessagePtr &msg) |
ThingPtr | getMappedThing (const InputMessagePtr &msg) |
CreaturePtr | getCreature (const InputMessagePtr &msg, int type=0) |
StaticTextPtr | getStaticText (const InputMessagePtr &msg, int type=0) |
ItemPtr | getItem (const InputMessagePtr &msg, int id=0) |
Position | getPosition (const InputMessagePtr &msg) |
Public Member Functions inherited from Protocol | |
Protocol () | |
virtual | ~Protocol () |
void | connect (const std::string &host, uint16 port) |
void | disconnect () |
bool | isConnected () |
bool | isConnecting () |
ticks_t | getElapsedTicksSinceLastRead () |
ConnectionPtr | getConnection () |
void | setConnection (const ConnectionPtr &connection) |
void | generateXteaKey () |
void | setXteaKey (uint32 a, uint32 b, uint32 c, uint32 d) |
std::vector< uint32 > | getXteaKey () |
void | enableXteaEncryption () |
void | enableChecksum () |
virtual void | recv () |
ProtocolPtr | asProtocol () |
Public Member Functions inherited from LuaObject | |
LuaObject () | |
virtual | ~LuaObject () |
template<typename T > | |
void | connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false) |
template<typename... T> | |
int | luaCallLuaField (const std::string &field, const T &... args) |
template<typename R , typename... T> | |
R | callLuaField (const std::string &field, const T &... args) |
template<typename... T> | |
void | callLuaField (const std::string &field, const T &... args) |
bool | hasLuaField (const std::string &field) |
Returns true if the lua field exists. More... | |
template<typename T > | |
void | setLuaField (const std::string &key, const T &value) |
Sets a field in this lua object. More... | |
template<typename T > | |
T | getLuaField (const std::string &key) |
Gets a field from this lua object. More... | |
void | releaseLuaFieldsTable () |
Release fields table reference. More... | |
void | luaSetField (const std::string &key) |
Sets a field from this lua object, the value must be on the stack. More... | |
void | luaGetField (const std::string &key) |
Gets a field from this lua object, the result is pushed onto the stack. More... | |
void | luaGetMetatable () |
Get object's metatable. More... | |
void | luaGetFieldsTable () |
Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More... | |
int | getUseCount () |
std::string | getClassName () |
Returns the derived class name, its the same name used in Lua. More... | |
LuaObjectPtr | asLuaObject () |
void | operator= (const LuaObject &) |
Public Member Functions inherited from stdext::shared_object | |
shared_object () | |
virtual | ~shared_object () |
void | add_ref () |
void | dec_ref () |
refcount_t | ref_count () |
template<typename T > | |
stdext::shared_object_ptr< T > | static_self_cast () |
template<typename T > | |
stdext::shared_object_ptr< T > | dynamic_self_cast () |
template<typename T > | |
stdext::shared_object_ptr< T > | const_self_cast () |
Protected Member Functions | |
void | onConnect () |
void | onRecv (const InputMessagePtr &inputMessage) |
void | onError (const boost::system::error_code &error) |
Friends | |
class | Game |
Additional Inherited Members | |
Protected Attributes inherited from Protocol | |
uint32 | m_xteaKey [4] |
Definition at line 31 of file protocolgame.h.
void ProtocolGame::addPosition | ( | const OutputMessagePtr & | msg, |
const Position & | position | ||
) |
CreaturePtr ProtocolGame::getCreature | ( | const InputMessagePtr & | msg, |
int | type = 0 |
||
) |
Definition at line 2203 of file protocolgameparse.cpp.
ItemPtr ProtocolGame::getItem | ( | const InputMessagePtr & | msg, |
int | id = 0 |
||
) |
Definition at line 2352 of file protocolgameparse.cpp.
ThingPtr ProtocolGame::getMappedThing | ( | const InputMessagePtr & | msg | ) |
Outfit ProtocolGame::getOutfit | ( | const InputMessagePtr & | msg | ) |
Definition at line 2104 of file protocolgameparse.cpp.
Position ProtocolGame::getPosition | ( | const InputMessagePtr & | msg | ) |
Definition at line 2394 of file protocolgameparse.cpp.
StaticTextPtr ProtocolGame::getStaticText | ( | const InputMessagePtr & | msg, |
int | type = 0 |
||
) |
Definition at line 2381 of file protocolgameparse.cpp.
ThingPtr ProtocolGame::getThing | ( | const InputMessagePtr & | msg | ) |
Definition at line 2160 of file protocolgameparse.cpp.
void ProtocolGame::login | ( | const std::string & | accountName, |
const std::string & | accountPassword, | ||
const std::string & | host, | ||
uint16 | port, | ||
const std::string & | characterName, | ||
const std::string & | authenticatorToken, | ||
const std::string & | sessionKey | ||
) |
Definition at line 29 of file protocolgame.cpp.
|
protectedvirtual |
Reimplemented from Protocol.
Definition at line 40 of file protocolgame.cpp.
|
protectedvirtual |
Reimplemented from Protocol.
Definition at line 74 of file protocolgame.cpp.
|
protectedvirtual |
Reimplemented from Protocol.
Definition at line 56 of file protocolgame.cpp.
|
virtual |
Reimplemented from Protocol.
Definition at line 30 of file protocolgamesend.cpp.
void ProtocolGame::sendAcceptTrade | ( | ) |
Definition at line 372 of file protocolgamesend.cpp.
void ProtocolGame::sendAddVip | ( | const std::string & | name | ) |
Definition at line 736 of file protocolgamesend.cpp.
void ProtocolGame::sendAnswerModalDialog | ( | uint32 | dialog, |
int | button, | ||
int | choice | ||
) |
Definition at line 833 of file protocolgamesend.cpp.
Definition at line 591 of file protocolgamesend.cpp.
void ProtocolGame::sendAutoWalk | ( | const std::vector< Otc::Direction > & | path | ) |
Definition at line 157 of file protocolgamesend.cpp.
void ProtocolGame::sendBrowseField | ( | const Position & | position | ) |
Definition at line 843 of file protocolgamesend.cpp.
void ProtocolGame::sendBugReport | ( | const std::string & | comment | ) |
Definition at line 763 of file protocolgamesend.cpp.
void ProtocolGame::sendBuyItem | ( | int | itemId, |
int | subType, | ||
int | amount, | ||
bool | ignoreCapacity, | ||
bool | buyWithBackpack | ||
) |
Definition at line 319 of file protocolgamesend.cpp.
void ProtocolGame::sendBuyStoreOffer | ( | int | offerId, |
int | productType, | ||
const std::string & | name | ||
) |
Definition at line 866 of file protocolgamesend.cpp.
void ProtocolGame::sendCancelAttackAndFollow | ( | ) |
Definition at line 683 of file protocolgamesend.cpp.
void ProtocolGame::sendCancelRuleViolation | ( | ) |
Definition at line 565 of file protocolgamesend.cpp.
void ProtocolGame::sendChangeFightModes | ( | Otc::FightModes | fightMode, |
Otc::ChaseModes | chaseMode, | ||
bool | safeFight, | ||
Otc::PVPModes | pvpMode | ||
) |
Definition at line 579 of file protocolgamesend.cpp.
void ProtocolGame::sendChangeMapAwareRange | ( | int | xrange, |
int | yrange | ||
) |
Definition at line 939 of file protocolgamesend.cpp.
void ProtocolGame::sendChangeOutfit | ( | const Outfit & | outfit | ) |
Definition at line 705 of file protocolgamesend.cpp.
void ProtocolGame::sendCloseContainer | ( | int | containerId | ) |
Definition at line 431 of file protocolgamesend.cpp.
void ProtocolGame::sendCloseNpcChannel | ( | ) |
Definition at line 572 of file protocolgamesend.cpp.
void ProtocolGame::sendCloseNpcTrade | ( | ) |
Definition at line 345 of file protocolgamesend.cpp.
void ProtocolGame::sendCloseRuleViolation | ( | const std::string & | reporter | ) |
Definition at line 557 of file protocolgamesend.cpp.
void ProtocolGame::sendDebugReport | ( | const std::string & | a, |
const std::string & | b, | ||
const std::string & | c, | ||
const std::string & | d | ||
) |
Definition at line 785 of file protocolgamesend.cpp.
void ProtocolGame::sendEditList | ( | uint | id, |
int | doorId, | ||
const std::string & | text | ||
) |
Definition at line 456 of file protocolgamesend.cpp.
void ProtocolGame::sendEditText | ( | uint | id, |
const std::string & | text | ||
) |
Definition at line 447 of file protocolgamesend.cpp.
void ProtocolGame::sendEditVip | ( | uint | playerId, |
const std::string & | description, | ||
int | iconId, | ||
bool | notifyLogin | ||
) |
Definition at line 752 of file protocolgamesend.cpp.
void ProtocolGame::sendEnterGame | ( | ) |
Definition at line 125 of file protocolgamesend.cpp.
void ProtocolGame::sendEquipItem | ( | int | itemId, |
int | countOrSubType | ||
) |
Definition at line 289 of file protocolgamesend.cpp.
void ProtocolGame::sendExcludeFromOwnChannel | ( | const std::string & | name | ) |
Definition at line 675 of file protocolgamesend.cpp.
void ProtocolGame::sendExtendedOpcode | ( | uint8 | opcode, |
const std::string & | buffer | ||
) |
Definition at line 38 of file protocolgamesend.cpp.
Definition at line 601 of file protocolgamesend.cpp.
void ProtocolGame::sendInspectNpcTrade | ( | int | itemId, |
int | count | ||
) |
Definition at line 310 of file protocolgamesend.cpp.
void ProtocolGame::sendInspectTrade | ( | bool | counterOffer, |
int | index | ||
) |
Definition at line 363 of file protocolgamesend.cpp.
void ProtocolGame::sendInviteToOwnChannel | ( | const std::string & | name | ) |
Definition at line 667 of file protocolgamesend.cpp.
void ProtocolGame::sendInviteToParty | ( | uint | creatureId | ) |
Definition at line 611 of file protocolgamesend.cpp.
void ProtocolGame::sendJoinChannel | ( | int | channelId | ) |
Definition at line 525 of file protocolgamesend.cpp.
void ProtocolGame::sendJoinParty | ( | uint | creatureId | ) |
Definition at line 619 of file protocolgamesend.cpp.
void ProtocolGame::sendLeaveChannel | ( | int | channelId | ) |
Definition at line 533 of file protocolgamesend.cpp.
void ProtocolGame::sendLeaveParty | ( | ) |
Definition at line 643 of file protocolgamesend.cpp.
Definition at line 51 of file protocolgamesend.cpp.
void ProtocolGame::sendLogout | ( | ) |
Definition at line 132 of file protocolgamesend.cpp.
void ProtocolGame::sendLook | ( | const Position & | position, |
int | thingId, | ||
int | stackpos | ||
) |
Definition at line 466 of file protocolgamesend.cpp.
void ProtocolGame::sendLookCreature | ( | uint | creatureId | ) |
Definition at line 476 of file protocolgamesend.cpp.
void ProtocolGame::sendMountStatus | ( | bool | mount | ) |
Definition at line 724 of file protocolgamesend.cpp.
void ProtocolGame::sendMove | ( | const Position & | fromPos, |
int | thingId, | ||
int | stackpos, | ||
const Position & | toPos, | ||
int | count | ||
) |
Definition at line 298 of file protocolgamesend.cpp.
void ProtocolGame::sendNewNewRuleViolation | ( | int | reason, |
int | action, | ||
const std::string & | characterName, | ||
const std::string & | comment, | ||
const std::string & | translation | ||
) |
void ProtocolGame::sendOpenOwnChannel | ( | ) |
Definition at line 660 of file protocolgamesend.cpp.
void ProtocolGame::sendOpenPrivateChannel | ( | const std::string & | receiver | ) |
Definition at line 541 of file protocolgamesend.cpp.
void ProtocolGame::sendOpenRuleViolation | ( | const std::string & | reporter | ) |
Definition at line 549 of file protocolgamesend.cpp.
void ProtocolGame::sendOpenStore | ( | int | serviceType, |
const std::string & | category | ||
) |
Definition at line 907 of file protocolgamesend.cpp.
void ProtocolGame::sendOpenTransactionHistory | ( | int | entriesPerPage | ) |
Definition at line 929 of file protocolgamesend.cpp.
void ProtocolGame::sendPassLeadership | ( | uint | creatureId | ) |
Definition at line 635 of file protocolgamesend.cpp.
void ProtocolGame::sendPing | ( | ) |
Definition at line 139 of file protocolgamesend.cpp.
void ProtocolGame::sendPingBack | ( | ) |
Definition at line 150 of file protocolgamesend.cpp.
void ProtocolGame::sendRefreshContainer | ( | int | containerId | ) |
Definition at line 690 of file protocolgamesend.cpp.
void ProtocolGame::sendRejectTrade | ( | ) |
Definition at line 379 of file protocolgamesend.cpp.
void ProtocolGame::sendRemoveVip | ( | uint | playerId | ) |
Definition at line 744 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestChannels | ( | ) |
Definition at line 518 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestItemInfo | ( | int | itemId, |
int | subType, | ||
int | index | ||
) |
Definition at line 823 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestOutfit | ( | ) |
Definition at line 698 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestQuestLine | ( | int | questId | ) |
Definition at line 803 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestQuestLog | ( | ) |
Definition at line 796 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestStoreOffers | ( | const std::string & | categoryName, |
int | serviceType | ||
) |
Definition at line 894 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestTrade | ( | const Position & | pos, |
int | thingId, | ||
int | stackpos, | ||
uint | creatureId | ||
) |
Definition at line 352 of file protocolgamesend.cpp.
void ProtocolGame::sendRequestTransactionHistory | ( | int | page, |
int | entriesPerPage | ||
) |
Definition at line 879 of file protocolgamesend.cpp.
void ProtocolGame::sendRevokeInvitation | ( | uint | creatureId | ) |
Definition at line 627 of file protocolgamesend.cpp.
void ProtocolGame::sendRotateItem | ( | const Position & | pos, |
int | thingId, | ||
int | stackpos | ||
) |
Definition at line 421 of file protocolgamesend.cpp.
void ProtocolGame::sendRuleViolation | ( | const std::string & | target, |
int | reason, | ||
int | action, | ||
const std::string & | comment, | ||
const std::string & | statement, | ||
int | statementId, | ||
bool | ipBanishment | ||
) |
Definition at line 771 of file protocolgamesend.cpp.
void ProtocolGame::sendSeekInContainer | ( | int | cid, |
int | index | ||
) |
Definition at line 854 of file protocolgamesend.cpp.
void ProtocolGame::sendSellItem | ( | int | itemId, |
int | subType, | ||
int | amount, | ||
bool | ignoreEquipped | ||
) |
Definition at line 331 of file protocolgamesend.cpp.
void ProtocolGame::sendShareExperience | ( | bool | active | ) |
Definition at line 650 of file protocolgamesend.cpp.
void ProtocolGame::sendStop | ( | ) |
Definition at line 226 of file protocolgamesend.cpp.
void ProtocolGame::sendTalk | ( | Otc::MessageMode | mode, |
int | channelId, | ||
const std::string & | receiver, | ||
const std::string & | message | ||
) |
Definition at line 484 of file protocolgamesend.cpp.
void ProtocolGame::sendTransferCoins | ( | const std::string & | recipient, |
int | amount | ||
) |
Definition at line 920 of file protocolgamesend.cpp.
void ProtocolGame::sendTurnEast | ( | ) |
Definition at line 268 of file protocolgamesend.cpp.
void ProtocolGame::sendTurnNorth | ( | ) |
Definition at line 261 of file protocolgamesend.cpp.
void ProtocolGame::sendTurnSouth | ( | ) |
Definition at line 275 of file protocolgamesend.cpp.
void ProtocolGame::sendTurnWest | ( | ) |
Definition at line 282 of file protocolgamesend.cpp.
void ProtocolGame::sendUpContainer | ( | int | containerId | ) |
Definition at line 439 of file protocolgamesend.cpp.
void ProtocolGame::sendUseItem | ( | const Position & | position, |
int | itemId, | ||
int | stackpos, | ||
int | index | ||
) |
Definition at line 386 of file protocolgamesend.cpp.
void ProtocolGame::sendUseItemWith | ( | const Position & | fromPos, |
int | itemId, | ||
int | fromStackPos, | ||
const Position & | toPos, | ||
int | toThingId, | ||
int | toStackPos | ||
) |
Definition at line 397 of file protocolgamesend.cpp.
void ProtocolGame::sendUseOnCreature | ( | const Position & | pos, |
int | thingId, | ||
int | stackpos, | ||
uint | creatureId | ||
) |
Definition at line 410 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkEast | ( | ) |
Definition at line 205 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkNorth | ( | ) |
Definition at line 198 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkNorthEast | ( | ) |
Definition at line 233 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkNorthWest | ( | ) |
Definition at line 254 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkSouth | ( | ) |
Definition at line 212 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkSouthEast | ( | ) |
Definition at line 240 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkSouthWest | ( | ) |
Definition at line 247 of file protocolgamesend.cpp.
void ProtocolGame::sendWalkWest | ( | ) |
Definition at line 219 of file protocolgamesend.cpp.
int ProtocolGame::setFloorDescription | ( | const InputMessagePtr & | msg, |
int | x, | ||
int | y, | ||
int | z, | ||
int | width, | ||
int | height, | ||
int | offset, | ||
int | skip | ||
) |
Definition at line 2064 of file protocolgameparse.cpp.
void ProtocolGame::setMapDescription | ( | const InputMessagePtr & | msg, |
int | x, | ||
int | y, | ||
int | z, | ||
int | width, | ||
int | height | ||
) |
Definition at line 2044 of file protocolgameparse.cpp.
int ProtocolGame::setTileDescription | ( | const InputMessagePtr & | msg, |
Position | position | ||
) |
Definition at line 2080 of file protocolgameparse.cpp.
|
friend |
Definition at line 131 of file protocolgame.h.