ManaPlus
being.h
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-2019 The ManaPlus Developers
6  * Copyright (C) 2019-2021 Andrei Karas
7  *
8  * This file is part of The ManaPlus Client.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef BEING_BEING_H
25 #define BEING_BEING_H
26 
27 #include "position.h"
28 
29 #include "enums/being/badgeindex.h"
30 #include "enums/being/reachable.h"
31 
32 #include "enums/gui/usercolorid.h"
33 
34 #include "enums/simpletypes/move.h"
35 
37 
38 #include "resources/beinginfo.h"
39 #include "resources/beingslot.h"
40 
41 #include "being/actorsprite.h"
42 
43 #include "enums/being/attacktype.h"
46 #include "enums/being/gender.h"
47 
49 
50 #include "localconsts.h"
51 
52 static const int DEFAULT_BEING_WIDTH = 32;
53 static const int DEFAULT_BEING_HEIGHT = 32;
54 
55 class AnimatedSprite;
56 class BeingCacheEntry;
57 class CastingEffect;
58 class Color;
59 class Equipment;
60 class FlashText;
61 class Guild;
62 class ItemInfo;
63 class Particle;
64 class Party;
65 class SpeechBubble;
66 class Text;
67 
68 struct ChatObject;
69 struct HorseInfo;
70 struct MissileInfo;
71 struct SkillInfo;
72 struct ParticleInfo;
73 
74 extern volatile time_t cur_time;
75 
77 {
79  sound(nullptr),
80  x(0),
81  y(0),
82  time(0)
83  {
84  }
85 
87 
88  const SoundInfo *sound;
89  int x;
90  int y;
91  int time;
92 };
93 
94 class Being notfinal : public ActorSprite,
95  public ConfigListener
96 {
97  public:
98  friend class ActorManager;
99  friend class BeingEquipBackend;
100  friend class LocalPlayer;
101 
109  Being(const BeingId id,
110  const ActorTypeT type);
111 
113 
114  ~Being() override;
115 
118  { return mType; }
119 
123  void clearPath() restrict2;
124 
129  { return mActionTime; }
130 
135  void setActionTime(const int actionTime) restrict2 noexcept2
136  { mActionTime = actionTime; }
137 
141  virtual void nextTile() restrict2;
142 
146  void setDestination(const int dstX,
147  const int dstY) restrict2;
148 
149  void setCachedDestination(const int dstX,
150  const int dstY) restrict2 noexcept2
151  { mCachedX = dstX; mCachedY = dstY; }
152 
154  { return mCachedX; }
155 
157  { return mCachedY; }
158 
163  { return mDest; }
164 
169  { return mX; }
170 
175  { return mY; }
176 
180  virtual void setTileCoords(const int x, const int y) restrict2;
181 
189  void setSpeech(const std::string &restrict text) restrict2;
190 
200  void takeDamage(Being *restrict const attacker,
201  const int amount,
202  const AttackTypeT type,
203  const int attackId,
204  const int level) restrict2;
205 
213  void handleAttack(Being *restrict const victim,
214  const int damage,
215  const int attackId) restrict2;
216 
217  void handleSkillCasting(Being *restrict const victim,
218  const int skillId,
219  const int skillLevel) restrict2;
220 
221  void handleSkill(Being *restrict const victim,
222  const int damage,
223  const int skillId,
224  const int skillLevel) restrict2;
225 
227  { return mEquippedWeapon; }
228 
232  const std::string &getName() const restrict2 noexcept2 A_WARN_UNUSED
233  { return mName; }
234 
235  const std::string &getExtName() const restrict2 noexcept2 A_WARN_UNUSED
236  { return mExtName; }
237 
243  void setName(const std::string &restrict name) restrict2;
244 
246  { return mShowName; }
247 
248  void setShowName(const bool doShowName) restrict2;
249 
253  void setPartyName(const std::string &restrict name) restrict2;
254 
255  const std::string &getPartyName() const restrict2 noexcept2
257  { return mPartyName; }
258 
259  const std::string &getGuildName() const restrict2 noexcept2
261  { return mGuildName; }
262 
263  const std::string &getClanName() const restrict2 noexcept2
265  { return mClanName; }
266 
271  void setGuildName(const std::string &restrict name) restrict2;
272 
273  void setGuildPos(const std::string &restrict pos) restrict2;
274 
275  void setClanName(const std::string &restrict name) restrict2;
276 
280  void addGuild(Guild *restrict const guild) restrict2;
281 
285  void removeGuild(const int id) restrict2;
286 
290  const Guild *getGuild(const std::string &restrict guildName)
291  const restrict2 A_WARN_UNUSED;
292 
296  const Guild *getGuild(const int id) const restrict2 A_WARN_UNUSED;
297 
302 
306  const std::map<int, Guild*> &getGuilds() const restrict2 noexcept2
308  { return mGuilds; }
309 
313  void clearGuilds() restrict2;
314 
319  { return CAST_S16(mGuilds.size()); }
320 
322  { return mParty != nullptr; }
323 
324  void setParty(Party *restrict const party) restrict2;
325 
326  void setGuild(Guild *restrict const guild) restrict2;
327 
328  void updateGuild() restrict2;
329 
331  { return mParty; }
332 
333  void setSprite(const unsigned int slot,
334  const int id,
335  std::string color,
336  ItemColor colorId) restrict2;
337 
338  void setSpriteColor(const unsigned int slot,
339  const int id,
340  const std::string &color) restrict2;
341 
342  void setSpriteColorId(const unsigned int slot,
343  const int id,
344  ItemColor colorId) restrict2;
345 
346  void setSpriteCards(const unsigned int slot,
347  const int id,
348  const CardsList &restrict cards) restrict2;
349 
350  void setSpriteId(const unsigned int slot,
351  const int id) restrict2;
352 
353  void unSetSprite(const unsigned int slot) restrict2;
354 
355  void setWeaponId(const int id) restrict2;
356 
357  void setTempSprite(const unsigned int slot,
358  const int id) restrict2;
359 
360  void setHairTempSprite(const unsigned int slot,
361  const int id) restrict2;
362 
363  void updateSprite(const unsigned int slot,
364  const int id,
365  const std::string &restrict color)
366  restrict2;
367 
368  void setHairColorSpriteID(const unsigned int slot,
369  const int id) restrict2;
370 
371  void setSpriteColor(const unsigned int slot,
372  const std::string &restrict color) restrict2;
373 
379 
383  void logic() restrict2 override;
384 
385  void botLogic() restrict2;
386 
390  void drawSpeech(const int offsetX,
391  const int offsetY) restrict2;
392 
396  void drawEmotion(Graphics *restrict const graphics,
397  const int offsetX,
398  const int offsetY) const restrict2 A_NONNULL(2);
399 
401  { return mSubType; }
402 
406  void setSubtype(const BeingTypeId subtype,
407  const uint16_t look) restrict2;
408 
410  { return mInfo; }
411 
414 
416  {
417  if (mInfo == nullptr)
418  return 0;
419  return mInfo->getTargetOffsetX();
420  }
421 
423  {
424  if (mInfo == nullptr)
425  return 0;
426  return mInfo->getTargetOffsetY();
427  }
428 
432  virtual unsigned char getBlockWalkMask() const restrict2 A_WARN_UNUSED
433  {
434  if (mInfo == nullptr)
435  return 0;
436  return mInfo->getBlockWalkMask();
437  }
438 
443  {
444  if (mInfo == nullptr)
445  return BlockType::NONE;
446  return mInfo->getBlockType();
447  }
448 
452  void setWalkSpeed(const int speed) restrict2
453  { mWalkSpeed = speed; mSpeed = speed; }
454 
459  { return mWalkSpeed; }
460 
464  void setAttackSpeed(const int speed) restrict2 noexcept2
465  { mAttackSpeed = speed; }
466 
471  { return mAttackSpeed; }
472 
476  virtual void setAction(const BeingActionT &restrict action,
477  const int attackId) restrict2;
478 
483  { return mAction; }
484 
489  { return mAction != BeingAction::DEAD; }
490 
495  { return mDirection; }
496 
500  virtual void setDirection(const uint8_t direction) restrict2;
501 
502  void setDirectionDelayed(const uint8_t direction) restrict2 noexcept2
503  { mDirectionDelayed = direction; }
504 
506  { return mDirectionDelayed; }
507 
513  { return mSpriteDirection; }
514 
515  void setPixelPositionF(const Vector &restrict pos) restrict2 override;
516 
522  inline void setPixelPositionF(const float x,
523  const float y,
524  const float z) restrict2 A_INLINE
525  { setPixelPositionF(Vector(x, y, z)); }
526 
531  { return std::max(CompoundSprite::getWidth(), DEFAULT_BEING_WIDTH); }
532 
537  { return std::max(CompoundSprite::getHeight(), DEFAULT_BEING_HEIGHT); }
538 
542  void fireMissile(Being *restrict const victim,
543  const MissileInfo &restrict missile) const restrict2;
544 
550  { return mPath; }
551 
553  { return mDistance; }
554 
555  void setDistance(const int n) restrict2 noexcept2
556  { mDistance = n; }
557 
562  void setEmote(const uint8_t emotion,
563  const int emote_time) restrict2;
564 
565  void setState(const uint8_t state) restrict2;
566 
567  void drawPlayerSprites(Graphics *restrict const graphics,
568  const int posX,
569  const int posY) const
570  restrict2 A_NONNULL(2);
571 
572  void drawSpritesSDL(Graphics *restrict const graphics,
573  const int posX,
574  const int posY) const
575  restrict2 override final A_NONNULL(2);
576 
577  void drawHpBar(Graphics *restrict const graphics,
578  const int maxHP,
579  const int hp,
580  const int damage,
581  const UserColorIdT color1,
582  const UserColorIdT color2,
583  const int x,
584  const int y,
585  const int width,
586  const int height) const restrict2 A_NONNULL(2);
587 
588  void optionChanged(const std::string &restrict value)
589  restrict2 override;
590 
591  void flashName(const int time) restrict2;
592 
594  { return mDamageTaken; }
595 
596  void setDamageTaken(const int damage) restrict2 noexcept2
597  { mDamageTaken = damage; }
598 
599  void updateName() restrict2;
600 
601  void setLevel(const int n) restrict2 noexcept2
602  { mLevel = n; }
603 
604  virtual int getLevel() const restrict2 A_WARN_UNUSED
605  { return mLevel; }
606 
608  { mReachable = n; }
609 
611  { return mReachable; }
612 
613  static void reReadConfig();
614 
616 
617  void addToCache() const restrict2;
618 
619  bool updateFromCache() restrict2;
620 
624  virtual void setGender(const GenderT gender) restrict2;
625 
627  { return mGender; }
628 
632  std::string getSitAction() const restrict2 A_WARN_UNUSED;
633 
634  std::string getCastAction() const restrict2 A_WARN_UNUSED;
635 
636  std::string getCastAction(const SkillInfo *restrict const skill) const
638 
639  std::string getMoveAction() const restrict2 A_WARN_UNUSED;
640 
641  std::string getDeadAction() const restrict2 A_WARN_UNUSED;
642 
643  std::string getStandAction() const restrict2 A_WARN_UNUSED;
644 
645  std::string getSpawnAction() const restrict2 A_WARN_UNUSED;
646 
647  std::string getWeaponAttackAction(const ItemInfo *restrict const
648  weapon) const
650 
651  std::string getAttackAction() const restrict2 A_WARN_UNUSED;
652 
653  std::string getAttackAction(const Attack *restrict const attack1) const
655 
660  { return mIsGM; }
661 
665  void setGM(const bool gm) restrict2;
666 
668  { return mType == ActorType::Npc; }
669 
670  void talkTo() const restrict2;
671 
672  void draw(Graphics *restrict const graphics,
673  const int offsetX,
674  const int offsetY) const
676 
677  void drawPlayer(Graphics *restrict const graphics,
678  const int offsetX,
679  const int offsetY) const
680  restrict2 A_NONNULL(2);
681 
682  void drawOther(Graphics *restrict const graphics,
683  const int offsetX,
684  const int offsetY) const
685  restrict2 A_NONNULL(2);
686 
687  void drawNpc(Graphics *restrict const graphics,
688  const int offsetX,
689  const int offsetY) const
690  restrict2 A_NONNULL(2);
691 
692  void drawMonster(Graphics *restrict const graphics,
693  const int offsetX,
694  const int offsetY) const
695  restrict2 A_NONNULL(2);
696 
697  void drawPortal(Graphics *restrict const graphics,
698  const int offsetX,
699  const int offsetY) const
700  restrict2 A_NONNULL(2);
701 
702  void drawBasic(Graphics *restrict const graphics,
703  const int x,
704  const int y) const restrict2 A_NONNULL(2);
705 
707  { mMoveTime = cur_time; }
708 
710  { mAttackTime = cur_time; }
711 
713  { mTalkTime = cur_time; }
714 
716  { mTestTime = cur_time; }
717 
719  { mOtherTime = cur_time; }
720 
722  { return mMoveTime; }
723 
725  { return mAttackTime; }
726 
728  { return mTalkTime; }
729 
731  { return mTestTime; }
732 
734  { return mOtherTime; }
735 
736  void resetCounters() restrict2;
737 
738  void updateColors() restrict2;
739 
740  void setEnemy(const bool n) restrict2 noexcept2
741  { mEnemy = n; }
742 
743  const std::string &getIp() const restrict2 noexcept2 A_WARN_UNUSED
744  { return mIp; }
745 
746  void setIp(const std::string &restrict ip) restrict2 noexcept2
747  { mIp = ip; }
748 
750  { return mPvpRank; }
751 
752  void setPvpRank(const unsigned int rank) restrict2 noexcept2
753  { mPvpRank = rank; }
754 
755  void setHP(const int hp) restrict2;
756 
757  void setMaxHP(const int hp) restrict2;
758 
760  { return mHP; }
761 
763  { return mMaxHP; }
764 
765  uint8_t calcDirection(const int dstX,
766  const int dstY) const restrict2 A_WARN_UNUSED;
767 
768  uint8_t calcDirection() const restrict2 A_WARN_UNUSED;
769 
771  { mAttackDelay = n; }
772 
774  { return mAttackDelay; }
775 
777  { return mMinHit; }
778 
779  void setMinHit(const int n) restrict2 noexcept2
780  { mMinHit = n; }
781 
783  { return mMaxHit; }
784 
785  void setMaxHit(const int n) restrict2 noexcept2
786  { mMaxHit = n; }
787 
789  { return mCriticalHit; }
790 
792  { mCriticalHit = n; }
793 
794  void updateHit(const int amount) restrict2;
795 
797 
798  void undressItemById(const int id) restrict2;
799 
801  { return mGoodStatus; }
802 
804  { mGoodStatus = n; }
805 
806  std::string getGenderSign() const restrict2 A_WARN_UNUSED;
807 
809 
810  void updateComment() restrict2;
811 
813  { return mComment; }
814 
815  void setComment(const std::string &restrict n) restrict2 noexcept2
816  { mComment = n; }
817 
818  static void clearCache();
819 
820  static std::string loadComment(const std::string &restrict name,
821  const ActorTypeT &restrict type)
823 
824  static void saveComment(const std::string &restrict name,
825  const std::string &restrict comment,
826  const ActorTypeT &restrict type);
827 
829  { return mAdvanced; }
830 
831  void setAdvanced(const bool n) restrict2
832  { mAdvanced = n; addToCache(); }
833 
835 
837 
838  void enableShop(const bool b) restrict2;
839 
843  void setAttackRange(const int range) restrict2 noexcept2
844  { mAttackRange = range; }
845 
846 /*
847  void attack(Being *restrict target = nullptr,
848  bool keep = false,
849  bool dontChangeEquipment = false) restrict2;
850 
851  void attack2(Being *restrict target = nullptr,
852  bool keep = false,
853  bool dontChangeEquipment = false) restrict2;
854 */
855 
856  void updatePercentHP() restrict2;
857 
858  void setRaceName(const std::string &restrict name) restrict2 noexcept2
859  { mRaceName = name; }
860 
862  { return mRaceName; }
863 
864  int getSpriteID(const int slot) const restrict2 A_WARN_UNUSED;
865 
866  const BeingSlot &getSpriteSlot(const int slot) const
868 
869  ItemColor getSpriteColor(const int slot) const restrict2 A_WARN_UNUSED;
870 
871  void setHairStyle(const unsigned int slot,
872  const int id) restrict2;
873 
874  void setHairColor(const unsigned int slot,
875  const ItemColor color) restrict2;
876 
878  { mHairColor = color; }
879 
880  void setSpriteSlot(const unsigned int slot,
881  const BeingSlot &beingSlot);
882 
884  { return mHairColor; }
885 
887 
888  static int getHitEffect(const Being *restrict const attacker,
889  const AttackTypeT type,
890  const int attackId,
891  const int level);
892 
894  {
895  return mInfo != nullptr ?
897  }
898 
899  void addAfkEffect() restrict2;
900 
901  void removeAfkEffect() restrict2;
902 
904 
905  void addSpecialEffect(const int effect) restrict2;
906 
908 
909  void addEffect(const std::string &restrict name) restrict2;
910 
912  { mOwner = owner; }
913 
915  { return mOwner; }
916 
917  void playSfx(const SoundInfo &sound,
918  Being *const being,
919  const bool main,
920  const int x, const int y) const restrict2;
921 
922  uint16_t getLook() const restrict2 noexcept2
923  { return mLook; }
924 
925  void setLook(const uint16_t look) restrict2;
926 
927  constexpr2 static uint8_t genderToInt(const GenderT sex)
928  A_CONST A_WARN_UNUSED
929  {
930  switch (sex)
931  {
932  case Gender::FEMALE:
933  case Gender::UNSPECIFIED:
934  default:
935  return 0;
936  case Gender::MALE:
937  return 1;
938  }
939  }
940 
941  constexpr2 static GenderT intToGender(const uint8_t sex)
942  A_CONST A_WARN_UNUSED
943  {
944  switch (sex)
945  {
946  case 0:
947  default:
948  return Gender::FEMALE;
949  case 1:
950  return Gender::MALE;
951  }
952  }
953 
955 
959  void setPath(const Path &restrict path) restrict2;
960 
962  { return CAST_S32(mPos.y) - mYDiff - mSortOffsetY; }
963 
964  void setMap(Map *restrict const map) restrict2 override;
965 
967 
969  { mUsageCounter ++; }
970 
972  { return --mUsageCounter; }
973 
974  virtual int getLastAttackX() const restrict2
975  { return mLastAttackX; }
976 
977  virtual int getLastAttackY() const restrict2
978  { return mLastAttackY; }
979 
980  void drawHomunculus(Graphics *restrict const graphics,
981  const int offsetX,
982  const int offsetY) const
983  restrict2 A_NONNULL(2);
984 
985  void drawMercenary(Graphics *restrict const graphics,
986  const int offsetX,
987  const int offsetY) const
988  restrict2 A_NONNULL(2);
989 
990  void drawElemental(Graphics *restrict const graphics,
991  const int offsetX,
992  const int offsetY) const
993  restrict2 A_NONNULL(2);
994 
995  void setTrickDead(const bool b) restrict2 override final;
996 
997  void setChat(ChatObject *restrict const obj) restrict2;
998 
1000  { return mChat; }
1001 
1002  void setRiding(const bool b) restrict2 override final;
1003 
1004  void setHorse(const int horseId) restrict2;
1005 
1006  void removeHorse() restrict2;
1007 
1008  void setSellBoard(const std::string &restrict text) restrict2;
1009 
1011  { return mSellBoard; }
1012 
1013  void setBuyBoard(const std::string &restrict text) restrict2;
1014 
1016  { return mBuyBoard; }
1017 
1018  void setSpiritBalls(const unsigned int balls) restrict2;
1019 
1021  { return mSpiritBalls; }
1022 
1023  void stopCast(const bool b) override final;
1024 
1025  void setCreatorId(const BeingId id)
1026  { mCreatorId = id; }
1027 
1029  { return mCreatorId; }
1030 
1031  void setKarma(const int karma) restrict2 noexcept2
1032  { mKarma = karma; }
1033 
1035  { return mKarma; }
1036 
1037  void setManner(const int manner) restrict2 noexcept2
1038  { mManner = manner; }
1039 
1041  { return mManner; }
1042 
1044  { mBotAi = false; }
1045 
1047  { mBotAi = true; }
1048 
1050  { return mAreaSize; }
1051 
1052  void setAreaSize(const int areaSize) restrict2 noexcept2
1053  { mAreaSize = areaSize; }
1054 
1055  void setTeamId(const uint16_t teamId) restrict2;
1056 
1057  void showTeamBadge(const bool show) restrict2;
1058 
1059  void showGuildBadge(const bool show) restrict2;
1060 
1061  void showClanBadge(const bool show) restrict2;
1062 
1063  void showGmBadge(const bool show) restrict2;
1064 
1065  void showPartyBadge(const bool show) restrict2;
1066 
1067  void showNameBadge(const bool show) restrict2;
1068 
1069  void showShopBadge(const bool show) restrict2;
1070 
1071  void showInactiveBadge(const bool show) restrict2;
1072 
1073  void showAwayBadge(const bool show) restrict2;
1074 
1075  void showBadges(const bool show) restrict2;
1076 
1077  void setLanguageId(const int lang) restrict2 noexcept2;
1078 
1080  { return mLanguageId; }
1081 
1083  { return mTeamId; }
1084 
1085  virtual void setGroupId(const int id);
1086 
1088  { return mGroupId; }
1089 
1091 
1092  void addCast(const int dstX,
1093  const int dstY,
1094  const int skillId,
1095  const int skillLevel,
1096  const int range,
1097  const int waitTimeTicks);
1098 
1099  void fixDirectionOffsets(int &offsetX,
1100  int &offsetY) const;
1101 
1103  { return mAllowNpcEquipment; }
1104 
1105  static Being *createBeing(const BeingId id,
1106  const ActorTypeT type,
1107  const BeingTypeId subtype,
1108  Map *const map);
1109 
1110  protected:
1111  void drawPlayerSpriteAt(Graphics *restrict const graphics,
1112  const int x,
1113  const int y) const restrict2 A_NONNULL(2);
1114 
1115  void drawOtherSpriteAt(Graphics *restrict const graphics,
1116  const int x,
1117  const int y) const restrict2 A_NONNULL(2);
1118 
1119  void drawNpcSpriteAt(Graphics *restrict const graphics,
1120  const int x,
1121  const int y) const restrict2 A_NONNULL(2);
1122 
1123  void drawPortalSpriteAt(Graphics *restrict const graphics,
1124  const int x,
1125  const int y) const restrict2 A_NONNULL(2);
1126 
1127  void drawMonsterSpriteAt(Graphics *restrict const graphics,
1128  const int x,
1129  const int y) const restrict2 A_NONNULL(2);
1130 
1131  void drawHomunculusSpriteAt(Graphics *restrict const graphics,
1132  const int x,
1133  const int y) const restrict2 A_NONNULL(2);
1134 
1135  void drawMercenarySpriteAt(Graphics *restrict const graphics,
1136  const int x,
1137  const int y) const restrict2 A_NONNULL(2);
1138 
1139  void drawElementalSpriteAt(Graphics *restrict const graphics,
1140  const int x,
1141  const int y) const restrict2 A_NONNULL(2);
1142 
1143  void drawCompound(Graphics *const graphics,
1144  const int posX,
1145  const int posY) const A_NONNULL(2);
1146 
1150  virtual void updateCoords() restrict2;
1151 
1152  void showName() restrict2;
1153 
1154  void addItemParticles(const int id,
1155  const SpriteDisplay &restrict display) restrict2;
1156 
1157  void addItemParticlesCards(const int id,
1158  const SpriteDisplay &restrict display,
1159  const CardsList &restrict cards) restrict2;
1160 
1162 
1163  void removeItemParticles(const int id) restrict2;
1164 
1166 
1167  void setDefaultNameColor(const UserColorIdT defaultColor) restrict2;
1168 
1170 
1171  static int getDefaultEffectId(const AttackTypeT &restrict type);
1172 
1178 
1180  std::string mName;
1181  std::string mExtName;
1182  std::string mRaceName;
1183  std::string mPartyName;
1184  std::string mGuildName;
1185  std::string mClanName;
1186  std::string mSpeech;
1187 
1193 
1196 
1200 
1203  typedef std::map<int, ParticleInfo*> SpriteParticleInfo;
1205 
1208 
1209  // Character guild information
1210  std::map<int, Guild*> mGuilds;
1212 
1220  int mLevel;
1225 
1227 
1231  uint8_t mDirection;
1235  bool mIsGM;
1236 
1237  protected:
1238  void postInit(const BeingTypeId subType,
1239  Map *const map);
1240 
1241  void updateBadgesPosition();
1242 
1247  template<signed char pos, signed char neg>
1248  int getOffset() const restrict2 A_WARN_UNUSED;
1249 
1250  int searchSlotValue(const STD_VECTOR<int> &restrict slotRemap,
1251  const int val) const restrict2 A_WARN_UNUSED;
1252 
1253  static void searchSlotValueItr(STD_VECTOR<int>::iterator &restrict it,
1254  int &idx,
1255  STD_VECTOR<int> &restrict slotRemap,
1256  const int val);
1257 
1258  void addSpiritBalls(const unsigned int balls,
1259  const int effectId) restrict2;
1260 
1261  void removeSpiritBalls(const unsigned int balls) restrict2;
1262 
1263  void dumpSprites() const restrict2;
1264 
1265  void drawBeingCursor(Graphics *const graphics,
1266  const int offsetX,
1267  const int offsetY) const A_NONNULL(2);
1268 
1269  void drawCasting(Graphics *const graphics,
1270  const int offsetX,
1271  const int offsetY) const A_NONNULL(2);
1272 
1273  void updateBotFollow(int dstX,
1274  int dstY,
1275  const int divX,
1276  const int divY);
1277 
1278  void moveBotTo(int dstX,
1279  int dstY);
1280 
1281  void updateBotDirection(const int dstX,
1282  const int dstY);
1283 
1284  void botFixOffset(int &restrict dstX,
1285  int &restrict dstY) const;
1286 
1288 
1291 
1298  int mSpeed;
1299  std::string mIp;
1303  std::string mComment;
1304  std::string mBuyBoard;
1305  std::string mSellBoard;
1313 
1314  int mX; // position in tiles
1315  int mY; // position in tiles
1318  int mSortOffsetY; // caculated offset in pixels based on mPixelOffsetY
1319  int mPixelOffsetY; // tile height offset in pixels
1320  // calculated between tiles
1321  int mFixedOffsetY; // fixed tile height offset in pixels for tile
1322  uint8_t mOldHeight;
1323 
1325  int mHP;
1326  int mMaxHP;
1330 
1331  static time_t mUpdateConfigTime;
1332  static unsigned int mConfLineLim;
1333  static int mSpeechType;
1336  static bool mLowTraffic;
1337  static bool mDrawHotKeys;
1338  static bool mShowBattleEvents;
1339  static bool mShowMobHP;
1340  static bool mShowOwnHP;
1341  static bool mShowGender;
1342  static bool mShowLevel;
1343  static bool mShowPlayersStatus;
1345  static bool mHideErased;
1347  static bool mUseDiagonal;
1349  static int mAwayEffect;
1351 
1352  time_t mMoveTime;
1353  time_t mAttackTime;
1354  time_t mTalkTime;
1355  time_t mOtherTime;
1356  time_t mTestTime;
1358  int mMinHit;
1359  int mMaxHit;
1361  unsigned int mPvpRank;
1362  unsigned int mNumber;
1363  unsigned int mSpiritBalls;
1365  int mKarma;
1366  int mManner;
1373  uint16_t mTeamId;
1374  uint16_t mLook;
1375  uint16_t mBadgesCount;
1377  bool mErased;
1378  bool mEnemy;
1381  bool mShop;
1382  bool mAway;
1385  bool mBotAi;
1387 };
1388 
1389 extern std::list<BeingCacheEntry*> beingInfoCache;
1390 
1391 #endif // BEING_BEING_H
ActorType ::T ActorTypeT
Definition: actortype.h:43
AttackType ::T AttackTypeT
Definition: attacktype.h:47
std::list< BeingCacheEntry * > beingInfoCache
Definition: being.cpp:148
volatile time_t cur_time
Definition: timer.cpp:58
static const int DEFAULT_BEING_WIDTH
Definition: being.h:52
static const int DEFAULT_BEING_HEIGHT
Definition: being.h:53
BeingAction ::T BeingActionT
Definition: beingaction.h:41
int BeingId
Definition: beingid.h:30
int BeingTypeId
Definition: beingtypeid.h:30
BlockType ::T BlockTypeT
Definition: blocktype.h:41
#define CAST_S16
Definition: cast.h:28
#define CAST_S32
Definition: cast.h:30
int mYDiff
Definition: actor.h:141
CursorT getHoverCursor() const
Definition: beinginfo.h:87
int getTargetOffsetY() const
Definition: beinginfo.h:141
unsigned char getBlockWalkMask() const
Definition: beinginfo.h:123
int getTargetOffsetX() const
Definition: beinginfo.h:135
BlockTypeT getBlockType() const
Definition: beinginfo.h:129
Definition: being.h:96
void showName()
Definition: being.cpp:2578
bool mNeedPosUpdate
Definition: being.h:1384
uint16_t mLook
Definition: being.h:1374
bool mAway
Definition: being.h:1382
void setKarma(const int karma)
Definition: being.h:1031
void setTempSprite(const unsigned int slot, const int id)
Definition: being.cpp:3143
std::string getBuyBoard() const
Definition: being.h:1015
Being(const BeingId id, const ActorTypeT type)
Definition: being.cpp:162
void setHairStyle(const unsigned int slot, const int id)
Definition: being.cpp:3372
void updateBotFollow(int dstX, int dstY, const int divX, const int divY)
Definition: being.cpp:2153
void setWeaponId(const int id)
Definition: being.cpp:3135
void setPixelPositionF(const Vector &pos)
Definition: being.cpp:526
int mLanguageId
Definition: being.h:1369
static void searchSlotValueItr(std::vector< int >::iterator &it, int &idx, std::vector< int > &slotRemap, const int val)
Definition: being.cpp:4662
void addEffect(const std::string &name)
Definition: being.cpp:4959
const std::string & getClanName() const
Definition: being.h:263
std::string getSitAction() const
Definition: being.cpp:1419
bool mIsGM
Definition: being.h:1235
Text * mText
Definition: being.h:1198
std::string getStandAction() const
Definition: being.cpp:1530
int mAreaSize
Definition: being.h:1367
Being * getOwner() const
Definition: being.h:914
void moveBotTo(int dstX, int dstY)
Definition: being.cpp:2192
Party * getParty() const
Definition: being.h:330
void setLanguageId(const int lang)
Definition: being.cpp:5555
void showAwayBadge(const bool show)
Definition: being.cpp:5293
SpriteParticleInfo mSpriteParticles
Definition: being.h:1207
time_t mMoveTime
Definition: being.h:1352
int getKarma() const
Definition: being.h:1034
void stopCast(const bool b)
Definition: being.cpp:5522
virtual void setDirection(const uint8_t direction)
Definition: being.cpp:1690
void updateHit(const int amount)
Definition: being.cpp:4686
const std::map< int, Guild * > & getGuilds() const
Definition: being.h:306
void setTrickDead(const bool b)
Definition: being.cpp:5465
ReachableT mReachable
Definition: being.h:1328
int mKarma
Definition: being.h:1365
int mFixedOffsetY
Definition: being.h:1321
int mLastAttackX
Definition: being.h:1223
void setAreaSize(const int areaSize)
Definition: being.h:1052
int mX
Definition: being.h:1314
static int mSpeechType
Definition: being.h:1333
void showGuildBadge(const bool show)
Definition: being.cpp:1179
void setHairTempSprite(const unsigned int slot, const int id)
Definition: being.cpp:3218
bool canTalk() const
Definition: being.h:667
static BeingCacheEntry * getCacheEntry(const BeingId id)
Definition: being.cpp:3559
void setRaceName(const std::string &name)
Definition: being.h:858
void drawBeingCursor(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3734
ReachableT getReachable() const
Definition: being.h:610
int mBadgesX
Definition: being.h:1370
void setOwner(Being *const owner)
Definition: being.h:911
void drawNpcSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:3998
void setGuildName(const std::string &name)
Definition: being.cpp:1196
void addItemParticlesCards(const int id, const SpriteDisplay &display, const CardsList &cards)
Definition: being.cpp:5081
int getWidth() const
Definition: being.h:530
static bool mHighlightMonsterAttackRange
Definition: being.h:1335
void drawEmotion(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:2375
~Being()
Definition: being.cpp:337
bool getAllowNpcEquipment() const
Definition: being.h:1102
void setMoveTime()
Definition: being.h:706
SpriteDirection::Type getSpriteDirection() const
Definition: being.h:511
void setDefaultNameColor(const UserColorIdT defaultColor)
Definition: being.cpp:2639
int mDamageTaken
Definition: being.h:1324
std::string mPartyName
Definition: being.h:1183
virtual int getLevel() const
Definition: being.h:604
std::string mGuildName
Definition: being.h:1184
void drawPortalSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:4222
void setParty(Party *const party)
Definition: being.cpp:1307
void drawElemental(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3816
int mY
Definition: being.h:1315
void showNameBadge(const bool show)
Definition: being.cpp:1119
int getWalkSpeed() const
Definition: being.h:458
uint8_t getDirectionDelayed() const
Definition: being.h:505
std::string getAttackAction() const
Definition: being.cpp:1525
int mDistance
Definition: being.h:1327
static Move mMoveNames
Definition: being.h:1346
void updatePercentHP()
Definition: being.cpp:4876
CastingEffect * mCastingEffect
Definition: being.h:1176
const std::string getComment() const
Definition: being.h:812
static bool mEnableReorderSprites
Definition: being.h:1344
std::string getWeaponAttackAction(const ItemInfo *const weapon) const
Definition: being.cpp:1452
void drawMercenarySpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:4114
void setAttackSpeed(const int speed)
Definition: being.h:464
void setClanName(const std::string &name)
Definition: being.cpp:1223
std::string mIp
Definition: being.h:1299
std::string getRaceName() const
Definition: being.h:861
void disableBotAi()
Definition: being.h:1043
const Vector & getDestination() const
Definition: being.h:162
void drawOtherSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:3991
static GenderT intToGender(const uint8_t sex) A_CONST
Definition: being.h:941
void showBadges(const bool show)
Definition: being.cpp:5214
uint8_t mDirectionDelayed
Definition: being.h:1232
time_t getAttackTime() const
Definition: being.h:724
int mSpeechTime
Definition: being.h:1217
std::string getMoveAction() const
Definition: being.cpp:1437
const Color * mNameColor
Definition: being.h:1192
void showGmBadge(const bool show)
Definition: being.cpp:3646
SpriteDirection::Type mSpriteDirection
Definition: being.h:1233
int mManner
Definition: being.h:1366
const Path & getPath() const
Definition: being.h:549
AnimatedSprite * mAnimationEffect
Definition: being.h:1175
NextSoundInfo mNextSound
Definition: being.h:954
std::string mSellBoard
Definition: being.h:1305
void setMaxHit(const int n)
Definition: being.h:785
bool mEnemy
Definition: being.h:1378
int getNumberOfLayers() const
Definition: being.h:377
bool mErased
Definition: being.h:1377
void drawCasting(Graphics *const graphics, const int offsetX, const int offsetY) const
uint16_t getTeamId() const
Definition: being.h:1082
void setAttackTime()
Definition: being.h:709
int * mSpriteHide
Definition: being.h:1301
int getTileX() const
Definition: being.h:168
uint8_t getDirection() const
Definition: being.h:494
void updateName()
Definition: being.cpp:3425
void addGuild(Guild *const guild)
Definition: being.cpp:1237
std::string mSpeech
Definition: being.h:1186
void botLogic()
Definition: being.cpp:1999
const Color * mTextColor
Definition: being.h:1199
static BadgeDrawType::Type mShowBadges
Definition: being.h:1348
int getActionTime() const
Definition: being.h:128
void drawOther(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3756
std::string getDeadAction() const
Definition: being.cpp:1527
int getMaxHit() const
Definition: being.h:782
BeingId mCreatorId
Definition: being.h:1372
void incUsage()
Definition: being.h:968
void drawSpeech(const int offsetX, const int offsetY)
Definition: being.cpp:2405
std::string mClanName
Definition: being.h:1185
BeingTypeId getSubType() const
Definition: being.h:400
int getOffset() const
Definition: being.cpp:2467
ItemColor mHairColor
Definition: being.h:1376
void setLevel(const int n)
Definition: being.h:601
int getCriticalHit() const
Definition: being.h:788
const std::string & getPartyName() const
Definition: being.h:255
void undressItemById(const int id)
Definition: being.cpp:4705
void updateSprite(const unsigned int slot, const int id, const std::string &color)
Definition: being.cpp:2771
int mUsageCounter
Definition: being.h:1364
void enableShop(const bool b)
Definition: being.cpp:5344
int getLanguageId()
Definition: being.h:1079
int getTargetOffsetX() const
Definition: being.h:415
void drawHpBar(Graphics *const graphics, const int maxHP, const int hp, const int damage, const UserColorIdT color1, const UserColorIdT color2, const int x, const int y, const int width, const int height) const
Definition: being.cpp:4253
void setSpriteCards(const unsigned int slot, const int id, const CardsList &cards)
Definition: being.cpp:3048
void setHP(const int hp)
Definition: being.cpp:4334
void drawHomunculusSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:4059
bool mGotComment
Definition: being.h:1379
AnimatedSprite * mEmotionSprite
Definition: being.h:1174
void setChat(ChatObject *const obj)
Definition: being.cpp:5322
time_t getOtherTime() const
Definition: being.h:733
bool mBotAi
Definition: being.h:1385
void playSfx(const SoundInfo &sound, Being *const being, const bool main, const int x, const int y) const
Definition: being.cpp:4967
void updateBadgesCount()
Definition: being.cpp:5312
void addItemParticles(const int id, const SpriteDisplay &display)
Definition: being.cpp:5044
int * mSpriteDraw
Definition: being.h:1302
void talkTo() const
Definition: being.cpp:3675
int getGroupId() const
Definition: being.h:1087
void addSpiritBalls(const unsigned int balls, const int effectId)
Definition: being.cpp:5495
std::string mName
Definition: being.h:1180
TargetCursorSizeT getTargetCursorSize() const
Definition: being.cpp:518
time_t mTalkTime
Definition: being.h:1354
void drawElementalSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:4169
int getMinHit() const
Definition: being.h:776
void addAfkEffect()
Definition: being.cpp:4918
int mMaxHP
Definition: being.h:1326
SpeechBubble * mSpeechBubble
Definition: being.h:1290
void drawBasic(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:3930
time_t mTestTime
Definition: being.h:1356
std::string getGenderSignWithSpace() const
Definition: being.cpp:2538
int getTileY() const
Definition: being.h:174
int mAttackRange
Definition: being.h:1222
void setPath(const Path &path)
Definition: being.cpp:559
std::vector< Particle * > mSpiritParticles
Definition: being.h:1312
int getHeight() const
Definition: being.h:536
uint16_t mBadgesCount
Definition: being.h:1375
void resetCounters()
Definition: being.cpp:4350
void drawPlayer(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3694
int getSpriteID(const int slot) const
Definition: being.cpp:4894
void drawCompound(Graphics *const graphics, const int posX, const int posY) const
Definition: being.cpp:3937
void drawNpc(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3768
void setWalkSpeed(const int speed)
Definition: being.h:452
int getManner() const
Definition: being.h:1040
int getHP() const
Definition: being.h:759
std::string mRaceName
Definition: being.h:1182
void drawSpritesSDL(Graphics *const graphics, const int posX, const int posY) const
Definition: being.cpp:3913
void updateColors()
Definition: being.cpp:2663
void setCreatorId(const BeingId id)
Definition: being.h:1025
int getSortPixelY() const
Definition: being.h:961
void setHorse(const int horseId)
Definition: being.cpp:5425
void updateGuild()
Definition: being.cpp:1333
unsigned int mPvpRank
Definition: being.h:1361
void flashName(const int time)
Definition: being.cpp:2532
void postInit(const BeingTypeId subType, Map *const map)
Definition: being.cpp:289
int mSortOffsetY
Definition: being.h:1318
void setComment(const std::string &n)
Definition: being.h:815
std::string mBuyBoard
Definition: being.h:1304
void removeAfkEffect()
Definition: being.cpp:4923
void setPvpRank(const unsigned int rank)
Definition: being.h:752
GenderT mGender
Definition: being.h:1228
void setDamageTaken(const int damage)
Definition: being.h:596
static VisibleNamePos::Type mVisibleNamePos
Definition: being.h:1350
ItemColor getHairColor() const
Definition: being.h:883
static bool mDrawHotKeys
Definition: being.h:1337
void drawPlayerSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:3967
bool getShowName() const
Definition: being.h:245
void removeSpiritBalls(const unsigned int balls)
Definition: being.cpp:5510
void setLook(const uint16_t look)
Definition: being.cpp:5004
std::vector< BeingSlot > mSlots
Definition: being.h:1206
int getAreaSize() const
Definition: being.h:1049
ChatObject * getChat() const
Definition: being.h:999
void setPixelPositionF(const float x, const float y, const float z) A_INLINE
Definition: being.h:522
time_t getTestTime() const
Definition: being.h:730
void recalcSpritesOrder()
Definition: being.cpp:4359
int mHP
Definition: being.h:1325
void setShowName(const bool doShowName)
Definition: being.cpp:1166
const ItemInfo * mEquippedWeapon
Definition: being.h:1195
std::string getGenderSign() const
Definition: being.cpp:2547
bool isGM() const
Definition: being.h:659
void handleAttack(Being *const victim, const int damage, const int attackId)
Definition: being.cpp:963
void handleSkillCasting(Being *const victim, const int skillId, const int skillLevel)
Definition: being.cpp:1025
AnimatedSprite * mBadges[BadgeIndex::BadgeIndexSize]
Definition: being.h:1177
bool mAllowNpcEquipment
Definition: being.h:1386
void setName(const std::string &name)
Definition: being.cpp:1136
void setHairColor(const ItemColor color)
Definition: being.h:877
void removeSpecialEffect()
Definition: being.cpp:4941
void removeAllItemsParticles()
Definition: being.cpp:5037
Vector mDest
Definition: being.h:1201
static void saveComment(const std::string &name, const std::string &comment, const ActorTypeT &type)
Definition: being.cpp:4771
ChatObject * mChat
Definition: being.h:1308
void setSubtype(const BeingTypeId subtype, const uint16_t look)
Definition: being.cpp:371
void showShopBadge(const bool show)
Definition: being.cpp:5255
void takeDamage(Being *const attacker, const int amount, const AttackTypeT type, const int attackId, const int level)
Definition: being.cpp:667
void setOtherTime()
Definition: being.h:718
void setHairColorSpriteID(const unsigned int slot, const int id)
Definition: being.cpp:3291
void setCriticalHit(const int n)
Definition: being.h:791
void setHairColor(const unsigned int slot, const ItemColor color)
Definition: being.cpp:3389
void dumpSprites() const
Definition: being.cpp:3409
void setEmote(const uint8_t emotion, const int emote_time)
Definition: being.cpp:4829
void setMaxHP(const int hp)
Definition: being.cpp:4343
int mGoodStatus
Definition: being.h:1329
time_t getMoveTime() const
Definition: being.h:721
const std::string & getName() const
Definition: being.h:232
Guild * getGuild() const
Definition: being.cpp:1280
uint16_t mTeamId
Definition: being.h:1373
int mCastEndTime
Definition: being.h:1368
int mActionTime
Definition: being.h:1213
void addCast(const int dstX, const int dstY, const int skillId, const int skillLevel, const int range, const int waitTimeTicks)
Definition: being.cpp:5369
bool updateFromCache()
Definition: being.cpp:3464
bool isAlive() const
Definition: being.h:488
BeingId getCreatorId() const
Definition: being.h:1028
void setSpriteSlot(const unsigned int slot, const BeingSlot &beingSlot)
Definition: being.cpp:3403
int mLastAttackY
Definition: being.h:1224
static bool mShowBattleEvents
Definition: being.h:1338
void setSpriteId(const unsigned int slot, const int id)
Definition: being.cpp:2789
Being * mOwner
Definition: being.h:1306
uint8_t calcDirection() const
Definition: being.cpp:1753
void setState(const uint8_t state)
Definition: being.cpp:4803
BlockTypeT getBlockType() const
Definition: being.h:442
BeingTypeId mSubType
Definition: being.h:1230
static bool mShowPlayersStatus
Definition: being.h:1343
void setDistance(const int n)
Definition: being.h:555
void setBuyBoard(const std::string &text)
Definition: being.cpp:5336
void updateBadgesPosition()
Definition: being.cpp:2313
bool isBuyShopEnabled() const
Definition: being.cpp:5351
static int getDefaultEffectId(const AttackTypeT &type)
Definition: being.cpp:953
const std::string & getGuildName() const
Definition: being.h:259
void drawMonster(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3780
HorseInfo * mHorseInfo
Definition: being.h:1309
int getTargetOffsetY() const
Definition: being.h:422
int searchSlotValue(const std::vector< int > &slotRemap, const int val) const
Definition: being.cpp:4650
void removeHorse()
Definition: being.cpp:5404
void drawMonsterSpriteAt(Graphics *const graphics, const int x, const int y) const
Definition: being.cpp:4005
time_t mOtherTime
Definition: being.h:1355
void setTeamId(const uint16_t teamId)
Definition: being.cpp:5187
void setGuildPos(const std::string &pos)
Definition: being.cpp:1233
void setPartyName(const std::string &name)
Definition: being.cpp:5246
static std::string loadComment(const std::string &name, const ActorTypeT &type)
Definition: being.cpp:4734
int getCachedX() const
Definition: being.h:153
virtual void setGender(const GenderT gender)
Definition: being.cpp:3581
void setSpeech(const std::string &text)
Definition: being.cpp:572
void setGoodStatus(const int n)
Definition: being.h:803
const std::string & getExtName() const
Definition: being.h:235
static unsigned int mConfLineLim
Definition: being.h:1332
void setDirectionDelayed(const uint8_t direction)
Definition: being.h:502
uint8_t mOldHeight
Definition: being.h:1322
int mGroupId
Definition: being.h:1221
void updateAwayEffect()
Definition: being.cpp:4951
bool mInactive
Definition: being.h:1383
BeingInfo * mInfo
Definition: being.h:1173
int getDistance() const
Definition: being.h:552
void enableBotAi()
Definition: being.h:1046
void setActionTime(const int actionTime)
Definition: being.h:135
void setMinHit(const int n)
Definition: being.h:779
int getMaxHP() const
Definition: being.h:762
std::string mExtName
Definition: being.h:1181
void unSetSprite(const unsigned int slot)
Definition: being.cpp:2861
virtual unsigned char getBlockWalkMask() const
Definition: being.h:432
SpriteParticleInfo::iterator SpriteParticleInfoIter
Definition: being.h:1204
void setSprite(const unsigned int slot, const int id, std::string color, ItemColor colorId)
static int mAwayEffect
Definition: being.h:1349
unsigned int getSpiritBalls() const
Definition: being.h:1020
static bool mLowTraffic
Definition: being.h:1336
uint16_t getLook() const
Definition: being.h:922
BeingActionT getCurrentAction() const
Definition: being.h:482
int getAttackSpeed() const
Definition: being.h:470
bool isInParty() const
Definition: being.h:321
bool mShop
Definition: being.h:1381
void removeGuild(const int id)
Definition: being.cpp:1248
std::map< int, ParticleInfo * > SpriteParticleInfo
Definition: being.h:1203
void drawHomunculus(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3792
void createSpeechBubble()
Definition: being.cpp:366
void setIp(const std::string &ip)
Definition: being.h:746
void setAttackRange(const int range)
Definition: being.h:843
static bool mShowOwnHP
Definition: being.h:1340
static void reReadConfig()
Definition: being.cpp:3431
static bool mHideErased
Definition: being.h:1345
int mMaxHit
Definition: being.h:1359
void setCachedDestination(const int dstX, const int dstY)
Definition: being.h:149
const std::string & getIp() const
Definition: being.h:743
GenderT getGender() const
Definition: being.h:626
static uint8_t genderToInt(const GenderT sex) A_CONST
Definition: being.h:927
FlashText * mDispName
Definition: being.h:1191
int mEmotionTime
Definition: being.h:1214
int mCachedX
Definition: being.h:1316
void removeItemParticles(const int id)
Definition: being.cpp:5148
static bool mUseDiagonal
Definition: being.h:1347
void setReachable(const ReachableT n)
Definition: being.h:607
CursorT getHoverCursor() const
Definition: being.h:893
std::vector< AnimatedSprite * > mDownHorseSprites
Definition: being.h:1310
static bool mShowMobHP
Definition: being.h:1339
std::string mComment
Definition: being.h:1303
void setTestTime()
Definition: being.h:715
void handleSkill(Being *const victim, const int damage, const int skillId, const int skillLevel)
Definition: being.cpp:1050
Party * mParty
Definition: being.h:1211
int mPixelOffsetY
Definition: being.h:1319
int mCachedY
Definition: being.h:1317
void updateComment()
Definition: being.cpp:4725
time_t getTalkTime() const
Definition: being.h:727
virtual int getLastAttackX() const
Definition: being.h:974
int mCriticalHit
Definition: being.h:1360
void fixDirectionOffsets(int &offsetX, int &offsetY) const
Definition: being.cpp:5528
void setAdvanced(const bool n)
Definition: being.h:831
const ActorTypeT mType
Definition: being.h:1287
int mPreStandTime
Definition: being.h:1226
Particle * mSpecialParticle
Definition: being.h:1307
void showClanBadge(const bool show)
Definition: being.cpp:1206
void showPartyBadge(const bool show)
Definition: being.cpp:5226
int getAttackDelay() const
Definition: being.h:773
void updateBotDirection(const int dstX, const int dstY)
Definition: being.cpp:2224
void drawPlayerSprites(Graphics *const graphics, const int posX, const int posY) const
Definition: being.cpp:3893
void setManner(const int manner)
Definition: being.h:1037
bool isSellShopEnabled() const
Definition: being.cpp:5357
bool mAdvanced
Definition: being.h:1380
virtual int getLastAttackY() const
Definition: being.h:977
int mMinHit
Definition: being.h:1358
int mBadgesY
Definition: being.h:1371
static time_t mUpdateConfigTime
Definition: being.h:1331
static int getHitEffect(const Being *const attacker, const AttackTypeT type, const int attackId, const int level)
Definition: being.cpp:870
uint8_t mDirection
Definition: being.h:1231
std::string getCastAction() const
Definition: being.cpp:1526
std::string getSellBoard() const
Definition: being.h:1010
int16_t getNumberOfGuilds() const
Definition: being.h:318
void recreateItemParticles()
Definition: being.cpp:5163
void clearPath()
Definition: being.cpp:554
bool isAdvanced() const
Definition: being.h:828
int mAttackDelay
Definition: being.h:1357
BeingActionT mAction
Definition: being.h:1229
int * mSpriteRemap
Definition: being.h:1300
void setRiding(const bool b)
Definition: being.cpp:5412
ActorTypeT getType() const
Definition: being.h:116
ItemColor getSpriteColor(const int slot) const
Definition: being.cpp:4910
int mLevel
Definition: being.h:1220
const BeingInfo * getInfo() const
Definition: being.h:409
std::string mSpriteAction
Definition: being.h:1179
void drawMercenary(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3804
void setSpiritBalls(const unsigned int balls)
Definition: being.cpp:5474
unsigned int getPvpRank() const
Definition: being.h:749
int decUsage()
Definition: being.h:971
void serverRemove()
Definition: being.cpp:5363
void showInactiveBadge(const bool show)
Definition: being.cpp:5274
void setGuild(Guild *const guild)
Definition: being.cpp:1354
void addSpecialEffect(const int effect)
Definition: being.cpp:4928
std::string getSpawnAction() const
Definition: being.cpp:1528
void setEnemy(const bool n)
Definition: being.h:740
const ItemInfo * getEquippedWeapon() const
Definition: being.h:226
void setGM(const bool gm)
Definition: being.cpp:3666
unsigned int mNumber
Definition: being.h:1362
void setTalkTime()
Definition: being.h:712
void setSpriteColor(const unsigned int slot, const int id, const std::string &color)
Definition: being.cpp:2890
int mAttackSpeed
Definition: being.h:1218
int getGoodStatus() const
Definition: being.h:800
void setSpriteColorId(const unsigned int slot, const int id, ItemColor colorId)
Definition: being.cpp:2967
time_t mAttackTime
Definition: being.h:1353
void drawPortal(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3828
int getCachedY() const
Definition: being.h:156
int mWalkSpeed
Definition: being.h:1297
void botFixOffset(int &dstX, int &dstY) const
Definition: being.cpp:2080
std::vector< AnimatedSprite * > mUpHorseSprites
Definition: being.h:1311
void setSellBoard(const std::string &text)
Definition: being.cpp:5328
bool mShowName
Definition: being.h:1234
static bool mHighlightMapPortals
Definition: being.h:1334
static bool mShowLevel
Definition: being.h:1342
void draw(Graphics *const graphics, const int offsetX, const int offsetY) const
Definition: being.cpp:3839
void addToCache() const
Definition: being.cpp:3513
static bool mShowGender
Definition: being.h:1341
Path mPath
Definition: being.h:1197
void clearGuilds()
Definition: being.cpp:1289
void showTeamBadge(const bool show)
Definition: being.cpp:5197
void setAttackDelay(const int n)
Definition: being.h:770
unsigned int mSpiritBalls
Definition: being.h:1363
int mSpeed
Definition: being.h:1298
int getDamageTaken() const
Definition: being.h:593
void fireMissile(Being *const victim, const MissileInfo &missile) const
Definition: being.cpp:1378
const BeingSlot & getSpriteSlot(const int slot) const
Definition: being.cpp:4902
Definition: color.h:76
int getHeight() const
int getNumberOfLayers() const
int getWidth() const
Definition: guild.h:70
void updateCoords()
void setTileCoords(const int x, const int y)
void setMap(Map *const map)
void nextTile()
void setGroupId(const int id)
void setAction(const BeingActionT &action, const int attackId)
void optionChanged(const std::string &value)
void setDestination(const int x, const int y)
Definition: map.h:75
Definition: party.h:63
Definition: text.h:40
Definition: vector.h:40
Cursor ::T CursorT
Definition: cursor.h:44
bool Move
Definition: move.h:30
Gender ::T GenderT
Definition: gender.h:35
uint16_t ItemColor
Definition: itemcolor.h:30
#define restrict
Definition: localconsts.h:165
#define constexpr2
Definition: localconsts.h:49
#define restrict2
Definition: localconsts.h:166
#define override
Definition: localconsts.h:47
#define A_WARN_UNUSED
Definition: localconsts.h:161
#define notfinal
Definition: localconsts.h:261
#define A_NONNULL(...)
Definition: localconsts.h:168
#define A_NONNULLPOINTER
Definition: localconsts.h:266
#define noexcept2
Definition: localconsts.h:50
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
int main(int argc, char *argv[])
Definition: main.cpp:40
uint32_t guild
uint32_t party
bool gm(InputEvent &event)
Definition: commands.cpp:75
bool skill(InputEvent &event)
Definition: commands.cpp:97
@ BadgeIndexSize
Definition: badgeindex.h:40
@ CURSOR_POINTER
Definition: cursor.h:29
Being * createBeing(const BeingId id, const int job)
Definition: beingrecv.cpp:507
@ UNSPECIFIED
Definition: gender.h:33
@ MALE
Definition: gender.h:31
@ FEMALE
Definition: gender.h:32
Equipment * getEquipment()
Definition: playerinfo.cpp:220
std::list< Position > Path
Definition: position.h:49
Reachable ::T ReachableT
Definition: reachable.h:35
Definition: attack.h:30
const SoundInfo * sound
Definition: being.h:88
int time
Definition: being.h:91
NextSoundInfo()
Definition: being.h:78
TargetCursorSize ::T TargetCursorSizeT
UserColorId ::T UserColorIdT
Definition: usercolorid.h:99
#define STD_VECTOR
Definition: vector.h:30