ManaPlus
Functions
EAthena::BattleGroundRecv Namespace Reference

Functions

void processBattleEmblem (Net::MessageIn &msg)
 
void processBattleEmblem2 (Net::MessageIn &msg)
 
void processBattleUpdateScore (Net::MessageIn &msg)
 
void processBattleUpdateCoords (Net::MessageIn &msg)
 
void processBattlePlay (Net::MessageIn &msg)
 
void processBattleQueueAck (Net::MessageIn &msg)
 
void processBattleBegins (Net::MessageIn &msg)
 
void processBattleNoticeDelete (Net::MessageIn &msg)
 
void processBattleJoined (Net::MessageIn &msg)
 
void processBattleUpdateHp (Net::MessageIn &msg)
 

Function Documentation

◆ processBattleBegins()

void EAthena::BattleGroundRecv::processBattleBegins ( Net::MessageIn msg)

Definition at line 88 of file battlegroundrecv.cpp.

89 {
91  msg.readString(24, "bg name");
92  msg.readString(24, "game name");
93 }
#define UNIMPLEMENTEDPACKET
Definition: logger.h:56
bool msg(InputEvent &event)
Definition: chat.cpp:39

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleEmblem()

void EAthena::BattleGroundRecv::processBattleEmblem ( Net::MessageIn msg)

Definition at line 36 of file battlegroundrecv.cpp.

37 {
39  msg.readBeingId("account id");
40  msg.readString(24, "name");
41  msg.readInt16("bg id");
42 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleEmblem2()

void EAthena::BattleGroundRecv::processBattleEmblem2 ( Net::MessageIn msg)

Definition at line 44 of file battlegroundrecv.cpp.

45 {
46  if (actorManager == nullptr)
47  return;
48  const BeingId id = msg.readBeingId("account id");
49  msg.readString(24, "name");
50  msg.readInt16("bg id");
51  const int teamId = msg.readInt16("team id");
52 
53  Being *const dstBeing = actorManager->findBeing(id);
54  if (dstBeing != nullptr)
55  dstBeing->setTeamId(CAST_U16(teamId));
56 }
ActorManager * actorManager
int BeingId
Definition: beingid.h:30
#define CAST_U16
Definition: cast.h:29
Being * findBeing(const BeingId id) const
Definition: being.h:96
void setTeamId(const uint16_t teamId)
Definition: being.cpp:5187

References actorManager, CAST_U16, ActorManager::findBeing(), Actions::msg(), and Being::setTeamId().

◆ processBattleJoined()

void EAthena::BattleGroundRecv::processBattleJoined ( Net::MessageIn msg)

Definition at line 102 of file battlegroundrecv.cpp.

103 {
105  msg.readString(24, "name");
106  msg.readInt32("position");
107 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleNoticeDelete()

void EAthena::BattleGroundRecv::processBattleNoticeDelete ( Net::MessageIn msg)

Definition at line 95 of file battlegroundrecv.cpp.

96 {
98  msg.readUInt8("type");
99  msg.readString(24, "bg name");
100 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattlePlay()

void EAthena::BattleGroundRecv::processBattlePlay ( Net::MessageIn msg)

Definition at line 75 of file battlegroundrecv.cpp.

76 {
78  msg.readString(24, "battle ground name");
79 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleQueueAck()

void EAthena::BattleGroundRecv::processBattleQueueAck ( Net::MessageIn msg)

Definition at line 81 of file battlegroundrecv.cpp.

82 {
84  msg.readUInt8("type");
85  msg.readString(24, "bg name");
86 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleUpdateCoords()

void EAthena::BattleGroundRecv::processBattleUpdateCoords ( Net::MessageIn msg)

Definition at line 65 of file battlegroundrecv.cpp.

66 {
68  msg.readBeingId("account id");
69  msg.readString(24, "name");
70  msg.readInt16("class");
71  msg.readInt16("x");
72  msg.readInt16("y");
73 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleUpdateHp()

void EAthena::BattleGroundRecv::processBattleUpdateHp ( Net::MessageIn msg)

Definition at line 109 of file battlegroundrecv.cpp.

110 {
112  msg.readBeingId("account id");
113  if (msg.getVersion() >= 20140613)
114  {
115  msg.readInt32("hp");
116  msg.readInt32("max hp");
117  }
118  else
119  {
120  msg.readString(24, "name");
121  msg.readInt16("hp");
122  msg.readInt16("max hp");
123  }
124 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.

◆ processBattleUpdateScore()

void EAthena::BattleGroundRecv::processBattleUpdateScore ( Net::MessageIn msg)

Definition at line 58 of file battlegroundrecv.cpp.

59 {
61  msg.readInt16("camp a points");
62  msg.readInt16("camp b points");
63 }

References Actions::msg(), and UNIMPLEMENTEDPACKET.