19 #ifndef TRINITYCORE_CREATURE_H
20 #define TRINITYCORE_CREATURE_H
63 #define CREATURE_FLAG_EXTRA_DB_ALLOWED (CREATURE_FLAG_EXTRA_INSTANCE_BIND | CREATURE_FLAG_EXTRA_CIVILIAN | \
64 CREATURE_FLAG_EXTRA_NO_PARRY | CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN | CREATURE_FLAG_EXTRA_NO_BLOCK | \
65 CREATURE_FLAG_EXTRA_NO_CRUSH | CREATURE_FLAG_EXTRA_NO_XP_AT_KILL | CREATURE_FLAG_EXTRA_TRIGGER | \
66 CREATURE_FLAG_EXTRA_NO_TAUNT | CREATURE_FLAG_EXTRA_WORLDEVENT | CREATURE_FLAG_EXTRA_NO_CRIT | \
67 CREATURE_FLAG_EXTRA_NO_SKILLGAIN | CREATURE_FLAG_EXTRA_TAUNT_DIMINISH | CREATURE_FLAG_EXTRA_ALL_DIMINISH | \
68 CREATURE_FLAG_EXTRA_GUARD | CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING | CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ | CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK)
70 #define CREATURE_REGEN_INTERVAL 2 * IN_MILLISECONDS
72 #define MAX_KILL_CREDIT 2
73 #define MAX_CREATURE_MODELS 4
74 #define MAX_CREATURE_NAMES 4
75 #define CREATURE_MAX_SPELLS 8
76 #define MAX_CREATURE_DIFFICULTIES 3
144 uint32 GetRandomValidModelId()
const;
145 uint32 GetFirstValidModelId()
const;
146 uint32 GetFirstInvisibleModel()
const;
147 uint32 GetFirstVisibleModel()
const;
173 return canTameExotic || !IsExotic();
215 #pragma pack(push, 1)
389 if (slot >= m_items.size())
392 return m_items[slot];
394 bool Empty()
const {
return m_items.empty(); }
398 m_items.push_back(
new VendorItem(item, maxcount, ptime, ExtendedCost, type));
404 for (VendorItemList::const_iterator itr = m_items.begin(); itr != m_items.end(); ++itr)
422 #define MAX_TRAINERSPELL_ABILITY_REQS 3
459 #define CREATURE_Z_ATTACK_RANGE 3
461 #define MAX_VENDOR_ITEMS 150 // Limitation in 4.x.x item count in SMSG_LIST_INVENTORY
471 explicit Creature(
bool isWorldObject =
false);
480 void DisappearAndDie();
483 bool LoadCreaturesAddon();
485 void LoadEquipment(
int8 id = 1,
bool force =
false);
490 void GetRespawnPosition(
float &x,
float &y,
float &z,
float* ori =
nullptr,
float* dist =
nullptr)
const;
500 bool CanFly()
const override {
return (GetCreatureTemplate()->InhabitType &
INHABIT_AIR) != 0; }
505 void InitializeReactState();
508 bool isCanInteractWithBattleMaster(
Player* player,
bool msg)
const;
509 bool isCanTrainingAndResetTalentsOf(
Player* player)
const;
510 bool CanCreatureAttack(
Unit const* victim,
bool force =
true)
const;
513 bool isElite()
const;
514 bool isWorldBoss()
const;
516 bool IsDungeonBoss()
const;
523 void Motion_Initialize();
534 void UpdateMovementFlags();
550 float GetSpellDamageMod(
int32 Rank)
const;
562 std::string GetAIName()
const;
563 std::string GetScriptName()
const;
564 uint32 GetScriptId()
const;
572 bool LoadCreatureFromDB(
ObjectGuid::LowType spawnId,
Map* map,
bool addToMap =
true,
bool allowDuplicate =
false);
576 virtual void DeleteFromDB();
579 void StartPickPocketRefillTimer();
584 Player* GetLootRecipient()
const;
585 Group* GetLootRecipientGroup()
const;
586 bool hasLootRecipient()
const {
return !m_lootRecipient.IsEmpty() || !m_lootRecipientGroup.IsEmpty(); }
587 bool isTappedBy(
Player const* player)
const;
589 void SetLootRecipient (
Unit* unit);
590 void AllLootRemovedFromCorpse();
604 bool CanStartAttack(
Unit const* u,
bool force)
const;
605 float GetAttackDistance(
Unit const* player)
const;
606 float GetAggroRange(
Unit const* target)
const;
610 Unit* SelectNearestTarget(
float dist = 0,
bool playerOnly =
false)
const;
611 Unit* SelectNearestTargetInAttackDistance(
float dist = 0)
const;
613 Unit* SelectNearestHostileUnitInAggroRange(
bool useLOS =
false)
const;
615 void DoFleeToGetAssistance();
617 void CallAssistance();
621 bool CanAssistTo(
const Unit* u,
const Unit* enemy,
bool checkfaction =
true)
const;
622 bool _IsTargetAcceptable(
const Unit* target)
const;
627 void RemoveCorpse(
bool setSpawnTime =
true);
629 void DespawnOrUnsummon(
uint32 msTimeToDespawn = 0);
632 time_t GetRespawnTimeEx()
const;
634 void Respawn(
bool force =
false);
647 m_combatPulseDelay = delay;
648 if (m_combatPulseTime == 0 || m_combatPulseTime > delay)
649 m_combatPulseTime = delay;
655 void SendZoneUnderAttackMessage(
Player* attacker);
657 void SetInCombatWithZone();
665 virtual uint32 GetPetAutoSpellOnPos(
uint8 pos)
const;
667 void SetPosition(
float x,
float y,
float z,
float o);
670 void SetHomePosition(
float x,
float y,
float z,
float o) { m_homePosition.Relocate(x, y, z, o); }
672 void GetHomePosition(
float& x,
float& y,
float& z,
float& ori)
const { m_homePosition.GetPosition(x, y, z, ori); }
677 void GetTransportHomePosition(
float& x,
float& y,
float& z,
float& ori)
const { m_transportHomePosition.GetPosition(x, y, z, ori); }
686 void SearchFormation();
690 Unit* SelectVictim();
695 void LowerPlayerDamageReq(
uint32 unDamage);
702 static float _GetDamageMod(
int32 Rank);
711 bool IsFocusing(
Spell const* focusSpell =
nullptr,
bool withDelay =
false);
712 void ReleaseFocus(
Spell const* focusSpell =
nullptr,
bool withDelay =
true);
715 void SetTextRepeatId(
uint8 textGroup,
uint8 id);
716 void ClearTextRepeatGroup(
uint8 textGroup);
725 static float _GetHealthMod(
int32 Rank);
743 void RegenerateMana();
744 void RegenerateHealth();
745 void Regenerate(
Powers power);
773 void ForcedDespawn(
uint32 timeMSToDespawn = 0);
774 bool CheckNoGrayAggroConfig(
uint32 playerLevel,
uint32 creatureLevel)
const;
void RemoveFromWorld() override
Definition: Unit.cpp:11733
Position m_transportHomePosition
Definition: Creature.h:760
Definition: Creature.h:287
void SetSkinner(ObjectGuid guid)
Definition: Creature.h:582
uint32 mount
Definition: Creature.h:356
uint32 m_corpseDelay
Definition: Creature.h:736
CreatureTemplate const * m_creatureInfo
Definition: Creature.h:764
Definition: Creature.h:258
bool RegenHealth
Definition: Creature.h:140
int16 maxlevel
Definition: Creature.h:94
Definition: DBCEnums.h:404
ChatType
Definition: Creature.h:338
bool RemoveItem(uint32 item_id, uint8 type)
Definition: Creature.cpp:62
Definition: DBCEnums.h:406
virtual void UpdateResistances(uint32 school)=0
void ResetPlayerDamageReq()
Definition: Creature.h:696
Definition: DBCEnums.h:411
VendorItem * GetItem(uint32 slot) const
Definition: Creature.h:387
void SetRespawnTime(uint32 respawn)
Definition: Creature.h:633
#define MAX_CREATURE_DIFFICULTIES
Definition: Creature.h:76
int32 expansion
Definition: Creature.h:95
float ModManaExtra
Definition: Creature.h:134
uint32 expansionUnknown
Definition: Creature.h:96
uint32 GetRespawnDelay() const
Definition: Creature.h:637
virtual void UpdateMaxPower(Powers power)=0
std::list< VendorItemCount > VendorItemCounts
Definition: Creature.h:420
Definition: Creature.h:341
Definition: Creature.h:42
std::unordered_map< uint8, EquipmentInfo > EquipmentInfoContainerInternal
Definition: Creature.h:283
CreatureData const * m_creatureData
Definition: Creature.h:765
void GetTransportHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:677
uint32 SkinLootId
Definition: Creature.h:121
Definition: Creature.h:60
int8_t int8
Definition: Define.h:148
std::string Name
Definition: Creature.h:88
Position m_homePosition
Definition: Creature.h:759
std::unordered_map< ObjectGuid::LowType, CreatureAddon > CreatureAddonContainer
Definition: Creature.h:363
Definition: DBCEnums.h:407
void SetTransportHomePosition(float x, float y, float z, float o)
Definition: Creature.h:675
bool LoadFromDB(ObjectGuid::LowType spawnId, Map *map)
Definition: Creature.h:571
uint8 Type
Definition: Creature.h:376
uint32 maxcount
Definition: Creature.h:373
Definition: Creature.h:59
ObjectGuid m_victim
Definition: Creature.h:800
virtual bool IsImmunedToSpellEffect(SpellInfo const *spellInfo, uint32 index) const
Definition: Unit.cpp:9339
#define MAX_SPELL_CHARM
Definition: Unit.h:325
VendorItem const * FindItemCostPair(uint32 item_id, uint32 extendedCost, uint8 type) const
Definition: Creature.cpp:78
void AddLootMode(uint16 lootMode)
Definition: Creature.h:595
std::unordered_map< uint32, CreatureAddon > CreatureTemplateAddonContainer
Definition: Creature.h:364
bool HasLootMode(uint16 lootMode)
Definition: Creature.h:593
#define CREATURE_MAX_SPELLS
Definition: Creature.h:75
virtual uint8 GetPetAutoSpellSize() const
Definition: Creature.h:664
uint32 m_boundaryCheckTime
Definition: Creature.h:738
uint8 getLevelForTarget(WorldObject const *) const override
Definition: Unit.h:1409
float scale
Definition: Creature.h:101
uint32 phaseid
Definition: Creature.h:312
Definition: Creature.h:343
Definition: QuestDef.h:279
bool m_isTempWorldObject
Definition: Creature.h:706
uint32 rank
Definition: Creature.h:102
uint8 movementType
Definition: Creature.h:307
StringVector Title
Definition: Creature.h:262
void SetNoCallAssistance(bool val)
Definition: Creature.h:618
uint32 id
Definition: Creature.h:293
SpellSchoolMask
Definition: SharedDefines.h:285
uint32 type_flags2
Definition: Creature.h:118
int16 minlevel
Definition: Creature.h:93
float ModExperience
Definition: Creature.h:137
Definition: SpellInfo.h:326
std::string AIName
Definition: Creature.h:127
ObjectGuid lootingGroupLowGUID
Definition: Creature.h:653
float HoverHeight
Definition: Creature.h:130
uint32 GetWaypointPath() const
Definition: Creature.h:680
Definition: Creature.h:57
uint32 dynamicflags
Definition: Creature.h:111
uint64 npcflag
Definition: Creature.h:98
Definition: SharedDefines.h:3942
uint32 displayid
Definition: Creature.h:296
float ModHealth
Definition: Creature.h:131
void UpdateWaypointID(uint32 wpID)
Definition: Creature.h:684
float speed_run
Definition: Creature.h:100
TrainerSpell()
Definition: Creature.h:426
void setRegeneratingHealth(bool regenHealth)
Definition: Creature.h:663
virtual bool IsImmunedToSpell(SpellInfo const *spellInfo) const
Definition: Unit.cpp:9255
std::vector< uint32 > CreatureQuestItemList
Definition: Creature.h:209
time_t m_respawnTime
Definition: Creature.h:734
Definition: Creature.h:54
void Clear()
Definition: Creature.h:402
AiReaction
Definition: SharedDefines.h:4351
Unit & m_owner
Definition: Creature.h:802
float speed_walk
Definition: Creature.h:99
uint32 curhealth
Definition: Creature.h:305
uint32 trainerType
Definition: Creature.h:451
uint32 InhabitType
Definition: Creature.h:129
~TrainerSpellData()
Definition: Creature.h:448
bool m_AlreadyCallAssistance
Definition: Creature.h:751
std::vector< uint8 > CreatureTextRepeatIds
Definition: Creature.h:464
bool is_trigger
Definition: Creature.h:323
Definition: Creature.h:332
Loot loot
Definition: Creature.h:578
Definition: Creature.h:50
uint32 curmana
Definition: Creature.h:306
bool m_AlreadySearchedAssistance
Definition: Creature.h:752
ObjectGuid m_lootRecipient
Definition: Creature.h:727
virtual bool HasSpell(uint32) const
Definition: Unit.h:1593
Definition: Creature.h:272
Stats
Definition: SharedDefines.h:235
virtual void UpdateArmor()=0
uint32 path_id
Definition: Creature.h:355
Definition: Creature.h:334
ObjectGuid::LowType GetSpawnId() const
Definition: Creature.h:487
MovementGeneratorType GetDefaultMovementType() const
Definition: Creature.h:624
CreatureData const * GetCreatureData() const
Definition: Creature.h:559
arena_t NULL
Definition: jemalloc_internal.h:624
void AddToWorld() override
Definition: Unit.cpp:11724
Position const & GetHomePosition() const
Definition: Creature.h:673
void SetCurrentEquipmentId(uint8 id)
Definition: Creature.h:548
uint32 GenerateArmor(CreatureTemplate const *info) const
Definition: Creature.h:243
SpellSchools
Definition: SharedDefines.h:272
bool HasReactState(ReactStates state) const
Definition: Creature.h:504
void SetFormation(CreatureGroup *formation)
Definition: Creature.h:688
bool IsInEvadeMode() const
Definition: Creature.h:520
Definition: Creature.h:790
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:670
bool IsTrigger() const
Definition: Creature.h:496
float spawndist
Definition: Creature.h:303
uint32 bytes2
Definition: Creature.h:358
bool HasSearchedAssistance() const
Definition: Creature.h:620
uint32 GossipMenuId
Definition: Creature.h:92
Definition: Creature.h:345
Definition: Creature.h:333
Definition: Creature.h:56
CreatureFlagsExtra
Definition: Creature.h:40
uint32 ReqSkillRank
Definition: Creature.h:435
void SetHomePosition(const Position &pos)
Definition: Creature.h:671
uint32 BaseMana
Definition: Creature.h:221
#define MAX_TRAINERSPELL_ABILITY_REQS
Definition: Creature.h:422
Definition: Creature.h:467
uint32 MechanicImmuneMask
Definition: Creature.h:141
bool IsReputationGainDisabled() const
Definition: Creature.h:693
uint32 flags_extra
Definition: Creature.h:142
uint32 GetCorpseDelay() const
Definition: Creature.h:493
uint32 GetCombatPulseDelay() const
Definition: Creature.h:644
void SetDisableReputationGain(bool disable)
Definition: Creature.h:692
MovementGeneratorType m_defaultMovementType
Definition: Creature.h:746
Definition: Creature.h:47
AssistDelayEvent(ObjectGuid victim, Unit &owner)
Definition: Creature.h:793
bool dbData
Definition: Creature.h:314
void LoadPath(uint32 pathid)
Definition: Creature.h:681
VendorItemCount(uint32 _item, uint32 _count)
Definition: Creature.h:412
uint64 LowType
Definition: ObjectGuid.h:199
StringVector TitleAlt
Definition: Creature.h:263
bool CanSwim() const
Definition: Creature.h:499
std::unordered_map< uint32, CreatureQuestItemList > CreatureQuestItemMap
Definition: Creature.h:210
Definition: DBCEnums.h:413
CreatureTextRepeatGroup m_textRepeat
Definition: Creature.h:787
#define MAX_SPELL_SCHOOL
Definition: SharedDefines.h:283
Definition: Creature.h:340
double distance(double x, double y)
Definition: g3dmath.h:731
uint32 faction
Definition: Creature.h:97
time_t _pickpocketLootRestore
Timers.
Definition: Creature.h:732
Definition: Creature.h:367
std::list< ObjectGuid > GuidList
Definition: ObjectGuid.h:333
uint32 ReqSkillLine
Definition: Creature.h:434
uint16 m_LootMode
Definition: Creature.h:767
std::unordered_map< uint32, EquipmentInfoContainerInternal > EquipmentInfoContainer
Definition: Creature.h:284
time_t const & GetRespawnTime() const
Definition: Creature.h:631
Definition: SharedDefines.h:69
bool IsRacialLeader() const
Definition: Creature.h:494
uint32 m_combatPulseDelay
Definition: Creature.h:740
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost, uint8 _Type)
Definition: Creature.h:369
float posX
Definition: Creature.h:298
UnitAI * i_AI
Definition: Unit.h:2242
uint32 phaseGroup
Definition: Creature.h:313
Position const & GetTransportHomePosition() const
Definition: Creature.h:678
#define true
Definition: CascPort.h:17
Definition: Creature.h:44
uint32 GetCurrentWaypointID() const
Definition: Creature.h:683
ReactStates m_reactState
Definition: Creature.h:742
Definition: DBCEnums.h:416
Definition: SharedDefines.h:3664
virtual bool IsInvisibleDueToDespawn() const
Definition: Object.h:640
uint32 unit_flags2
Definition: Creature.h:110
uint32 GetFlags2() const
Definition: ItemTemplate.h:657
Definition: SharedDefines.h:3980
void RemoveLootMode(uint16 lootMode)
Definition: Creature.h:596
uint32 m_PlayerDamageReq
Definition: Creature.h:697
float m_respawnradius
Definition: Creature.h:737
virtual void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bool addTotalPct, float &minDamage, float &maxDamage)=0
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:558
uint32 spawntimesecs
Definition: Creature.h:302
Definition: DBCEnums.h:414
void SetMeleeDamageSchool(SpellSchools school)
Definition: Creature.h:528
Definition: Creature.h:46
bool CanGeneratePickPocketLoot() const
Definition: Creature.h:581
Definition: Creature.h:317
#define MAX_KILL_CREDIT
Definition: Creature.h:72
Definition: Creature.h:805
void SetTransportHomePosition(const Position &pos)
Definition: Creature.h:676
virtual void SaveRespawnTime()
Definition: Object.h:524
Powers
Definition: SharedDefines.h:246
float GetOrientation() const
Definition: Position.h:107
uint32 bytes1
Definition: Creature.h:357
Definition: Creature.h:424
std::vector< VendorItem * > VendorItemList
Definition: Creature.h:381
Definition: Creature.h:45
uint32 trainer_type
Definition: Creature.h:113
virtual bool UpdateStats(Stats stat)=0
CreatureGroup * m_formation
Definition: Creature.h:781
int8 GetOriginalEquipmentId() const
Definition: Creature.h:546
Definition: CreatureGroups.h:56
time_t m_corpseRemoveTime
Definition: Creature.h:733
uint32 MovementType
Definition: Creature.h:128
virtual void SetDisplayId(uint32 modelId)
Definition: Unit.cpp:12799
uint32 AttackPower
Definition: Creature.h:223
float ModDamage
Definition: Creature.h:136
void SetRespawnRadius(float dist)
Definition: Creature.h:641
void SetDefaultMovementType(MovementGeneratorType mgt)
Definition: Creature.h:625
LocaleConstant
Definition: Common.h:115
Definition: DBCEnums.h:415
uint32 mingold
Definition: Creature.h:125
Definition: Creature.h:347
float GetRespawnRadius() const
Definition: Creature.h:640
uint32 Entry
Definition: Creature.h:81
virtual void SetCanDualWield(bool value)
Definition: Unit.h:1360
std::string IconName
Definition: Creature.h:91
Definition: LootMgr.h:314
float posY
Definition: Creature.h:299
uint32 ReqAbility[MAX_TRAINERSPELL_ABILITY_REQS]
Definition: Creature.h:437
float GetPositionY() const
Definition: Position.h:105
std::string FemaleName
Definition: Creature.h:89
std::unordered_map< uint8, CreatureTextRepeatIds > CreatureTextRepeatGroup
Definition: Creature.h:465
G3D::int16 z
Definition: Vector3int16.h:46
InhabitTypeValues
Definition: Creature.h:329
uint32 unit_flags
Definition: Creature.h:109
void SetPosition(const Position &pos)
Definition: Creature.h:668
StringVector Name
Definition: Creature.h:274
CreatureAI * AI() const
Definition: Creature.h:525
void SetLootMode(uint16 lootMode)
Definition: Creature.h:594
float GenerateBaseDamage(CreatureTemplate const *info) const
Definition: Creature.h:248
int8 equipmentId
Definition: Creature.h:297
Definition: Creature.h:51
void SetCorpseDelay(uint32 delay)
Definition: Creature.h:492
float GetPositionZ() const
Definition: Position.h:106
int32_t int32
Definition: Define.h:146
Definition: CreatureAI.h:68
bool m_regenHealth
Definition: Creature.h:753
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
void SetOriginalEntry(uint32 entry)
Definition: Creature.h:700
Definition: Creature.h:410
G3D::int16 y
Definition: Vector2int16.h:38
uint16_t uint16
Definition: Define.h:151
uint32 GenerateMana(CreatureTemplate const *info) const
Definition: Creature.h:234
Definition: Creature.h:53
uint32 trainer_class
Definition: Creature.h:114
Definition: DBCEnums.h:409
std::unordered_map< uint16, CreatureBaseStats > CreatureBaseStatsContainer
Definition: Creature.h:256
Definition: DBCEnums.h:408
virtual bool CanAlwaysSee(WorldObject const *) const
Definition: Object.h:659
bool m_AI_locked
Definition: Creature.h:754
uint32 m_combatPulseTime
Definition: Creature.h:739
bool isRegeneratingHealth()
Definition: Creature.h:662
VendorItemCounts m_vendorItemCounts
Definition: Creature.h:723
Definition: DBCEnums.h:419
uint32 m_originalEntry
Definition: Creature.h:757
Definition: DBCEnums.h:410
Spell const * _focusSpell
Definition: Creature.h:784
bool CanWalk() const
Definition: Creature.h:498
float combat_reach
Definition: Creature.h:320
bool Empty() const
Definition: Creature.h:394
ReactStates
Definition: Unit.h:1127
float ModMana
Definition: Creature.h:133
uint32 m_path_id
Definition: Creature.h:778
Definition: SharedDefines.h:3672
uint32 ReqLevel
Definition: Creature.h:436
TrainerSpellData()
Definition: Creature.h:447
uint8 m_equipmentId
Definition: Creature.h:748
float ModHealthExtra
Definition: Creature.h:132
bool DisableReputationGain
Definition: Creature.h:762
Creature & m_owner
Definition: Creature.h:812
bool TriggerJustRespawned
Definition: Creature.h:782
bool CanFly() const override
Definition: Creature.h:500
virtual bool Execute(uint64, uint32)
Definition: EventProcessor.h:42
float RangeVariance
Definition: Creature.h:107
uint32 VehicleId
Definition: Creature.h:124
bool IsPet() const
Definition: Unit.h:1403
static int32 DifficultyIDToDifficultyEntryIndex(uint32 difficulty)
Definition: Creature.h:176
uint32 GetItemCount() const
Definition: Creature.h:395
uint32 displayId_other_gender
Definition: Creature.h:322
void DoImmediateBoundaryCheck()
Definition: Creature.h:643
SpellSchoolMask m_meleeDamageSchoolMask
Definition: Creature.h:756
CreatureGroup * GetFormation()
Definition: Creature.h:687
void ResetLootMode()
Definition: Creature.h:597
DeathState
Definition: Unit.h:539
Definition: SharedDefines.h:3934
Definition: Creature.h:353
bool IsGoldRequired(ItemTemplate const *pProto) const
Definition: Creature.h:379
Definition: Creature.h:342
Definition: EventProcessor.h:28
Definition: Creature.h:48
uint32 RangeAttackTime
Definition: Creature.h:105
std::vector< std::string > StringVector
Definition: Common.h:142
bool IsGuard() const
Definition: Creature.h:497
uint32 Modelid1
Definition: Creature.h:84
ReactStates GetReactState() const
Definition: Creature.h:503
uint32 m_respawnDelay
Definition: Creature.h:735
std::unordered_map< uint32, TrainerSpell > TrainerSpellMap
Definition: Creature.h:443
uint32 SpellID
Definition: Creature.h:432
uint32 dynamicflags
Definition: Creature.h:311
bool IsCivilian() const
Definition: Creature.h:495
Definition: ItemTemplate.h:647
uint32 Modelid3
Definition: Creature.h:86
uint32 spawnMask
Definition: Creature.h:308
CreatureData()
Definition: Creature.h:289
uint32 Modelid2
Definition: Creature.h:85
virtual void setDeathState(DeathState s)
Definition: Unit.cpp:10593
uint32 unit_flags
Definition: Creature.h:310
Definition: DB2Structure.h:710
uint32 RangedAttackPower
Definition: Creature.h:224
uint32 BaseArmor
Definition: Creature.h:222
StringVector Name
Definition: Creature.h:260
SPECIFIC_TYPE * Find(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:74
uint32 GenerateHealth(CreatureTemplate const *info) const
Definition: Creature.h:229
VendorItemList m_items
Definition: Creature.h:385
uint32 trainer_race
Definition: Creature.h:115
Definition: Creature.h:55
ObjectGuid _skinner
Definition: Creature.h:729
Definition: SharedDefines.h:85
uint32 m_groupLootTimer
Definition: Creature.h:652
void SetNoSearchAssistance(bool val)
Definition: Creature.h:619
SpellSchoolMask GetMeleeDamageSchoolMask() const override
Definition: Creature.h:527
virtual void SetObjectScale(float scale)
Definition: Object.h:111
uint32 _focusDelay
Locks the target during spell cast for proper facing
Definition: Creature.h:785
std::vector< uint32 > auras
Definition: Creature.h:360
float m_SightDistance
Definition: Creature.h:704
#define TC_GAME_API
Definition: Define.h:134
void ResetPickPocketRefillTimer()
Definition: Creature.h:580
TrainerSpellMap spellList
Definition: Creature.h:450
uint32 currentwaypoint
Definition: Creature.h:304
StringVector NameAlt
Definition: Creature.h:261
Definition: SharedDefines.h:3554
virtual void SetTarget(ObjectGuid const &)=0
uint32 item
Definition: Creature.h:372
uint32 BaseAttackTime
Definition: Creature.h:104
virtual std::string const & GetNameForLocaleIdx(LocaleConstant) const
Definition: Object.h:482
uint32 itemId
Definition: Creature.h:415
Definition: Creature.h:52
MovementGeneratorType
Definition: MotionMaster.h:35
uint32 dmgschool
Definition: Creature.h:103
Definition: DBCEnums.h:418
uint32 emote
Definition: Creature.h:359
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
Definition: DBCEnums.h:417
ObjectGuid GetSkinner() const
Definition: Creature.h:583
float orientation
Definition: Creature.h:301
uint8_t uint8
Definition: Define.h:152
Definition: Position.h:27
bool hasLootRecipient() const
Definition: Creature.h:586
uint32 incrtime
Definition: Creature.h:374
Definition: SharedDefines.h:3938
ForcedDespawnDelayEvent(Creature &owner)
Definition: Creature.h:808
Definition: Creature.h:331
void SetCombatPulseDelay(uint32 delay)
Definition: Creature.h:645
uint8 GetCurrentEquipmentId() const
Definition: Creature.h:547
ObjectGuid m_lootRecipientGroup
Definition: Creature.h:728
uint32 family
Definition: Creature.h:112
std::map< uint32, time_t > CreatureSpellCooldowns
Definition: Creature.h:456
Definition: Creature.h:445
uint16 mapid
Definition: Creature.h:294
ObjectGuid::LowType m_spawnId
For new or temporary creatures is 0 for saved it is lowguid.
Definition: Creature.h:747
float ModArmor
Definition: Creature.h:135
SkillType
Definition: SharedDefines.h:3881
const FieldDescriptor value
Definition: descriptor.h:1522
bool RacialLeader
Definition: Creature.h:138
int16_t int16
Definition: Define.h:147
uint32 phaseMask
Definition: Creature.h:295
Player session in the World.
Definition: WorldSession.h:882
Definition: ObjectGuid.h:189
Definition: DBCEnums.h:422
uint32_t uint32
Definition: g3dmath.h:168
void AddAssistant(ObjectGuid guid)
Definition: Creature.h:796
uint32 ExtendedCost
Definition: Creature.h:375
#define MAX_EQUIPMENT_ITEMS
Definition: Unit.h:1297
float bounding_radius
Definition: Creature.h:319
G3D::int16 x
Definition: Vector2int16.h:37
static Vector3int16 ceil(const Vector3 &v)
Definition: Vector3int16.cpp:55
GuidList m_assistants
Definition: Creature.h:801
float BaseVariance
Definition: Creature.h:106
uint32 Modelid4
Definition: Creature.h:87
uint32 lootid
Definition: Creature.h:119
uint32 pickpocketLootId
Definition: Creature.h:120
Definition: DBCEnums.h:421
bool IsCastable() const
Definition: Creature.h:440
Definition: SharedDefines.h:3671
Definition: Creature.h:58
Definition: Creature.h:277
Definition: DBCEnums.h:412
float GetPositionX() const
Definition: Position.h:104
uint16 GetLootMode() const
Definition: Creature.h:592
time_t lastIncrementTime
Definition: Creature.h:417
virtual void UpdateMaxHealth()=0
uint32 GetHealth() const
Definition: Unit.h:1426
WeaponAttackType
Definition: Unit.h:615
Definition: Creature.h:383
Definition: Creature.h:49
Type
Type of JSON value.
Definition: rapidjson.h:642
virtual bool hasQuest(uint32) const
Definition: Object.h:180
uint64 npcflag
Definition: Creature.h:309
std::unordered_map< uint32, CreatureTemplate > CreatureTemplateContainer
Definition: Creature.h:213
SkillType GetRequiredLootSkill() const
Definition: Creature.h:150
std::unordered_map< uint16, CreatureModelInfo > CreatureModelContainer
Definition: Creature.h:327
uint32 maxgold
Definition: Creature.h:126
Definition: Creature.h:43
void SetRespawnDelay(uint32 delay)
Definition: Creature.h:638
bool IsTameable(bool canTameExotic) const
Definition: Creature.h:167
uint32 m_waypointID
Definition: Creature.h:777
void SetReactState(ReactStates st)
Definition: Creature.h:502
virtual bool UpdateAllStats()=0
Definition: SharedDefines.h:3656
uint32 movementId
Definition: Creature.h:139
uint32 GetOriginalEntry() const
Definition: Creature.h:699
uint32 ScriptID
Definition: Creature.h:143
Definition: ItemTemplate.h:211
float posZ
Definition: Creature.h:300
uint32 unit_class
Definition: Creature.h:108
bool IsDamageEnoughForLootingAndReward() const
Definition: Creature.h:694
virtual bool hasInvolvedQuest(uint32) const
Definition: Object.h:181
std::string SubName
Definition: Creature.h:90
Definition: Creature.h:79
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:672
void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost, uint8 type)
Definition: Creature.h:396
uint32 type
Definition: Creature.h:116
uint32 MoneyCost
Definition: Creature.h:433
Definition: DBCEnums.h:420
bool IsExotic() const
Definition: Creature.h:162
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
Definition: Creature.h:346
int8 m_originalEquipmentId
Definition: Creature.h:749
Definition: Creature.h:218
Definition: DBCEnums.h:405
virtual void UpdateAttackPowerAndDamage(bool ranged=false)=0
int8 gender
Definition: Creature.h:321
Definition: DBCStructure.h:338
Definition: SharedDefines.h:3665
uint32 count
Definition: Creature.h:416
uint32 type_flags
Definition: Creature.h:117
Definition: Creature.h:344