ManaPlus
Public Member Functions
EAthena::BeingHandler Class Reference

#include <beinghandler.h>

Inheritance diagram for EAthena::BeingHandler:
Ea::BeingHandler Net::BeingHandler

Public Member Functions

 BeingHandler ()
 
 ~BeingHandler ()
 
void requestNameById (const BeingId id) const
 
void undress (Being *const being) const
 
void requestRanks (const RankT rank) const
 
void requestNameByCharId (const int id) const
 
void viewPlayerEquipment (const Being *const being) const
 
- Public Member Functions inherited from Net::BeingHandler
 BeingHandler ()
 

Additional Inherited Members

- Protected Member Functions inherited from Ea::BeingHandler
 BeingHandler ()
 

Detailed Description

Definition at line 32 of file beinghandler.h.

Constructor & Destructor Documentation

◆ BeingHandler()

EAthena::BeingHandler::BeingHandler ( )

Definition at line 38 of file beinghandler.cpp.

38  :
40 {
41  beingHandler = this;
42 }
Net::BeingHandler * beingHandler
Definition: net.cpp:99

References beingHandler.

◆ ~BeingHandler()

EAthena::BeingHandler::~BeingHandler ( )
virtual

Reimplemented from Net::BeingHandler.

Definition at line 44 of file beinghandler.cpp.

45 {
46  beingHandler = nullptr;
47 }

References beingHandler.

Member Function Documentation

◆ requestNameByCharId()

void EAthena::BeingHandler::requestNameByCharId ( const int  id) const
virtual

Implements Net::BeingHandler.

Definition at line 99 of file beinghandler.cpp.

100 {
101  createOutPacket(CMSG_SOLVE_CHAR_NAME);
102  if (packetVersion >= 20080827 && packetVersion < 20101124)
103  {
104  outMsg.writeInt32(9, "unused");
105  outMsg.writeInt32(9, "unused");
106  }
107  outMsg.writeInt32(id, "character id");
108 }
int packetVersion
Definition: client.cpp:125
#define createOutPacket(name)
Definition: messageout.h:37

References createOutPacket, and packetVersion.

◆ requestNameById()

void EAthena::BeingHandler::requestNameById ( const BeingId  id) const
virtual

Implements Net::BeingHandler.

Definition at line 49 of file beinghandler.cpp.

50 {
51  createOutPacket(CMSG_NAME_REQUEST);
52  if (packetVersion >= 20080827 && packetVersion < 20101124)
53  {
54  outMsg.writeInt32(0, "unused");
55  outMsg.writeInt32(0, "unused");
56  }
57  outMsg.writeBeingId(id, "being id");
58 }

References createOutPacket, and packetVersion.

◆ requestRanks()

void EAthena::BeingHandler::requestRanks ( const RankT  rank) const
virtual

Implements Net::BeingHandler.

Definition at line 81 of file beinghandler.cpp.

82 {
83  if (packetVersion < 20130605)
84  return;
85 
86  createOutPacket(CMSG_REQUEST_RANKS);
87  outMsg.writeInt16(CAST_S16(rank), "type");
88 }
#define CAST_S16
Definition: cast.h:28

References CAST_S16, createOutPacket, and packetVersion.

◆ undress()

void EAthena::BeingHandler::undress ( Being *const  being) const
virtual

Implements Net::BeingHandler.

Definition at line 60 of file beinghandler.cpp.

61 {
62  if (being == nullptr)
63  return;
64  being->unSetSprite(SPRITE_WEAPON);
69  being->unSetSprite(SPRITE_SHIELD);
70  being->unSetSprite(SPRITE_FLOOR);
71  being->unSetSprite(SPRITE_ROBE);
72  being->unSetSprite(SPRITE_EVOL2);
73  being->unSetSprite(SPRITE_EVOL3);
74  being->unSetSprite(SPRITE_EVOL4);
75  being->unSetSprite(SPRITE_EVOL5);
76  being->unSetSprite(SPRITE_EVOL6);
77  being->unSetSprite(SPRITE_HAIR);
78  being->unSetSprite(SPRITE_SHOES);
79 }
void unSetSprite(const unsigned int slot)
Definition: being.cpp:2861
@ SPRITE_WEAPON
Definition: sprite.h:31
@ SPRITE_FLOOR
Definition: sprite.h:40
@ SPRITE_HEAD_TOP
Definition: sprite.h:33
@ SPRITE_SHOES
Definition: sprite.h:38
@ SPRITE_EVOL4
Definition: sprite.h:44
@ SPRITE_SHIELD
Definition: sprite.h:37
@ SPRITE_HEAD_MID
Definition: sprite.h:34
@ SPRITE_EVOL2
Definition: sprite.h:42
@ SPRITE_CLOTHES_COLOR
Definition: sprite.h:36
@ SPRITE_EVOL3
Definition: sprite.h:43
@ SPRITE_ROBE
Definition: sprite.h:41
@ SPRITE_EVOL5
Definition: sprite.h:45
@ SPRITE_HEAD_BOTTOM
Definition: sprite.h:32
@ SPRITE_EVOL6
Definition: sprite.h:46

References SPRITE_CLOTHES_COLOR, SPRITE_EVOL2, SPRITE_EVOL3, SPRITE_EVOL4, SPRITE_EVOL5, SPRITE_EVOL6, SPRITE_FLOOR, ItemDbType::SPRITE_HAIR, SPRITE_HEAD_BOTTOM, SPRITE_HEAD_MID, SPRITE_HEAD_TOP, SPRITE_ROBE, SPRITE_SHIELD, SPRITE_SHOES, SPRITE_WEAPON, and Being::unSetSprite().

◆ viewPlayerEquipment()

void EAthena::BeingHandler::viewPlayerEquipment ( const Being *const  being) const
virtual

Implements Net::BeingHandler.

Definition at line 90 of file beinghandler.cpp.

91 {
92  if (being == nullptr)
93  return;
94 
95  createOutPacket(CMSG_PLAYER_VIEW_EQUIPMENT);
96  outMsg.writeBeingId(being->getId(), "account id");
97 }
BeingId getId() const
Definition: actorsprite.h:64

References createOutPacket, and ActorSprite::getId().


The documentation for this class was generated from the following files: