ManaPlus
playerhandler.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2018 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
24 
25 #include "notifymanager.h"
26 #include "party.h"
27 
28 #include "being/localplayer.h"
29 #include "being/playerinfo.h"
30 
31 #include "const/net/nostat.h"
32 
34 
37 
39 
40 #include "net/eathena/messageout.h"
42 #include "net/eathena/sp.h"
43 
44 #include "resources/db/unitsdb.h"
45 
46 #include "debug.h"
47 
48 extern int packetVersion;
49 extern int serverVersion;
50 
51 namespace EAthena
52 {
53 
55  Ea::PlayerHandler()
56 {
57  playerHandler = this;
58 }
59 
61 {
62  playerHandler = nullptr;
63 }
64 
66  const Keep keep) const
67 {
69  outMsg.writeBeingId(id, "target id");
70  if (keep == Keep_true)
71  outMsg.writeInt8(7, "action");
72  else
73  outMsg.writeInt8(0, "action");
74 }
75 
77 {
79 }
80 
81 void PlayerHandler::emote(const uint8_t emoteId) const
82 {
84  outMsg.writeInt8(emoteId, "emote id");
85 }
86 
88  const int amount) const
89 {
90  if (attr >= Attributes::PLAYER_STR && attr <= Attributes::PLAYER_LUK)
91  {
93  outMsg.writeInt16(CAST_S16(attr), "attribute id");
94  outMsg.writeInt8(CAST_S8(amount), "increase");
95  }
96 }
97 
98 void PlayerHandler::increaseSkill(const uint16_t skillId) const
99 {
101  return;
102 
104  outMsg.writeInt16(skillId, "skill id");
105 }
106 
107 void PlayerHandler::pickUp(const FloorItem *const floorItem) const
108 {
109  if (floorItem == nullptr)
110  return;
111 
113  const BeingId id = floorItem->getId();
114  if (packetVersion >= 20101124)
115  {
116  outMsg.writeBeingId(id, "object id");
117  }
118  else if (packetVersion >= 20080827)
119  {
120  outMsg.writeInt32(0, "unused");
121  outMsg.writeInt8(0, "unused");
122  outMsg.writeBeingId(id, "object id");
123  }
124  else if (packetVersion >= 20070212)
125  {
126  outMsg.writeInt32(0, "unused");
127  outMsg.writeBeingId(id, "object id");
128  }
129  else if (packetVersion >= 20070108)
130  {
131  outMsg.writeInt32(0, "unused");
132  outMsg.writeInt8(0, "unused");
133  outMsg.writeBeingId(id, "object id");
134  }
135  else if (packetVersion >= 20050719)
136  {
137  outMsg.writeInt32(0, "unused");
138  outMsg.writeInt16(0, "unused");
139  outMsg.writeInt8(0, "unused");
140  outMsg.writeBeingId(id, "object id");
141  }
142  else if (packetVersion >= 20050718)
143  {
144  outMsg.writeInt8(0, "unused");
145  outMsg.writeBeingId(id, "object id");
146  }
147  else if (packetVersion >= 20050628)
148  {
149  outMsg.writeInt32(0, "unused");
150  outMsg.writeInt8(0, "unused");
151  outMsg.writeBeingId(id, "object id");
152  }
153  else if (packetVersion >= 20050509)
154  {
155  outMsg.writeInt16(0, "unused");
156  outMsg.writeBeingId(id, "object id");
157  }
158  else if (packetVersion >= 20050110)
159  {
160  outMsg.writeInt16(0, "unused");
161  outMsg.writeInt8(0, "unused");
162  outMsg.writeBeingId(id, "object id");
163  }
164  else if (packetVersion >= 20041129)
165  {
166  outMsg.writeInt8(0, "unused");
167  outMsg.writeBeingId(id, "object id");
168  }
169  else if (packetVersion >= 20041025)
170  {
171  outMsg.writeInt16(0, "unused");
172  outMsg.writeInt8(0, "unused");
173  outMsg.writeBeingId(id, "object id");
174  }
175  else if (packetVersion >= 20041005)
176  {
177  outMsg.writeInt32(0, "unused");
178  outMsg.writeBeingId(id, "object id");
179  }
180  else if (packetVersion >= 20040920)
181  {
182  outMsg.writeInt32(0, "unused");
183  outMsg.writeInt32(0, "unused");
184  outMsg.writeBeingId(id, "object id");
185  }
186  else if (packetVersion >= 20040906)
187  {
188  outMsg.writeInt32(0, "unused");
189  outMsg.writeInt8(0, "unused");
190  outMsg.writeBeingId(id, "object id");
191  }
192  else if (packetVersion >= 20040809)
193  {
194  outMsg.writeInt32(0, "unused");
195  outMsg.writeInt16(0, "unused");
196  outMsg.writeInt8(0, "unused");
197  outMsg.writeBeingId(id, "object id");
198  }
199  else if (packetVersion >= 20040713)
200  {
201  outMsg.writeInt32(0, "unused");
202  outMsg.writeBeingId(id, "object id");
203  }
204  else
205  {
206  outMsg.writeBeingId(id, "object id");
207  }
208 
210 }
211 
212 void PlayerHandler::setDirection(const unsigned char direction) const
213 {
215  if (packetVersion >= 20101124)
216  {
217  outMsg.writeInt8(0, "head direction");
218  outMsg.writeInt8(0, "unused");
219  outMsg.writeInt8(MessageOut::toServerDirection(direction),
220  "player direction");
221  }
222  else if (packetVersion >= 20080827)
223  {
224  outMsg.writeInt16(0, "unused");
225  outMsg.writeInt8(0, "head direction");
226  outMsg.writeInt32(0, "unused");
227  outMsg.writeInt8(MessageOut::toServerDirection(direction),
228  "player direction");
229  }
230  else if (packetVersion >= 20070212)
231  {
232  outMsg.writeInt32(0, "unused");
233  outMsg.writeInt16(0, "unused");
234  outMsg.writeInt8(0, "head direction");
235  outMsg.writeInt16(0, "unused");
236  outMsg.writeInt8(MessageOut::toServerDirection(direction),
237  "player direction");
238  }
239  else if (packetVersion >= 20070108)
240  {
241  outMsg.writeInt32(0, "unused");
242  outMsg.writeInt32(0, "unused");
243  outMsg.writeInt8(0, "head direction");
244  outMsg.writeInt16(0, "unused");
245  outMsg.writeInt8(MessageOut::toServerDirection(direction),
246  "player direction");
247  }
248  else if (packetVersion >= 20060327)
249  {
250  outMsg.writeInt32(0, "unused");
251  outMsg.writeInt8(0, "unused");
252  outMsg.writeInt8(0, "head direction");
253  outMsg.writeInt8(0, "unused");
254  outMsg.writeInt16(0, "unused");
255  outMsg.writeInt8(MessageOut::toServerDirection(direction),
256  "player direction");
257  }
258  else if (packetVersion >= 20050719)
259  {
260  outMsg.writeInt32(0, "unused");
261  outMsg.writeInt16(0, "unused");
262  outMsg.writeInt8(0, "head direction");
263  outMsg.writeInt8(0, "unused");
264  outMsg.writeInt32(0, "unused");
265  outMsg.writeInt16(0, "unused");
266  outMsg.writeInt8(MessageOut::toServerDirection(direction),
267  "player direction");
268  }
269  else if (packetVersion >= 20050718)
270  {
271  outMsg.writeInt32(0, "unused");
272  outMsg.writeInt8(0, "head direction");
273  outMsg.writeInt8(0, "unused");
274  outMsg.writeInt16(0, "unused");
275  outMsg.writeInt8(MessageOut::toServerDirection(direction),
276  "player direction");
277  }
278  else if (packetVersion >= 20050628)
279  {
280  outMsg.writeInt32(0, "unused");
281  outMsg.writeInt16(0, "unused");
282  outMsg.writeInt8(0, "head direction");
283  outMsg.writeInt8(0, "unused");
284  outMsg.writeInt32(0, "unused");
285  outMsg.writeInt16(0, "unused");
286  outMsg.writeInt8(MessageOut::toServerDirection(direction),
287  "player direction");
288  }
289  else if (packetVersion >= 20050509)
290  {
291  outMsg.writeInt8(0, "unused");
292  outMsg.writeInt32(0, "unused");
293  outMsg.writeInt16(0, "unused");
294  outMsg.writeInt8(0, "head direction");
295  outMsg.writeInt8(0, "unused");
296  outMsg.writeInt16(0, "unused");
297  outMsg.writeInt8(MessageOut::toServerDirection(direction),
298  "player direction");
299  }
300  else if (packetVersion >= 20050110)
301  {
302  outMsg.writeInt32(0, "unused");
303  outMsg.writeInt32(0, "unused");
304  outMsg.writeInt16(0, "unused");
305  outMsg.writeInt8(0, "head direction");
306  outMsg.writeInt8(0, "unused");
307  outMsg.writeInt32(0, "unused");
308  outMsg.writeInt32(0, "unused");
309  outMsg.writeInt8(MessageOut::toServerDirection(direction),
310  "player direction");
311  }
312  else if (packetVersion >= 20041129)
313  {
314  outMsg.writeInt8(0, "unused");
315  outMsg.writeInt8(0, "head direction");
316  outMsg.writeInt8(0, "unused");
317  outMsg.writeInt16(0, "unused");
318  outMsg.writeInt8(MessageOut::toServerDirection(direction),
319  "player direction");
320  }
321  else if (packetVersion >= 20041025)
322  {
323  outMsg.writeInt32(0, "unused");
324  outMsg.writeInt8(0, "head direction");
325  outMsg.writeInt8(0, "unused");
326  outMsg.writeInt32(0, "unused");
327  outMsg.writeInt16(0, "unused");
328  outMsg.writeInt8(MessageOut::toServerDirection(direction),
329  "player direction");
330  }
331  else if (packetVersion >= 20041005)
332  {
333  outMsg.writeInt16(0, "unused");
334  outMsg.writeInt8(0, "unused");
335  outMsg.writeInt8(0, "head direction");
336  outMsg.writeInt32(0, "unused");
337  outMsg.writeInt16(0, "unused");
338  outMsg.writeInt8(MessageOut::toServerDirection(direction),
339  "player direction");
340  }
341  else if (packetVersion >= 20040920)
342  {
343  outMsg.writeInt32(0, "unused");
344  outMsg.writeInt16(0, "unused");
345  outMsg.writeInt8(0, "head direction");
346  outMsg.writeInt32(0, "unused");
347  outMsg.writeInt32(0, "unused");
348  outMsg.writeInt8(MessageOut::toServerDirection(direction),
349  "player direction");
350  }
351  else if (packetVersion >= 20040906)
352  {
353  outMsg.writeInt16(0, "unused");
354  outMsg.writeInt8(0, "head direction");
355  outMsg.writeInt16(0, "unused");
356  outMsg.writeInt16(0, "unused");
357  outMsg.writeInt8(MessageOut::toServerDirection(direction),
358  "player direction");
359  }
360  else if (packetVersion >= 20040809)
361  {
362  outMsg.writeInt16(0, "unused");
363  outMsg.writeInt16(0, "unused");
364  outMsg.writeInt8(0, "unused");
365  outMsg.writeInt8(0, "head direction");
366  outMsg.writeInt16(0, "unused");
367  outMsg.writeInt8(0, "unused");
368  outMsg.writeInt8(MessageOut::toServerDirection(direction),
369  "player direction");
370  }
371  else if (packetVersion >= 20040713)
372  {
373  outMsg.writeInt8(0, "unused");
374  outMsg.writeInt8(0, "unused");
375  outMsg.writeInt8(0, "unused");
376  outMsg.writeInt8(0, "head direction");
377  outMsg.writeInt16(0, "unused");
378  outMsg.writeInt16(0, "unused");
379  outMsg.writeInt16(0, "unused");
380  outMsg.writeInt8(MessageOut::toServerDirection(direction),
381  "player direction");
382  }
383  else
384  {
385  outMsg.writeInt8(0, "head direction");
386  outMsg.writeInt8(0, "unused");
387  outMsg.writeInt8(MessageOut::toServerDirection(direction),
388  "player direction");
389  }
390 }
391 
392 void PlayerHandler::setDestination(const int x, const int y,
393  const int direction) const
394 {
396  if (packetVersion >= 20080827 && packetVersion < 20101124)
397  outMsg.writeInt32(0, "unused");
398  outMsg.writeCoordinates(CAST_U16(x),
399  CAST_U16(y),
400  CAST_U8(direction), "destination");
401 }
402 
403 void PlayerHandler::changeAction(const BeingActionT &action) const
404 {
405  unsigned char type;
406  switch (action)
407  {
408  case BeingAction::SIT:
409  type = 2;
410  break;
411  case BeingAction::STAND:
413  type = 3;
414  break;
415  default:
416  case BeingAction::MOVE:
417  case BeingAction::ATTACK:
418  case BeingAction::DEAD:
419  case BeingAction::HURT:
420  case BeingAction::SPAWN:
421  case BeingAction::CAST:
422  return;
423  }
424 
426  outMsg.writeInt32(0, "unused");
427  outMsg.writeInt8(type, "action");
428 }
429 
431 {
433  outMsg.writeInt8(0, "action");
434 }
435 
437 {
439 }
440 
441 void PlayerHandler::updateStatus(const uint8_t status) const
442 {
444  outMsg.writeInt8(status, "status");
445  outMsg.writeInt8(0, "unused");
446 }
447 
448 void PlayerHandler::setShortcut(const int idx,
449  const uint8_t type,
450  const int id,
451  const int level) const
452 {
454  outMsg.writeInt16(CAST_S16(idx), "index");
455  outMsg.writeInt8(CAST_S8(type), "type");
456  outMsg.writeInt32(id, "id");
457  outMsg.writeInt16(CAST_S16(level), "level");
458 }
459 
460 void PlayerHandler::shortcutShiftRow(const int row) const
461 {
462  if (packetVersion < 20140129)
463  return;
465  outMsg.writeInt8(CAST_S8(row), "row");
466 }
467 
469 {
471 }
472 
473 void PlayerHandler::changeCart(const int type) const
474 {
476  outMsg.writeInt16(CAST_S16(type), "type");
477 }
478 
480 {
482 }
483 
485 {
487 }
488 
490 {
492 }
493 
495 {
497  outMsg.writeInt32(0, "char id");
498  outMsg.writeInt32(0, "account id");
499 }
500 
502 {
504 }
505 
506 void PlayerHandler::setViewEquipment(const bool allow) const
507 {
509  outMsg.writeInt32(0, "unused");
510  outMsg.writeInt32(allow ? 1 : 0, "allow");
511 }
512 
513 #define setStatComplex(stat) \
514  PlayerInfo::setStatBase(stat, CAST_S32(base), notify); \
515  if (mod != NoStat) \
516  PlayerInfo::setStatMod(stat, mod, Notify_true)
517 
519  const int type,
520  const int64_t base,
521  const int mod,
522  const Notify notify) const
523 {
524  switch (type)
525  {
526  case Sp::SPEED:
529  CAST_S32(base),
530  Notify_true);
532  0,
533  Notify_true);
534  break;
535  case Sp::BASEEXP:
537  base,
538  Notify_true);
539  break;
540  case Sp::JOBEXP:
542  base,
543  Notify_true);
544  break;
545  case Sp::KARMA:
547  CAST_S32(base),
548  Notify_true);
550  0,
551  Notify_true);
552  break;
553  case Sp::MANNER:
555  CAST_S32(base),
556  Notify_true);
558  0,
559  Notify_true);
560  break;
561  case Sp::HP:
563  base,
564  Notify_true);
565  if (localPlayer->isInParty() && (Party::getParty(1) != nullptr))
566  {
567  PartyMember *const m = Party::getParty(1)
569  if (m != nullptr)
570  {
571  m->setHp(CAST_S32(base));
574  }
575  }
576  break;
577  case Sp::MAXHP:
579  base,
580  Notify_true);
581 
582  if (localPlayer->isInParty() && (Party::getParty(1) != nullptr))
583  {
584  PartyMember *const m = Party::getParty(1)->getMember(
585  localPlayer->getId());
586  if (m != nullptr)
587  {
589  m->setMaxHp(CAST_S32(base));
590  }
591  }
592  break;
593  case Sp::SP:
595  base,
596  Notify_true);
597  break;
598  case Sp::MAXSP:
600  base,
601  Notify_true);
602  break;
603  case Sp::STATUSPOINT:
605  base,
606  Notify_true);
607  break;
608  case Sp::BASELEVEL:
610  base,
611  Notify_true);
612  if (localPlayer != nullptr)
613  {
614  localPlayer->setLevel(CAST_S32(base));
616  }
617  break;
618  case Sp::SKILLPOINT:
620  base,
621  Notify_true);
622  if (skillDialog != nullptr)
623  skillDialog->update();
624  break;
625  case Sp::STR:
627  break;
628  case Sp::AGI:
630  break;
631  case Sp::VIT:
633  break;
634  case Sp::INT:
636  break;
637  case Sp::DEX:
639  break;
640  case Sp::LUK:
642  break;
643  case Sp::ZENY:
644  {
645  const int oldMoney = PlayerInfo::getAttribute(Attributes::MONEY);
646  const int newMoney = CAST_S32(base);
647  if (newMoney > oldMoney)
648  {
650  UnitsDb::formatCurrency(newMoney - oldMoney));
651  }
652  else if (newMoney < oldMoney)
653  {
655  UnitsDb::formatCurrency(oldMoney - newMoney).c_str());
656  }
657 
659  newMoney,
660  Notify_true);
661  break;
662  }
663  case Sp::NEXTBASEEXP:
665  base,
666  Notify_true);
667  break;
668  case Sp::NEXTJOBEXP:
670  base,
671  Notify_true);
672  break;
673  case Sp::WEIGHT:
675  base,
676  Notify_true);
677  break;
678  case Sp::MAXWEIGHT:
680  base,
681  Notify_true);
682  break;
683  case Sp::USTR:
685  CAST_S32(base));
686  break;
687  case Sp::UAGI:
689  CAST_S32(base));
690  break;
691  case Sp::UVIT:
693  CAST_S32(base));
694  break;
695  case Sp::UINT:
697  CAST_S32(base));
698  break;
699  case Sp::UDEX:
701  CAST_S32(base));
702  break;
703  case Sp::ULUK:
705  CAST_S32(base));
706  break;
707 
708  case Sp::ATK1:
710  CAST_S32(base),
711  Notify_true);
713  break;
714  case Sp::ATK2:
716  CAST_S32(base),
717  Notify_true);
719  break;
720  case Sp::MATK1:
722  CAST_S32(base),
723  Notify_true);
724  break;
725  case Sp::MATK2:
727  CAST_S32(base),
728  Notify_true);
729  break;
730  case Sp::DEF1:
732  CAST_S32(base),
733  Notify_true);
734  break;
735  case Sp::DEF2:
737  CAST_S32(base),
738  Notify_true);
739  break;
740  case Sp::MDEF1:
742  CAST_S32(base),
743  Notify_true);
744  break;
745  case Sp::MDEF2:
747  CAST_S32(base),
748  Notify_true);
749  break;
750  case Sp::HIT:
752  CAST_S32(base),
753  Notify_true);
754  break;
755  case Sp::FLEE1:
757  CAST_S32(base),
758  Notify_true);
759  break;
760  case Sp::FLEE2:
762  CAST_S32(base),
763  Notify_true);
764  break;
765  case Sp::CRITICAL:
767  CAST_S32(base),
768  Notify_true);
769  break;
770  case Sp::ASPD:
773  CAST_S32(base),
774  Notify_true);
776  0,
777  Notify_true);
779  break;
780  case Sp::JOBLEVEL:
782  base,
783  Notify_true);
784  break;
785 
786  default:
788  break;
789  }
790 }
791 
792 void PlayerHandler::selectStyle(const int headColor,
793  const int headStyle,
794  const int bodyColor,
795  const int topStyle,
796  const int middleStyle,
797  const int bottomStyle) const
798 {
799  if (packetVersion < 20151104)
800  return;
802  outMsg.writeInt16(headColor, "head color");
803  outMsg.writeInt16(headStyle, "head style");
804  outMsg.writeInt16(bodyColor, "body color");
805  outMsg.writeInt16(topStyle, "top style");
806  outMsg.writeInt16(middleStyle, "middle style");
807  outMsg.writeInt16(bottomStyle, "bottom style");
808 }
809 
810 #undef setStatComplex
811 
812 } // namespace EAthena
int CMSG_SKILL_LEVELUP_REQUEST
Definition: protocolout.cpp:82
Net::PlayerHandler * playerHandler
Definition: net.cpp:92
Definition: sp.h:48
void setAttackSpeed(const int speed)
Definition: being.h:463
void setDestination(const int x, const int y, const int direction) const
void emote(const uint8_t emoteId) const
Definition: sp.h:73
int CMSG_CHANGE_CART
static void pushPickup(const BeingId floorId)
void setStatMod(const AttributesT id, const int value, const Notify notify)
Definition: playerinfo.cpp:157
BeingAction ::T BeingActionT
Definition: beingaction.h:40
#define CAST_U8
Definition: cast.h:26
Definition: sp.h:66
int CMSG_SET_STATUS
static unsigned char toServerDirection(unsigned char direction) A_CONST
Definition: messageout.cpp:230
void setStatBase(const AttributesT id, const int value, const Notify notify)
Definition: playerinfo.cpp:141
int CMSG_ONLINE_LIST
int CMSG_PLAYER_CHANGE_DEST
const bool Keep_true
Definition: keep.h:29
void changeAction(const BeingActionT &action) const
BeingId getId() const
Definition: actorsprite.h:63
Definition: sp.h:45
void increaseAttribute(const AttributesT attr, const int amount) const
Definition: sp.h:72
int BeingId
Definition: beingid.h:29
Definition: sp.h:81
std::string formatCurrency(const int value)
Definition: unitsdb.cpp:323
int CMSG_PLAYER_RESTART
Definition: sp.h:62
int packetVersion
Definition: client.cpp:124
int CMSG_PLAYER_AUTO_REVIVE
Definition: sp.h:46
StatusWindow * statusWindow
bool msg(InputEvent &event)
Definition: chat.cpp:38
void notify(const unsigned int message)
int CMSG_DORI_DORI
int CMSG_EXPLOSION_SPIRITS
void setWalkSpeed(const int speed)
Definition: being.h:451
void updateAttrs()
Definition: playerinfo.cpp:417
Definition: sp.h:30
Definition: sp.h:77
Definition: sp.h:33
void setDirection(const unsigned char direction) const
int CMSG_PLAYER_SELECT_STYLE
void attack(const BeingId id, const Keep keep) const
int CMSG_PLAYER_SET_EQUIPMENT_VISIBLE
Definition: protocolout.cpp:96
void requestOnlineList() const
int serverVersion
Definition: client.cpp:123
Definition: sp.h:67
Definition: sp.h:31
#define CAST_U16
Definition: cast.h:28
Definition: sp.h:32
Definition: sp.h:43
#define CAST_S32
Definition: cast.h:29
int CMSG_PLAYER_CHANGE_DIR
Definition: protocolout.cpp:99
Definition: sp.h:78
void setViewEquipment(const bool allow) const
std::string update(const int id)
Definition: sp.h:54
void changeCart(const int type) const
void setHp(const int hp)
Definition: avatar.h:92
static Party * getParty(const int16_t id)
Definition: party.cpp:312
#define setStatComplex(stat)
LocalPlayer * localPlayer
void setAttribute(const AttributesT id, const int64_t value, const Notify notify)
Definition: playerinfo.cpp:108
Definition: sp.h:80
Definition: sp.h:35
PartyMember * getMember(const BeingId id) const
Definition: party.cpp:98
void explosionSpirits() const
void increaseSkill(const uint16_t skillId) const
Definition: sp.h:64
#define CAST_S8
Definition: cast.h:25
Definition: sp.h:50
int CMSG_REMOVE_OPTION
bool isInParty() const
Definition: being.h:320
Definition: sp.h:71
int CMSG_STAT_UPDATE_REQUEST
Definition: protocolout.cpp:83
#define createOutPacket(name)
Definition: messageout.h:36
Definition: sp.h:65
Definition: sp.h:37
int CMSG_PVP_INFO
Definition: sp.h:63
void updateName()
Definition: being.cpp:3425
SkillDialog * skillDialog
Definition: skilldialog.cpp:65
int CMSG_PLAYER_SET_MEMO
Definition: sp.h:38
void shortcutShiftRow(const int row) const
void selectStyle(const int headColor, const int headStyle, const int bodyColor, const int topStyle, const int middleStyle, const int bottomStyle) const
void updateStatus(const uint8_t status) const
Definition: sp.h:36
void pickUp(const FloorItem *const floorItem) const
void setShortcut(const int idx, const uint8_t type, const int id, const int level) const
int CMSG_PLAYER_CHANGE_ACT
Attributes ::T AttributesT
Definition: attributes.h:117
Definition: sp.h:83
Definition: sp.h:34
int CMSG_SHORTCUTS_ROW_SHIFT
int CMSG_SET_SHORTCUTS
#define CAST_S16
Definition: cast.h:27
int CMSG_ITEM_PICKUP
Definition: protocolout.cpp:98
void setMaxHp(const int maxHp)
Definition: avatar.h:98
Definition: sp.h:76
int32_t getAttribute(const AttributesT id)
Definition: playerinfo.cpp:100
Definition: sp.h:47
int CMSG_PLAYER_STOP_ATTACK
Definition: sp.h:44
Definition: sp.h:79
const bool Notify_true
Definition: notify.h:29
Definition: sp.h:74
#define UNIMPLEMENTEDPACKETFIELD(field)
Definition: logger.h:58
void setLevel(const int n)
Definition: being.h:600
void setStat(Net::MessageIn &msg, const int type, const int64_t base, const int mod, const Notify notify) const
Definition: sp.h:75
void setPointsNeeded(const AttributesT id, const int needed)
int CMSG_PLAYER_EMOTE