ManaPlus
Functions
EAthena::GameRecv Namespace Reference

Functions

void processMapAccountId (Net::MessageIn &msg)
 
void processMapLogin (Net::MessageIn &msg)
 
void processServerTick (Net::MessageIn &msg)
 
void processMapAuthRefuse (Net::MessageIn &msg)
 
void processPing2 (Net::MessageIn &msg)
 
void processLoadConfirm (Net::MessageIn &msg)
 

Function Documentation

◆ processLoadConfirm()

void EAthena::GameRecv::processLoadConfirm ( Net::MessageIn msg)

Definition at line 94 of file gamerecv.cpp.

95 {
97 }
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56

References UNIMPLEMENTEDPACKET.

◆ processMapAccountId()

void EAthena::GameRecv::processMapAccountId ( Net::MessageIn msg)

Definition at line 42 of file gamerecv.cpp.

43 {
44  // ignored, because we already know local player account id.
45  msg.readBeingId("account id");
46 }
bool msg(InputEvent &event)
Definition: chat.cpp:39

References Actions::msg().

◆ processMapAuthRefuse()

void EAthena::GameRecv::processMapAuthRefuse ( Net::MessageIn msg)

Definition at line 83 of file gamerecv.cpp.

84 {
86  msg.readUInt8("error");
87 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processMapLogin()

void EAthena::GameRecv::processMapLogin ( Net::MessageIn msg)

Definition at line 48 of file gamerecv.cpp.

49 {
50  unsigned char direction;
51  uint16_t x;
52  uint16_t y;
53  msg.readInt32("start time");
54  msg.readCoordinates(x, y, direction, "position");
55  msg.readInt8("x size");
56  msg.readInt8("y size");
57  logger->log("Protocol: Player start position: "
58  "(%d, %d), Direction: %d",
59  x, y, direction);
60  if (msg.getVersion() >= 20080102)
61  msg.readInt16("font");
62  if (msg.getVersion() >= 20141022 && msg.getVersion() < 20160330)
63  msg.readUInt8("sex");
64 
65  mLastHost &= 0xffffff;
66 
67  Network *const network = Network::mInstance;
68  if (network != nullptr)
69  network->pauseDispatch();
70 
71  // Switch now or we'll have problems
73  if (localPlayer != nullptr)
75 }
void setState(const StateT state)
Definition: client.h:66
void setTileCoords(const int x, const int y)
void log(const char *const log_text,...)
Definition: logger.cpp:269
Client * client
Definition: client.cpp:118
unsigned int mLastHost
Definition: client.cpp:136
LocalPlayer * localPlayer
Logger * logger
Definition: logger.cpp:89
@ GAME
Definition: state.h:49

References client, State::GAME, localPlayer, Logger::log(), logger, EAthena::Network::mInstance, mLastHost, Actions::msg(), Ea::Network::pauseDispatch(), Client::setState(), LocalPlayer::setTileCoords(), x, and y.

◆ processPing2()

void EAthena::GameRecv::processPing2 ( Net::MessageIn msg)

Definition at line 89 of file gamerecv.cpp.

90 {
91  // do nothing
92 }

◆ processServerTick()

void EAthena::GameRecv::processServerTick ( Net::MessageIn msg)

Definition at line 77 of file gamerecv.cpp.

78 {
79  // ignoring
80  msg.readInt32("tick");
81 }

References Actions::msg().