ManaPlus
Functions
EAthena::ElementalRecv Namespace Reference

Functions

void processElementalUpdateStatus (Net::MessageIn &msg)
 
void processElementalInfo (Net::MessageIn &msg)
 

Function Documentation

◆ processElementalInfo()

void EAthena::ElementalRecv::processElementalInfo ( Net::MessageIn msg)

Definition at line 61 of file elementalrecv.cpp.

62 {
63  const BeingId id = msg.readBeingId("elemental id");
65  msg.readInt32("hp"),
66  Notify_true);
68  msg.readInt32("max hp"),
69  Notify_true);
71  msg.readInt32("sp"),
72  Notify_true);
74  msg.readInt32("max sp"),
75  Notify_true);
77 }
int BeingId
Definition: beingid.h:30
bool msg(InputEvent &event)
Definition: chat.cpp:39
@ ELEMENTAL_MAX_MP
Definition: attributes.h:114
@ ELEMENTAL_MAX_HP
Definition: attributes.h:112
void setElemental(const BeingId id)
Definition: playerinfo.cpp:539
void setStatBase(const AttributesT id, const int value, const Notify notify)
Definition: playerinfo.cpp:143
const bool Notify_true
Definition: notify.h:30

References Attributes::ELEMENTAL_HP, Attributes::ELEMENTAL_MAX_HP, Attributes::ELEMENTAL_MAX_MP, Attributes::ELEMENTAL_MP, Actions::msg(), Notify_true, PlayerInfo::setElemental(), and PlayerInfo::setStatBase().

◆ processElementalUpdateStatus()

void EAthena::ElementalRecv::processElementalUpdateStatus ( Net::MessageIn msg)

Definition at line 44 of file elementalrecv.cpp.

45 {
46  const int sp = msg.readInt16("type");
47  const int val = msg.readInt32("value");
48  switch (sp)
49  {
54  default:
55  reportAlways("Unknown elemental stat %d",
56  sp)
57  break;
58  }
59 }
#define reportAlways(...)
Definition: checkutils.h:253
#define setElementalStat(sp, stat)
@ MAXSP
Definition: sp.h:39
@ SP
Definition: sp.h:38
@ HP
Definition: sp.h:36
@ MAXHP
Definition: sp.h:37

References Attributes::ELEMENTAL_HP, Attributes::ELEMENTAL_MAX_HP, Attributes::ELEMENTAL_MAX_MP, Attributes::ELEMENTAL_MP, Sp::HP, Sp::MAXHP, Sp::MAXSP, Actions::msg(), reportAlways, setElementalStat, and Sp::SP.