ManaPlus
Functions
EAthena::FriendsRecv Namespace Reference

Functions

void processPlayerOnline (Net::MessageIn &msg)
 
void processFriendsList (Net::MessageIn &msg)
 
void processRequestAck (Net::MessageIn &msg)
 
void processRequest (Net::MessageIn &msg)
 
void processDeletePlayer (Net::MessageIn &msg)
 

Function Documentation

◆ processDeletePlayer()

void EAthena::FriendsRecv::processDeletePlayer ( Net::MessageIn msg)

Definition at line 76 of file friendsrecv.cpp.

77 {
79  msg.readBeingId("account id");
80  msg.readInt32("char id");
81 }
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56
bool msg(InputEvent &event)
Definition: chat.cpp:39

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processFriendsList()

void EAthena::FriendsRecv::processFriendsList ( Net::MessageIn msg)

Definition at line 46 of file friendsrecv.cpp.

47 {
49  const int count = (msg.readInt16("size") - 4) / 32;
50  for (int f = 0; f < count; f ++)
51  {
52  msg.readBeingId("account id");
53  msg.readInt32("char id");
54  if (!(packetVersionMain >= 20180307 || packetVersionRe >= 20180221))
55  msg.readString(24, "name");
56  }
57 }
int packetVersionRe
Definition: client.cpp:127
int packetVersionMain
Definition: client.cpp:126

References Actions::msg(), packetVersionMain, packetVersionRe, and UNIMPLEMENTEDPACKET.

◆ processPlayerOnline()

void EAthena::FriendsRecv::processPlayerOnline ( Net::MessageIn msg)

Definition at line 36 of file friendsrecv.cpp.

37 {
39  msg.readBeingId("account id");
40  msg.readInt32("char id");
41  msg.readUInt8("flag"); // 0 - online, 1 - offline
42  if (packetVersionMain >= 20180307 || packetVersionRe >= 20180221)
43  msg.readString(24, "player name");
44 }

References Actions::msg(), packetVersionMain, packetVersionRe, and UNIMPLEMENTEDPACKET.

◆ processRequest()

void EAthena::FriendsRecv::processRequest ( Net::MessageIn msg)

Definition at line 68 of file friendsrecv.cpp.

69 {
71  msg.readBeingId("account id");
72  msg.readInt32("char id");
73  msg.readString(24, "name");
74 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processRequestAck()

void EAthena::FriendsRecv::processRequestAck ( Net::MessageIn msg)

Definition at line 59 of file friendsrecv.cpp.

60 {
62  msg.readInt16("type");
63  msg.readBeingId("account id");
64  msg.readInt32("char id");
65  msg.readString(24, "name");
66 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.