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 packetVersionMain;
50 extern int packetVersionRe;
51 extern int packetVersionZero;
52 extern int serverVersion;
53 
54 namespace EAthena
55 {
56 
58  Ea::PlayerHandler()
59 {
60  playerHandler = this;
61 }
62 
64 {
65  playerHandler = nullptr;
66 }
67 
69  const Keep keep) const
70 {
72  outMsg.writeBeingId(id, "target id");
73  if (keep == Keep_true)
74  outMsg.writeInt8(7, "action");
75  else
76  outMsg.writeInt8(0, "action");
77 }
78 
80 {
82 }
83 
84 void PlayerHandler::emote(const uint8_t emoteId) const
85 {
87  outMsg.writeInt8(emoteId, "emote id");
88 }
89 
91  const int amount) const
92 {
93  if (attr >= Attributes::PLAYER_STR && attr <= Attributes::PLAYER_LUK)
94  {
96  outMsg.writeInt16(CAST_S16(attr), "attribute id");
97  outMsg.writeInt8(CAST_S8(amount), "increase");
98  }
99 }
100 
101 void PlayerHandler::increaseSkill(const uint16_t skillId) const
102 {
104  return;
105 
107  outMsg.writeInt16(skillId, "skill id");
108 }
109 
110 void PlayerHandler::pickUp(const FloorItem *const floorItem) const
111 {
112  if (floorItem == nullptr)
113  return;
114 
116  const BeingId id = floorItem->getId();
117  if (packetVersion >= 20101124)
118  {
119  outMsg.writeBeingId(id, "object id");
120  }
121  else if (packetVersion >= 20080827)
122  {
123  outMsg.writeInt32(0, "unused");
124  outMsg.writeInt8(0, "unused");
125  outMsg.writeBeingId(id, "object id");
126  }
127  else if (packetVersion >= 20070212)
128  {
129  outMsg.writeInt32(0, "unused");
130  outMsg.writeBeingId(id, "object id");
131  }
132  else if (packetVersion >= 20070108)
133  {
134  outMsg.writeInt32(0, "unused");
135  outMsg.writeInt8(0, "unused");
136  outMsg.writeBeingId(id, "object id");
137  }
138  else if (packetVersion >= 20050719)
139  {
140  outMsg.writeInt32(0, "unused");
141  outMsg.writeInt16(0, "unused");
142  outMsg.writeInt8(0, "unused");
143  outMsg.writeBeingId(id, "object id");
144  }
145  else if (packetVersion >= 20050718)
146  {
147  outMsg.writeInt8(0, "unused");
148  outMsg.writeBeingId(id, "object id");
149  }
150  else if (packetVersion >= 20050628)
151  {
152  outMsg.writeInt32(0, "unused");
153  outMsg.writeInt8(0, "unused");
154  outMsg.writeBeingId(id, "object id");
155  }
156  else if (packetVersion >= 20050509)
157  {
158  outMsg.writeInt16(0, "unused");
159  outMsg.writeBeingId(id, "object id");
160  }
161  else if (packetVersion >= 20050110)
162  {
163  outMsg.writeInt16(0, "unused");
164  outMsg.writeInt8(0, "unused");
165  outMsg.writeBeingId(id, "object id");
166  }
167  else if (packetVersion >= 20041129)
168  {
169  outMsg.writeInt8(0, "unused");
170  outMsg.writeBeingId(id, "object id");
171  }
172  else if (packetVersion >= 20041025)
173  {
174  outMsg.writeInt16(0, "unused");
175  outMsg.writeInt8(0, "unused");
176  outMsg.writeBeingId(id, "object id");
177  }
178  else if (packetVersion >= 20041005)
179  {
180  outMsg.writeInt32(0, "unused");
181  outMsg.writeBeingId(id, "object id");
182  }
183  else if (packetVersion >= 20040920)
184  {
185  outMsg.writeInt32(0, "unused");
186  outMsg.writeInt32(0, "unused");
187  outMsg.writeBeingId(id, "object id");
188  }
189  else if (packetVersion >= 20040906)
190  {
191  outMsg.writeInt32(0, "unused");
192  outMsg.writeInt8(0, "unused");
193  outMsg.writeBeingId(id, "object id");
194  }
195  else if (packetVersion >= 20040809)
196  {
197  outMsg.writeInt32(0, "unused");
198  outMsg.writeInt16(0, "unused");
199  outMsg.writeInt8(0, "unused");
200  outMsg.writeBeingId(id, "object id");
201  }
202  else if (packetVersion >= 20040713)
203  {
204  outMsg.writeInt32(0, "unused");
205  outMsg.writeBeingId(id, "object id");
206  }
207  else
208  {
209  outMsg.writeBeingId(id, "object id");
210  }
211 
213 }
214 
215 void PlayerHandler::setDirection(const unsigned char direction) const
216 {
218  if (packetVersion >= 20101124)
219  {
220  outMsg.writeInt8(0, "head direction");
221  outMsg.writeInt8(0, "unused");
222  outMsg.writeInt8(MessageOut::toServerDirection(direction),
223  "player direction");
224  }
225  else if (packetVersion >= 20080827)
226  {
227  outMsg.writeInt16(0, "unused");
228  outMsg.writeInt8(0, "head direction");
229  outMsg.writeInt32(0, "unused");
230  outMsg.writeInt8(MessageOut::toServerDirection(direction),
231  "player direction");
232  }
233  else if (packetVersion >= 20070212)
234  {
235  outMsg.writeInt32(0, "unused");
236  outMsg.writeInt16(0, "unused");
237  outMsg.writeInt8(0, "head direction");
238  outMsg.writeInt16(0, "unused");
239  outMsg.writeInt8(MessageOut::toServerDirection(direction),
240  "player direction");
241  }
242  else if (packetVersion >= 20070108)
243  {
244  outMsg.writeInt32(0, "unused");
245  outMsg.writeInt32(0, "unused");
246  outMsg.writeInt8(0, "head direction");
247  outMsg.writeInt16(0, "unused");
248  outMsg.writeInt8(MessageOut::toServerDirection(direction),
249  "player direction");
250  }
251  else if (packetVersion >= 20060327)
252  {
253  outMsg.writeInt32(0, "unused");
254  outMsg.writeInt8(0, "unused");
255  outMsg.writeInt8(0, "head direction");
256  outMsg.writeInt8(0, "unused");
257  outMsg.writeInt16(0, "unused");
258  outMsg.writeInt8(MessageOut::toServerDirection(direction),
259  "player direction");
260  }
261  else if (packetVersion >= 20050719)
262  {
263  outMsg.writeInt32(0, "unused");
264  outMsg.writeInt16(0, "unused");
265  outMsg.writeInt8(0, "head direction");
266  outMsg.writeInt8(0, "unused");
267  outMsg.writeInt32(0, "unused");
268  outMsg.writeInt16(0, "unused");
269  outMsg.writeInt8(MessageOut::toServerDirection(direction),
270  "player direction");
271  }
272  else if (packetVersion >= 20050718)
273  {
274  outMsg.writeInt32(0, "unused");
275  outMsg.writeInt8(0, "head direction");
276  outMsg.writeInt8(0, "unused");
277  outMsg.writeInt16(0, "unused");
278  outMsg.writeInt8(MessageOut::toServerDirection(direction),
279  "player direction");
280  }
281  else if (packetVersion >= 20050628)
282  {
283  outMsg.writeInt32(0, "unused");
284  outMsg.writeInt16(0, "unused");
285  outMsg.writeInt8(0, "head direction");
286  outMsg.writeInt8(0, "unused");
287  outMsg.writeInt32(0, "unused");
288  outMsg.writeInt16(0, "unused");
289  outMsg.writeInt8(MessageOut::toServerDirection(direction),
290  "player direction");
291  }
292  else if (packetVersion >= 20050509)
293  {
294  outMsg.writeInt8(0, "unused");
295  outMsg.writeInt32(0, "unused");
296  outMsg.writeInt16(0, "unused");
297  outMsg.writeInt8(0, "head direction");
298  outMsg.writeInt8(0, "unused");
299  outMsg.writeInt16(0, "unused");
300  outMsg.writeInt8(MessageOut::toServerDirection(direction),
301  "player direction");
302  }
303  else if (packetVersion >= 20050110)
304  {
305  outMsg.writeInt32(0, "unused");
306  outMsg.writeInt32(0, "unused");
307  outMsg.writeInt16(0, "unused");
308  outMsg.writeInt8(0, "head direction");
309  outMsg.writeInt8(0, "unused");
310  outMsg.writeInt32(0, "unused");
311  outMsg.writeInt32(0, "unused");
312  outMsg.writeInt8(MessageOut::toServerDirection(direction),
313  "player direction");
314  }
315  else if (packetVersion >= 20041129)
316  {
317  outMsg.writeInt8(0, "unused");
318  outMsg.writeInt8(0, "head direction");
319  outMsg.writeInt8(0, "unused");
320  outMsg.writeInt16(0, "unused");
321  outMsg.writeInt8(MessageOut::toServerDirection(direction),
322  "player direction");
323  }
324  else if (packetVersion >= 20041025)
325  {
326  outMsg.writeInt32(0, "unused");
327  outMsg.writeInt8(0, "head direction");
328  outMsg.writeInt8(0, "unused");
329  outMsg.writeInt32(0, "unused");
330  outMsg.writeInt16(0, "unused");
331  outMsg.writeInt8(MessageOut::toServerDirection(direction),
332  "player direction");
333  }
334  else if (packetVersion >= 20041005)
335  {
336  outMsg.writeInt16(0, "unused");
337  outMsg.writeInt8(0, "unused");
338  outMsg.writeInt8(0, "head direction");
339  outMsg.writeInt32(0, "unused");
340  outMsg.writeInt16(0, "unused");
341  outMsg.writeInt8(MessageOut::toServerDirection(direction),
342  "player direction");
343  }
344  else if (packetVersion >= 20040920)
345  {
346  outMsg.writeInt32(0, "unused");
347  outMsg.writeInt16(0, "unused");
348  outMsg.writeInt8(0, "head direction");
349  outMsg.writeInt32(0, "unused");
350  outMsg.writeInt32(0, "unused");
351  outMsg.writeInt8(MessageOut::toServerDirection(direction),
352  "player direction");
353  }
354  else if (packetVersion >= 20040906)
355  {
356  outMsg.writeInt16(0, "unused");
357  outMsg.writeInt8(0, "head direction");
358  outMsg.writeInt16(0, "unused");
359  outMsg.writeInt16(0, "unused");
360  outMsg.writeInt8(MessageOut::toServerDirection(direction),
361  "player direction");
362  }
363  else if (packetVersion >= 20040809)
364  {
365  outMsg.writeInt16(0, "unused");
366  outMsg.writeInt16(0, "unused");
367  outMsg.writeInt8(0, "unused");
368  outMsg.writeInt8(0, "head direction");
369  outMsg.writeInt16(0, "unused");
370  outMsg.writeInt8(0, "unused");
371  outMsg.writeInt8(MessageOut::toServerDirection(direction),
372  "player direction");
373  }
374  else if (packetVersion >= 20040713)
375  {
376  outMsg.writeInt8(0, "unused");
377  outMsg.writeInt8(0, "unused");
378  outMsg.writeInt8(0, "unused");
379  outMsg.writeInt8(0, "head direction");
380  outMsg.writeInt16(0, "unused");
381  outMsg.writeInt16(0, "unused");
382  outMsg.writeInt16(0, "unused");
383  outMsg.writeInt8(MessageOut::toServerDirection(direction),
384  "player direction");
385  }
386  else
387  {
388  outMsg.writeInt8(0, "head direction");
389  outMsg.writeInt8(0, "unused");
390  outMsg.writeInt8(MessageOut::toServerDirection(direction),
391  "player direction");
392  }
393 }
394 
395 void PlayerHandler::setDestination(const int x, const int y,
396  const int direction) const
397 {
399  if (packetVersion >= 20080827 && packetVersion < 20101124)
400  outMsg.writeInt32(0, "unused");
401  outMsg.writeCoordinates(CAST_U16(x),
402  CAST_U16(y),
403  CAST_U8(direction), "destination");
404 }
405 
406 void PlayerHandler::changeAction(const BeingActionT &action) const
407 {
408  unsigned char type;
409  switch (action)
410  {
411  case BeingAction::SIT:
412  type = 2;
413  break;
414  case BeingAction::STAND:
416  type = 3;
417  break;
418  default:
419  case BeingAction::MOVE:
420  case BeingAction::ATTACK:
421  case BeingAction::DEAD:
422  case BeingAction::HURT:
423  case BeingAction::SPAWN:
424  case BeingAction::CAST:
425  return;
426  }
427 
429  outMsg.writeInt32(0, "unused");
430  outMsg.writeInt8(type, "action");
431 }
432 
434 {
436  outMsg.writeInt8(0, "action");
437 }
438 
440 {
442 }
443 
444 void PlayerHandler::updateStatus(const uint8_t status) const
445 {
447  outMsg.writeInt8(status, "status");
448  outMsg.writeInt8(0, "unused");
449 }
450 
451 void PlayerHandler::setShortcut(const int idx,
452  const uint8_t type,
453  const int id,
454  const int level) const
455 {
457  outMsg.writeInt16(CAST_S16(idx), "index");
458  outMsg.writeInt8(CAST_S8(type), "type");
459  outMsg.writeInt32(id, "id");
460  outMsg.writeInt16(CAST_S16(level), "level");
461 }
462 
463 void PlayerHandler::shortcutShiftRow(const int row) const
464 {
465  if (packetVersion < 20140129)
466  return;
468  outMsg.writeInt8(CAST_S8(row), "row");
469 }
470 
472 {
474 }
475 
476 void PlayerHandler::changeCart(const int type) const
477 {
479  outMsg.writeInt16(CAST_S16(type), "type");
480 }
481 
483 {
485 }
486 
488 {
490 }
491 
493 {
495 }
496 
498 {
500  outMsg.writeInt32(0, "char id");
501  outMsg.writeInt32(0, "account id");
502 }
503 
505 {
507 }
508 
510  const int data) const
511 {
513  outMsg.writeInt32(id, "config option");
514  outMsg.writeInt32(data, "config data");
515 }
516 
517 #define setStatComplex(stat) \
518  PlayerInfo::setStatBase(stat, CAST_S32(base), notify); \
519  if (mod != NoStat) \
520  PlayerInfo::setStatMod(stat, mod, Notify_true)
521 
523  const int type,
524  const int64_t base,
525  const int mod,
526  const Notify notify) const
527 {
528  switch (type)
529  {
530  case Sp::SPEED:
533  CAST_S32(base),
534  Notify_true);
536  0,
537  Notify_true);
538  break;
539  case Sp::BASEEXP:
541  base,
542  Notify_true);
543  break;
544  case Sp::JOBEXP:
546  base,
547  Notify_true);
548  break;
549  case Sp::KARMA:
551  CAST_S32(base),
552  Notify_true);
554  0,
555  Notify_true);
556  break;
557  case Sp::MANNER:
559  CAST_S32(base),
560  Notify_true);
562  0,
563  Notify_true);
564  break;
565  case Sp::HP:
567  base,
568  Notify_true);
569  if (localPlayer->isInParty() && (Party::getParty(1) != nullptr))
570  {
571  PartyMember *const m = Party::getParty(1)
573  if (m != nullptr)
574  {
575  m->setHp(CAST_S32(base));
578  }
579  }
580  break;
581  case Sp::MAXHP:
583  base,
584  Notify_true);
585 
586  if (localPlayer->isInParty() && (Party::getParty(1) != nullptr))
587  {
588  PartyMember *const m = Party::getParty(1)->getMember(
589  localPlayer->getId());
590  if (m != nullptr)
591  {
593  m->setMaxHp(CAST_S32(base));
594  }
595  }
596  break;
597  case Sp::SP:
599  base,
600  Notify_true);
601  break;
602  case Sp::MAXSP:
604  base,
605  Notify_true);
606  break;
607  case Sp::STATUSPOINT:
609  base,
610  Notify_true);
611  break;
612  case Sp::BASELEVEL:
614  base,
615  Notify_true);
616  if (localPlayer != nullptr)
617  {
618  localPlayer->setLevel(CAST_S32(base));
620  }
621  break;
622  case Sp::SKILLPOINT:
624  base,
625  Notify_true);
626  if (skillDialog != nullptr)
627  skillDialog->update();
628  break;
629  case Sp::STR:
631  break;
632  case Sp::AGI:
634  break;
635  case Sp::VIT:
637  break;
638  case Sp::INT:
640  break;
641  case Sp::DEX:
643  break;
644  case Sp::LUK:
646  break;
647  case Sp::ZENY:
648  {
649  const int oldMoney = PlayerInfo::getAttribute(Attributes::MONEY);
650  const int newMoney = CAST_S32(base);
651  if (newMoney > oldMoney)
652  {
654  UnitsDb::formatCurrency(newMoney - oldMoney));
655  }
656  else if (newMoney < oldMoney)
657  {
659  UnitsDb::formatCurrency(oldMoney - newMoney).c_str());
660  }
661 
663  newMoney,
664  Notify_true);
665  break;
666  }
667  case Sp::NEXTBASEEXP:
669  base,
670  Notify_true);
671  break;
672  case Sp::NEXTJOBEXP:
674  base,
675  Notify_true);
676  break;
677  case Sp::WEIGHT:
679  base,
680  Notify_true);
681  break;
682  case Sp::MAXWEIGHT:
684  base,
685  Notify_true);
686  break;
687  case Sp::USTR:
689  CAST_S32(base));
690  break;
691  case Sp::UAGI:
693  CAST_S32(base));
694  break;
695  case Sp::UVIT:
697  CAST_S32(base));
698  break;
699  case Sp::UINT:
701  CAST_S32(base));
702  break;
703  case Sp::UDEX:
705  CAST_S32(base));
706  break;
707  case Sp::ULUK:
709  CAST_S32(base));
710  break;
711 
712  case Sp::ATK1:
714  CAST_S32(base),
715  Notify_true);
717  break;
718  case Sp::ATK2:
720  CAST_S32(base),
721  Notify_true);
723  break;
724  case Sp::MATK1:
726  CAST_S32(base),
727  Notify_true);
728  break;
729  case Sp::MATK2:
731  CAST_S32(base),
732  Notify_true);
733  break;
734  case Sp::DEF1:
736  CAST_S32(base),
737  Notify_true);
738  break;
739  case Sp::DEF2:
741  CAST_S32(base),
742  Notify_true);
743  break;
744  case Sp::MDEF1:
746  CAST_S32(base),
747  Notify_true);
748  break;
749  case Sp::MDEF2:
751  CAST_S32(base),
752  Notify_true);
753  break;
754  case Sp::HIT:
756  CAST_S32(base),
757  Notify_true);
758  break;
759  case Sp::FLEE1:
761  CAST_S32(base),
762  Notify_true);
763  break;
764  case Sp::FLEE2:
766  CAST_S32(base),
767  Notify_true);
768  break;
769  case Sp::CRITICAL:
771  CAST_S32(base),
772  Notify_true);
773  break;
774  case Sp::ASPD:
777  CAST_S32(base),
778  Notify_true);
780  0,
781  Notify_true);
783  break;
784  case Sp::JOBLEVEL:
786  base,
787  Notify_true);
788  break;
789 
790  default:
792  break;
793  }
794 }
795 
796 void PlayerHandler::selectStyle(const int headColor,
797  const int headStyle,
798  const int bodyColor,
799  const int topStyle,
800  const int middleStyle,
801  const int bottomStyle,
802  const int bodyStyle) const
803 {
804  if (packetVersion < 20151104)
805  return;
806  if (packetVersionMain >= 20180516 ||
807  packetVersionRe >= 20180516 ||
808  packetVersionZero >= 20180523)
809  {
811  outMsg.writeInt16(CAST_S16(headColor), "head color");
812  outMsg.writeInt16(CAST_S16(headStyle), "head style");
813  outMsg.writeInt16(CAST_S16(bodyColor), "body color");
814  outMsg.writeInt16(CAST_S16(topStyle), "top style");
815  outMsg.writeInt16(CAST_S16(middleStyle), "middle style");
816  outMsg.writeInt16(CAST_S16(bottomStyle), "bottom style");
817  outMsg.writeInt16(CAST_S16(bodyStyle), "body style");
818  }
819  else
820  {
822  outMsg.writeInt16(CAST_S16(headColor), "head color");
823  outMsg.writeInt16(CAST_S16(headStyle), "head style");
824  outMsg.writeInt16(CAST_S16(bodyColor), "body color");
825  outMsg.writeInt16(CAST_S16(topStyle), "top style");
826  outMsg.writeInt16(CAST_S16(middleStyle), "middle style");
827  outMsg.writeInt16(CAST_S16(bottomStyle), "bottom style");
828  }
829 }
830 
831 void PlayerHandler::setTitle(const int titleId) const
832 {
833  if (packetVersion < 20140903)
834  return;
836  outMsg.writeInt32(titleId, "title");
837 }
838 
839 #undef setStatComplex
840 
841 } // namespace EAthena
int CMSG_SKILL_LEVELUP_REQUEST
Definition: protocolout.cpp:82
Net::PlayerHandler * playerHandler
Definition: net.cpp:93
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:241
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
int CMSG_PLAYER_SET_TITLE
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:418
Definition: sp.h:30
Definition: sp.h:77
int CMSG_SET_CONFIG_OPTION
Definition: protocolout.cpp:96
Definition: sp.h:33
void setDirection(const unsigned char direction) const
int packetVersionZero
Definition: client.cpp:127
int CMSG_PLAYER_SELECT_STYLE
void attack(const BeingId id, const Keep keep) const
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
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
uint32_t data
static Party * getParty(const int16_t id)
Definition: party.cpp:312
void setTitle(const int titleId) const
#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
void setConfigOption(const int id, const int data) const
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 updateStatus(const uint8_t status) const
Definition: sp.h:36
int packetVersionRe
Definition: client.cpp:126
int packetVersionMain
Definition: client.cpp:125
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
int CMSG_PLAYER_SELECT_STYLE2
void selectStyle(const int headColor, const int headStyle, const int bodyColor, const int topStyle, const int middleStyle, const int bottomStyle, const int bodyStyle) const
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