TrinityCore
Loading...
Searching...
No Matches
CreatureData.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef CreatureData_h__
19#define CreatureData_h__
20
21#include "DBCEnums.h"
22#include "SharedDefines.h"
23#include "SpawnData.h"
24#include "UnitDefines.h"
25#include "WorldPacket.h"
26#include <string>
27#include <unordered_map>
28#include <vector>
29#include <cmath>
30
31struct ItemTemplate;
32enum class VisibilityDistanceType : uint8;
33
35{
37 CREATURE_STATIC_FLAG_NO_XP = 0x00000002, // CREATURE_FLAG_EXTRA_NO_XP
40 CREATURE_STATIC_FLAG_TAMEABLE = 0x00000010, // CREATURE_TYPE_FLAG_TAMEABLE
41 CREATURE_STATIC_FLAG_IMMUNE_TO_PC = 0x00000020, // UNIT_FLAG_IMMUNE_TO_PC
42 CREATURE_STATIC_FLAG_IMMUNE_TO_NPC = 0x00000040, // UNIT_FLAG_IMMUNE_TO_NPC
44 CREATURE_STATIC_FLAG_SESSILE = 0x00000100, // creature_template_movement.Rooted = 1
45 CREATURE_STATIC_FLAG_UNINTERACTIBLE = 0x00000200, // UNIT_FLAG_UNINTERACTIBLE
46 CREATURE_STATIC_FLAG_NO_AUTOMATIC_REGEN = 0x00000400, // Creatures with that flag uses no UNIT_FLAG2_REGENERATE_POWER
47 CREATURE_STATIC_FLAG_DESPAWN_INSTANTLY = 0x00000800, // Creature instantly disappear when killed
49 CREATURE_STATIC_FLAG_CREATOR_LOOT = 0x00002000, // Lootable only by creator(engineering dummies)
52 CREATURE_STATIC_FLAG_BOSS_MOB = 0x00010000, // CREATURE_TYPE_FLAG_BOSS_MOB, original description: Raid Boss Mob
54 CREATURE_STATIC_FLAG_AQUATIC = 0x00040000, // aka Water Only, creature_template_movement.Ground = 0
55 CREATURE_STATIC_FLAG_AMPHIBIOUS = 0x00080000, // creature_template_movement.Swim = 1
56 CREATURE_STATIC_FLAG_NO_MELEE_FLEE = 0x00100000, // Prevents melee(does not prevent chasing, does not make creature passive). Not sure what 'Flee' means but another flag is named NO_MELEE_APPROACH
57 CREATURE_STATIC_FLAG_VISIBLE_TO_GHOSTS = 0x00200000, // CREATURE_TYPE_FLAG_VISIBLE_TO_GHOSTS
58 CREATURE_STATIC_FLAG_PVP_ENABLING = 0x00400000, // Old UNIT_FLAG_PVP_ENABLING, now UNIT_BYTES_2_OFFSET_PVP_FLAG from UNIT_FIELD_BYTES_2
59 CREATURE_STATIC_FLAG_DO_NOT_PLAY_WOUND_ANIM = 0x00800000, // CREATURE_TYPE_FLAG_DO_NOT_PLAY_WOUND_ANIM
60 CREATURE_STATIC_FLAG_NO_FACTION_TOOLTIP = 0x01000000, // CREATURE_TYPE_FLAG_NO_FACTION_TOOLTIP
61 CREATURE_STATIC_FLAG_IGNORE_COMBAT = 0x02000000, // Actually only changes react state to passive
62 CREATURE_STATIC_FLAG_ONLY_ATTACK_PVP_ENABLING = 0x04000000, // "Only attack targets that are PvP enabling"
63 CREATURE_STATIC_FLAG_CALLS_GUARDS = 0x08000000, // Creature will summon a guard if player is within its aggro range (even if creature doesn't attack per se)
64 CREATURE_STATIC_FLAG_CAN_SWIM = 0x10000000, // UNIT_FLAG_CAN_SWIM
65 CREATURE_STATIC_FLAG_FLOATING = 0x20000000, // creature_template_movement.Flight = 1
66 CREATURE_STATIC_FLAG_MORE_AUDIBLE = 0x40000000, // CREATURE_TYPE_FLAG_MORE_AUDIBLE
67 CREATURE_STATIC_FLAG_LARGE_AOI = 0x80000000 // UnitFlags2 0x200000
68};
69
71{
73 CREATURE_STATIC_FLAG_2_FORCE_PARTY_MEMBERS_INTO_COMBAT = 0x00000002, // Original description: Force Raid Combat
74 CREATURE_STATIC_FLAG_2_RAID_LOCK_ON_DEATH = 0x00000004, // "Lock Tappers To Raid On Death", toggleable by 'Set "RAID_LOCK_ON_DEATH" flag for unit(s)' action, CREATURE_FLAG_EXTRA_INSTANCE_BIND
75 CREATURE_STATIC_FLAG_2_SPELL_ATTACKABLE = 0x00000008, // CREATURE_TYPE_FLAG_SPELL_ATTACKABLE, original description(not valid anymore?): No Harmful Vertex Coloring
76 CREATURE_STATIC_FLAG_2_NO_CRUSHING_BLOWS = 0x00000010, // CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS
80 CREATURE_STATIC_FLAG_2_IGNORE_FEIGN_DEATH = 0x00000100, // CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH
83 CREATURE_STATIC_FLAG_2_INTERACT_WHILE_DEAD = 0x00000800, // CREATURE_TYPE_FLAG_INTERACT_WHILE_DEAD
86 CREATURE_STATIC_FLAG_2_SKIN_WITH_HERBALISM = 0x00004000, // CREATURE_TYPE_FLAG_SKIN_WITH_HERBALISM
87 CREATURE_STATIC_FLAG_2_SKIN_WITH_MINING = 0x00008000, // CREATURE_TYPE_FLAG_SKIN_WITH_MINING
90 CREATURE_STATIC_FLAG_2_ALLOW_MOUNTED_COMBAT = 0x00040000, // CREATURE_TYPE_FLAG_ALLOW_MOUNTED_COMBAT
92 CREATURE_STATIC_FLAG_2_NO_DEATH_MESSAGE = 0x00100000, // CREATURE_TYPE_FLAG_NO_DEATH_MESSAGE
97 CREATURE_STATIC_FLAG_2_HIDE_BODY = 0x02000000, // UNIT_FLAG2_HIDE_BODY
100 CREATURE_STATIC_FLAG_2_CAN_SAFE_FALL = 0x10000000, // Original description: No Collision
101 CREATURE_STATIC_FLAG_2_CAN_ASSIST = 0x20000000, // CREATURE_TYPE_FLAG_CAN_ASSIST, original description: Player Can Heal/Buff
102 CREATURE_STATIC_FLAG_2_NO_SKILL_GAINS = 0x40000000, // CREATURE_FLAG_EXTRA_NO_SKILL_GAINS
103 CREATURE_STATIC_FLAG_2_NO_PET_BAR = 0x80000000 // CREATURE_TYPE_FLAG_NO_PET_BAR
105
107{
110 CREATURE_STATIC_FLAG_3_DO_NOT_FADE_IN = 0x00000004, // UNIT_FLAG2_DO_NOT_FADE_IN
111 CREATURE_STATIC_FLAG_3_MASK_UID = 0x00000008, // CREATURE_TYPE_FLAG_MASK_UID, original description: Non-Unique In Combat Log
112 CREATURE_STATIC_FLAG_3_SKIN_WITH_ENGINEERING = 0x00000010, // CREATURE_TYPE_FLAG_SKIN_WITH_ENGINEERING
116 CREATURE_STATIC_FLAG_3_CANNOT_SWIM = 0x00000100, // UNIT_FLAG_CANNOT_SWIM
117 CREATURE_STATIC_FLAG_3_TAMEABLE_EXOTIC = 0x00000200, // CREATURE_TYPE_FLAG_TAMEABLE_EXOTIC
118 CREATURE_STATIC_FLAG_3_GIGANTIC_AOI = 0x00000400, // Since MoP, creatures with that flag have UnitFlags2 0x400000
119 CREATURE_STATIC_FLAG_3_INFINITE_AOI = 0x00000800, // Since MoP, creatures with that flag have UnitFlags2 0x40000000
121 CREATURE_STATIC_FLAG_3_NO_NAME_PLATE = 0x00002000, // CREATURE_TYPE_FLAG_NO_NAME_PLATE
124 CREATURE_STATIC_FLAG_3_USE_MODEL_COLLISION_SIZE = 0x00010000, // CREATURE_TYPE_FLAG_USE_MODEL_COLLISION_SIZE
125 CREATURE_STATIC_FLAG_3_ATTACKER_IGNORES_FACING = 0x00020000, // In 3.3.5 used only by Rocket Propelled Warhead
126 CREATURE_STATIC_FLAG_3_ALLOW_INTERACTION_WHILE_IN_COMBAT = 0x00040000, // CREATURE_TYPE_FLAG_ALLOW_INTERACTION_WHILE_IN_COMBAT
130 CREATURE_STATIC_FLAG_3_COLLIDE_WITH_MISSILES = 0x00400000, // CREATURE_TYPE_FLAG_COLLIDE_WITH_MISSILES
131 CREATURE_STATIC_FLAG_3_CAN_BE_MULTITAPPED = 0x00800000, // Original description: Do Not Tap (Credit to threat list)
132 CREATURE_STATIC_FLAG_3_DO_NOT_PLAY_MOUNTED_ANIMATIONS = 0x01000000, // CREATURE_TYPE_FLAG_DO_NOT_PLAY_MOUNTED_ANIMATIONS, original description: Disable Dodge, Parry and Block Animations
133 CREATURE_STATIC_FLAG_3_CANNOT_TURN = 0x02000000, // UNIT_FLAG2_CANNOT_TURN
136 CREATURE_STATIC_FLAG_3_PETS_ATTACK_WITH_3D_PATHING = 0x10000000, // "Pets attack with 3d pathing (Kologarn)"
137 CREATURE_STATIC_FLAG_3_LINK_ALL = 0x20000000, // CREATURE_TYPE_FLAG_LINK_ALL
141
143{
144 CREATURE_STATIC_FLAG_4_NO_BIRTH_ANIM = 0x00000001, // SMSG_UPDATE_OBJECT's "NoBirthAnim"
145 CREATURE_STATIC_FLAG_4_TREAT_AS_PLAYER_FOR_DIMINISHING_RETURNS = 0x00000002, // Primarily used by ToC champions
146 CREATURE_STATIC_FLAG_4_TREAT_AS_PLAYER_FOR_PVP_DEBUFF_DURATION = 0x00000004, // Primarily used by ToC champions
147 CREATURE_STATIC_FLAG_4_INTERACT_ONLY_WITH_CREATOR = 0x00000008, // CREATURE_TYPE_FLAG_INTERACT_ONLY_WITH_CREATOR, original description: Only Display Gossip for Summoner
148 CREATURE_STATIC_FLAG_4_DO_NOT_PLAY_UNIT_EVENT_SOUNDS = 0x00000010, // CREATURE_TYPE_FLAG_DO_NOT_PLAY_UNIT_EVENT_SOUNDS, original description: No Death Scream
149 CREATURE_STATIC_FLAG_4_HAS_NO_SHADOW_BLOB = 0x00000020, // CREATURE_TYPE_FLAG_HAS_NO_SHADOW_BLOB, original description(wrongly linked type flag or behavior was changed?): Can be Healed by Enemies
152 CREATURE_STATIC_FLAG_4_OBEYS_TAUNT_DIMINISHING_RETURNS = 0x00000100, // CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS
155 CREATURE_STATIC_FLAG_4_CANNOT_DAZE = 0x00000800, // "Cannot Daze (Combat Stun)"
157 CREATURE_STATIC_FLAG_4_IGNORE_LOS_WHEN_CASTING_ON_ME = 0x00002000, // "Other objects can ignore line of sight requirements when casting spells on me", used only by Ice Tomb in 3.3.5
159 CREATURE_STATIC_FLAG_4_TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS = 0x00008000, // CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT, "Treat as Raid Unit For Helpful Spells (Instances ONLY)", used by Valithria Dreamwalker
160 CREATURE_STATIC_FLAG_4_DONT_REPOSITION_IF_MELEE_TARGET_IS_TOO_CLOSE = 0x00010000, // "Don't reposition because melee target is too close"
162 CREATURE_STATIC_FLAG_4_5_MINUTE_LOOT_ROLL_TIMER = 0x00040000, // Used by Lich King
163 CREATURE_STATIC_FLAG_4_FORCE_GOSSIP = 0x00080000, // CREATURE_TYPE_FLAG_FORCE_GOSSIP
165 CREATURE_STATIC_FLAG_4_DO_NOT_SHEATHE = 0x00200000, // CREATURE_TYPE_FLAG_DO_NOT_SHEATHE, original description: Manual Sheathing control
166 CREATURE_STATIC_FLAG_4_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS = 0x00400000, // UnitFlags2 0x8000000, original description: Attacker Ignores Minimum Ranges
168 CREATURE_STATIC_FLAG_4_PREVENT_SWIM = 0x01000000, // UnitFlags2 0x1000000, original description: AI will only swim if target swims
169 CREATURE_STATIC_FLAG_4_HIDE_IN_COMBAT_LOG = 0x02000000, // UnitFlags2 0x2000000, original description: Don't generate combat log when engaged with NPC's
173 CREATURE_STATIC_FLAG_4_DO_NOT_TARGET_ON_INTERACTION = 0x20000000, // CREATURE_TYPE_FLAG_DO_NOT_TARGET_ON_INTERACTION, original description: Doesn't change target on right click
174 CREATURE_STATIC_FLAG_4_DO_NOT_RENDER_OBJECT_NAME = 0x40000000, // CREATURE_TYPE_FLAG_DO_NOT_RENDER_OBJECT_NAME, original description: Hide name in world frame
175 CREATURE_STATIC_FLAG_4_QUEST_BOSS = 0x80000000 // CREATURE_TYPE_FLAG_QUEST_BOSS
177
178// EnumUtils: DESCRIBE THIS
180{
181 CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
182 CREATURE_FLAG_EXTRA_CIVILIAN = 0x00000002, // not aggro (ignore faction/reputation hostility)
183 CREATURE_FLAG_EXTRA_NO_PARRY = 0x00000004, // creature can't parry
184 CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN = 0x00000008, // creature can't counter-attack at parry
185 CREATURE_FLAG_EXTRA_NO_BLOCK = 0x00000010, // creature can't block
186 CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS = 0x00000020, // creature can't do crush attacks
187 CREATURE_FLAG_EXTRA_NO_XP = 0x00000040, // creature kill does not provide XP
188 CREATURE_FLAG_EXTRA_TRIGGER = 0x00000080, // trigger creature
189 CREATURE_FLAG_EXTRA_NO_TAUNT = 0x00000100, // creature is immune to taunt auras and 'attack me' effects
190 CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE = 0x00000200, // creature won't update movement flags
191 CREATURE_FLAG_EXTRA_GHOST_VISIBILITY = 0x00000400, // creature will only be visible to dead players
192 CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK = 0x00000800, // creature will use offhand attacks
193 CREATURE_FLAG_EXTRA_NO_SELL_VENDOR = 0x00001000, // players can't sell items to this vendor
194 CREATURE_FLAG_EXTRA_CANNOT_ENTER_COMBAT = 0x00002000, // creature is not allowed to enter combat
195 CREATURE_FLAG_EXTRA_WORLDEVENT = 0x00004000, // custom flag for world event creatures (left room for merging)
196 CREATURE_FLAG_EXTRA_GUARD = 0x00008000, // Creature is guard
197 CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH = 0x00010000, // creature ignores feign death
198 CREATURE_FLAG_EXTRA_NO_CRIT = 0x00020000, // creature can't do critical strikes
199 CREATURE_FLAG_EXTRA_NO_SKILL_GAINS = 0x00040000, // creature won't increase weapon skills
200 CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS = 0x00080000, // Taunt is subject to diminishing returns on this creature
201 CREATURE_FLAG_EXTRA_ALL_DIMINISH = 0x00100000, // creature is subject to all diminishing returns as players are
202 CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ = 0x00200000, // creature does not need to take player damage for kill credit
209 CREATURE_FLAG_EXTRA_DUNGEON_BOSS = 0x10000000, // creature is a dungeon boss (SET DYNAMICALLY, DO NOT ADD IN DB)
210 CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING = 0x20000000, // creature ignore pathfinding
211 CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK = 0x40000000, // creature is immune to knockback effects
213
214 // Masks
218
221
223{
224 None,
225 Run,
226 Hover,
227
228 Max
229};
230
232{
233 None,
235 CanFly,
236
237 Max
238};
239
241{
242 Run,
243 CanWalk,
245
246 Max
247};
248
250{
251 Walk,
252 CanRun,
253 AlwaysRun,
254
255 Max
256};
257
282
286
287static const uint8 MAX_KILL_CREDIT = 2;
291
292// from `creature_template` table
294{
296 uint32 DifficultyEntry[MAX_DIFFICULTY - 1];
302 std::string Name;
303 std::string Title;
304 std::string IconName;
313 float scale;
320 uint32 unit_class; // enum Classes. Note only 4 classes are known for creatures.
321 uint32 unit_flags; // enum UnitFlags mask values
322 uint32 unit_flags2; // enum UnitFlags2 mask values
324 CreatureFamily family; // enum CreatureFamily values (optional)
325 uint32 type; // enum CreatureType values
326 uint32 type_flags; // enum CreatureTypeFlags mask values
336 std::string AIName;
341 float ModMana;
342 float ModArmor;
352 std::string StringId;
354 uint32 GetRandomValidModelId() const;
355 uint32 GetFirstValidModelId() const;
356 uint32 GetFirstInvisibleModel() const;
357 uint32 GetFirstVisibleModel() const;
358
359 // helpers
361 {
363 return SKILL_HERBALISM;
364 else if (type_flags & CREATURE_TYPE_FLAG_SKIN_WITH_MINING)
365 return SKILL_MINING;
366 else if (type_flags & CREATURE_TYPE_FLAG_SKIN_WITH_ENGINEERING)
367 return SKILL_ENGINEERING;
368 else
369 return SKILL_SKINNING; // normal case
370 }
371
372 bool IsExotic() const
373 {
374 return (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_EXOTIC) != 0;
375 }
376
377 bool IsTameable(bool canTameExotic) const
378 {
379 if (type != CREATURE_TYPE_BEAST || family == CREATURE_FAMILY_NONE || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE) == 0)
380 return false;
381
382 // if can tame exotic then can tame any tameable
383 return canTameExotic || !IsExotic();
384 }
385
386 void InitializeQueryData();
387 WorldPacket BuildQueryData(LocaleConstant loc) const;
388};
389
390#pragma pack(push, 1)
391
392// Defines base stats for creatures (used to calculate HP/mana/armor/attackpower/rangedattackpower/all damage).
394{
400 float BaseDamage[MAX_EXPANSIONS];
401
402 // Helpers
403
405 {
406 return uint32(std::round(std::max(BaseHealth[info->expansion] * info->ModHealth, 1.0f)));
407 }
408
410 {
411 // Mana can be 0.
412 if (!BaseMana)
413 return 0;
414
415 return uint32(ceil(BaseMana * info->ModMana));
416 }
417
419 {
420 return uint32(ceil(BaseArmor * info->ModArmor));
421 }
422
423 float GenerateBaseDamage(CreatureTemplate const* info) const
424 {
425 return BaseDamage[info->expansion];
426 }
427
428 static CreatureBaseStats const* GetBaseStats(uint8 level, uint8 unitClass);
429};
430
432{
433 std::vector<std::string> Name;
434 std::vector<std::string> Title;
435};
436
441
442// from `creature` table
457
466
475
476#pragma pack(pop)
477
478// `creature_addon` table
492
493// Vendors
495{
496 VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
497 : item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) { }
498
500 uint32 maxcount; // 0 for infinity item amount
501 uint32 incrtime; // time for restore items amount if maxcount != 0
503
504 //helpers
505 bool IsGoldRequired(ItemTemplate const* pProto) const;
506};
507
509{
510 std::vector<VendorItem> m_items;
511
512 VendorItem const* GetItem(uint32 slot) const
513 {
514 if (slot >= m_items.size())
515 return nullptr;
516
517 return &m_items[slot];
518 }
519 bool Empty() const { return m_items.empty(); }
520 uint32 GetItemCount() const { return uint32(m_items.size()); }
521 void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost)
522 {
523 m_items.emplace_back(item, maxcount, ptime, ExtendedCost);
524 }
525 bool RemoveItem(uint32 item_id);
526 VendorItem const* FindItemCostPair(uint32 item_id, uint32 extendedCost) const;
527 void Clear()
528 {
529 m_items.clear();
530 }
531};
532
533#endif // CreatureData_h__
LocaleConstant
Definition Common.h:48
@ TOTAL_LOCALES
Definition Common.h:59
@ IN_MILLISECONDS
Definition Common.h:35
static const uint32 MAX_CREATURE_QUEST_ITEMS
static const uint32 CREATURE_REGEN_INTERVAL
CreatureFlagsExtra
@ CREATURE_FLAG_EXTRA_NO_BLOCK
@ CREATURE_FLAG_EXTRA_DB_ALLOWED
@ CREATURE_FLAG_EXTRA_NO_CRUSHING_BLOWS
@ CREATURE_FLAG_EXTRA_UNUSED_22
@ CREATURE_FLAG_EXTRA_UNUSED_27
@ CREATURE_FLAG_EXTRA_NO_CRIT
@ CREATURE_FLAG_EXTRA_DUNGEON_BOSS
@ CREATURE_FLAG_EXTRA_TRIGGER
@ CREATURE_FLAG_EXTRA_UNUSED
@ CREATURE_FLAG_EXTRA_IGNORE_PATHFINDING
@ CREATURE_FLAG_EXTRA_CANNOT_ENTER_COMBAT
@ CREATURE_FLAG_EXTRA_UNUSED_31
@ CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN
@ CREATURE_FLAG_EXTRA_NO_XP
@ CREATURE_FLAG_EXTRA_UNUSED_25
@ CREATURE_FLAG_EXTRA_INSTANCE_BIND
@ CREATURE_FLAG_EXTRA_OBEYS_TAUNT_DIMINISHING_RETURNS
@ CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE
@ CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK
@ CREATURE_FLAG_EXTRA_NO_PARRY
@ CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH
@ CREATURE_FLAG_EXTRA_NO_TAUNT
@ CREATURE_FLAG_EXTRA_NO_PLAYER_DAMAGE_REQ
@ CREATURE_FLAG_EXTRA_GHOST_VISIBILITY
@ CREATURE_FLAG_EXTRA_NO_SELL_VENDOR
@ CREATURE_FLAG_EXTRA_NO_SKILL_GAINS
@ CREATURE_FLAG_EXTRA_USE_OFFHAND_ATTACK
@ CREATURE_FLAG_EXTRA_UNUSED_23
@ CREATURE_FLAG_EXTRA_CIVILIAN
@ CREATURE_FLAG_EXTRA_UNUSED_24
@ CREATURE_FLAG_EXTRA_GUARD
@ CREATURE_FLAG_EXTRA_ALL_DIMINISH
@ CREATURE_FLAG_EXTRA_UNUSED_26
@ CREATURE_FLAG_EXTRA_WORLDEVENT
CreatureStaticFlags
@ CREATURE_STATIC_FLAG_PVP_ENABLING
@ CREATURE_STATIC_FLAG_IGNORE_COMBAT
@ CREATURE_STATIC_FLAG_AQUATIC
@ CREATURE_STATIC_FLAG_NO_SPELL_DEFENSE
@ CREATURE_STATIC_FLAG_BOSS_MOB
@ CREATURE_STATIC_FLAG_ONLY_ATTACK_PVP_ENABLING
@ CREATURE_STATIC_FLAG_CAN_WIELD_LOOT
@ CREATURE_STATIC_FLAG_VISIBLE_TO_GHOSTS
@ CREATURE_STATIC_FLAG_MOUNTABLE
@ CREATURE_STATIC_FLAG_COMBAT_PING
@ CREATURE_STATIC_FLAG_CREATOR_LOOT
@ CREATURE_STATIC_FLAG_CALLS_GUARDS
@ CREATURE_STATIC_FLAG_UNINTERACTIBLE
@ CREATURE_STATIC_FLAG_CAN_SWIM
@ CREATURE_STATIC_FLAG_MORE_AUDIBLE
@ CREATURE_STATIC_FLAG_DESPAWN_INSTANTLY
@ CREATURE_STATIC_FLAG_NO_XP
@ CREATURE_STATIC_FLAG_TAMEABLE
@ CREATURE_STATIC_FLAG_IMMUNE_TO_NPC
@ CREATURE_STATIC_FLAG_NO_MELEE_FLEE
@ CREATURE_STATIC_FLAG_UNKILLABLE
@ CREATURE_STATIC_FLAG_IMMUNE_TO_PC
@ CREATURE_STATIC_FLAG_NO_DEFENSE
@ CREATURE_STATIC_FLAG_SESSILE
@ CREATURE_STATIC_FLAG_CORPSE_RAID
@ CREATURE_STATIC_FLAG_NO_AUTOMATIC_REGEN
@ CREATURE_STATIC_FLAG_LARGE_AOI
@ CREATURE_STATIC_FLAG_DO_NOT_PLAY_WOUND_ANIM
@ CREATURE_STATIC_FLAG_NO_LOOT
@ CREATURE_STATIC_FLAG_NO_FACTION_TOOLTIP
@ CREATURE_STATIC_FLAG_FLOATING
@ CREATURE_STATIC_FLAG_AMPHIBIOUS
CreatureFlightMovementType
CreatureChaseMovementType
CreatureGroundMovementType
static const uint8 MAX_KILL_CREDIT
CreatureStaticFlags4
@ CREATURE_STATIC_FLAG_4_HIDE_IN_COMBAT_LOG
@ CREATURE_STATIC_FLAG_4_OBEYS_TAUNT_DIMINISHING_RETURNS
@ CREATURE_STATIC_FLAG_4_TREAT_AS_PLAYER_FOR_DIMINISHING_RETURNS
@ CREATURE_STATIC_FLAG_4_TREAT_AS_PLAYER_FOR_PVP_DEBUFF_DURATION
@ CREATURE_STATIC_FLAG_4_FORCE_GOSSIP
@ CREATURE_STATIC_FLAG_4_DO_NOT_TARGET_ON_INTERACTION
@ CREATURE_STATIC_FLAG_4_FLAT_HONOR_AWARD
@ CREATURE_STATIC_FLAG_4_DO_NOT_RENDER_OBJECT_NAME
@ CREATURE_STATIC_FLAG_4_DEALS_TRIPLE_DAMAGE_TO_PC_CONTROLLED_PETS
@ CREATURE_STATIC_FLAG_4_CANNOT_DAZE
@ CREATURE_STATIC_FLAG_4_ONLY_GENERATE_INITIAL_THREAT
@ CREATURE_STATIC_FLAG_4_NO_BIRTH_ANIM
@ CREATURE_STATIC_FLAG_4_PREFER_NPCS_WHEN_SEARCHING_FOR_ENEMIES
@ CREATURE_STATIC_FLAG_4_DONT_REPOSITION_IF_MELEE_TARGET_IS_TOO_CLOSE
@ CREATURE_STATIC_FLAG_4_SUPPRESS_INSTANCE_WIDE_RELEASE_IN_COMBAT
@ CREATURE_STATIC_FLAG_4_DO_NOT_PLAY_UNIT_EVENT_SOUNDS
@ CREATURE_STATIC_FLAG_4_5_MINUTE_LOOT_ROLL_TIMER
@ CREATURE_STATIC_FLAG_4_GIVE_QUEST_KILL_CREDIT_WHILE_OFFLINE
@ CREATURE_STATIC_FLAG_4_PREVENT_SWIM
@ CREATURE_STATIC_FLAG_4_DONT_REPOSITION_WITH_FRIENDS_IN_COMBAT
@ CREATURE_STATIC_FLAG_4_PET_OR_GUARDIAN_AI_DONT_GO_BEHIND_TARGET
@ CREATURE_STATIC_FLAG_4_NO_MELEE_APPROACH
@ CREATURE_STATIC_FLAG_4_DO_NOT_SHEATHE
@ CREATURE_STATIC_FLAG_4_NO_NPC_DAMAGE_BELOW_85PTC
@ CREATURE_STATIC_FLAG_4_ALLOW_NPC_COMBAT_WHILE_UNINTERACTIBLE
@ CREATURE_STATIC_FLAG_4_IGNORE_LOS_WHEN_CASTING_ON_ME
@ CREATURE_STATIC_FLAG_4_IGNORE_SPELL_MIN_RANGE_RESTRICTIONS
@ CREATURE_STATIC_FLAG_4_HAS_NO_SHADOW_BLOB
@ CREATURE_STATIC_FLAG_4_TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS
@ CREATURE_STATIC_FLAG_4_INTERACT_ONLY_WITH_CREATOR
@ CREATURE_STATIC_FLAG_4_QUEST_BOSS
@ CREATURE_STATIC_FLAG_4_UPDATE_CREATURE_RECORD_WHEN_INSTANCE_CHANGES_DIFFICULTY
CreatureRandomMovementType
static const uint32 CREATURE_NOPATH_EVADE_TIME
CreatureStaticFlags3
@ CREATURE_STATIC_FLAG_3_FACTION_LEADER
@ CREATURE_STATIC_FLAG_3_FOREVER_CORPSE_DURATION
@ CREATURE_STATIC_FLAG_3_AI_CAN_AUTO_LAND_IN_COMBAT
@ CREATURE_STATIC_FLAG_3_CHECKS_LIQUIDS
@ CREATURE_STATIC_FLAG_3_EXTENDED_CORPSE_DURATION
@ CREATURE_STATIC_FLAG_3_CAN_BE_MULTITAPPED
@ CREATURE_STATIC_FLAG_3_SKIN_WITH_ENGINEERING
@ CREATURE_STATIC_FLAG_3_LINK_ALL
@ CREATURE_STATIC_FLAG_3_NO_DAMAGE_HISTORY
@ CREATURE_STATIC_FLAG_3_IMMUNE_TO_PLAYER_BUFFS
@ CREATURE_STATIC_FLAG_3_PETS_ATTACK_WITH_3D_PATHING
@ CREATURE_STATIC_FLAG_3_USE_MODEL_COLLISION_SIZE
@ CREATURE_STATIC_FLAG_3_SPELL_CLICK_FOR_PARTY_ONLY
@ CREATURE_STATIC_FLAG_3_ATTACKER_IGNORES_FACING
@ CREATURE_STATIC_FLAG_3_TAMEABLE_EXOTIC
@ CREATURE_STATIC_FLAG_3_NO_AGGRO_ON_LEASH
@ CREATURE_STATIC_FLAG_3_INFINITE_AOI
@ CREATURE_STATIC_FLAG_3_DO_NOT_PLAY_MOUNTED_ANIMATIONS
@ CREATURE_STATIC_FLAG_3_NO_FRIENDLY_AREA_AURAS
@ CREATURE_STATIC_FLAG_3_ENEMY_CHECK_IGNORES_LOS
@ CREATURE_STATIC_FLAG_3_ALLOW_INTERACTION_WHILE_IN_COMBAT
@ CREATURE_STATIC_FLAG_3_DO_NOT_FADE_IN
@ CREATURE_STATIC_FLAG_3_MASK_UID
@ CREATURE_STATIC_FLAG_3_NO_NAME_PLATE
@ CREATURE_STATIC_FLAG_3_CANNOT_TURN
@ CREATURE_STATIC_FLAG_3_CANNOT_PENETRATE_WATER
@ CREATURE_STATIC_FLAG_3_AI_CAN_AUTO_TAKEOFF_IN_COMBAT
@ CREATURE_STATIC_FLAG_3_CANNOT_SWIM
@ CREATURE_STATIC_FLAG_3_GIGANTIC_AOI
@ CREATURE_STATIC_FLAG_3_NO_THREAT_FEEDBACK
@ CREATURE_STATIC_FLAG_3_DONT_PVP_ENABLE_OWNER
@ CREATURE_STATIC_FLAG_3_COLLIDE_WITH_MISSILES
CreatureStaticFlags2
@ CREATURE_STATIC_FLAG_2_IGNORE_FEIGN_DEATH
@ CREATURE_STATIC_FLAG_2_ALERT_CONTENT_TEAM_AT_90PTC_HP
@ CREATURE_STATIC_FLAG_2_RETURN_SOUL_SHARD_TO_MASTER_OF_PET
@ CREATURE_STATIC_FLAG_2_DOES_NOT_REDUCE_REPUTATION_FOR_RAIDS
@ CREATURE_STATIC_FLAG_2_CAN_SAFE_FALL
@ CREATURE_STATIC_FLAG_2_PVP_ENABLING_OOC
@ CREATURE_STATIC_FLAG_2_ACTION_TRIGGERS_WHILE_CHARMED
@ CREATURE_STATIC_FLAG_2_IGNORE_SANCTUARY
@ CREATURE_STATIC_FLAG_2_NO_WOUNDED_SLOWDOWN
@ CREATURE_STATIC_FLAG_2_SKIN_WITH_MINING
@ CREATURE_STATIC_FLAG_2_SERVER_ONLY
@ CREATURE_STATIC_FLAG_2_HIDE_BODY
@ CREATURE_STATIC_FLAG_2_NO_INTERRUPT_SCHOOL_COOLDOWN
@ CREATURE_STATIC_FLAG_2_SPAWN_DEFENSIVE
@ CREATURE_STATIC_FLAG_2_USE_CREATOR_BONUSES
@ CREATURE_STATIC_FLAG_2_IGNORE_MISDIRECTION
@ CREATURE_STATIC_FLAG_2_FORCE_PARTY_MEMBERS_INTO_COMBAT
@ CREATURE_STATIC_FLAG_2_NO_SKILL_GAINS
@ CREATURE_STATIC_FLAG_2_ALERT_CONTENT_TEAM_ON_DEATH
@ CREATURE_STATIC_FLAG_2_ALLOW_MOUNTED_COMBAT
@ CREATURE_STATIC_FLAG_2_RAID_LOCK_ON_DEATH
@ CREATURE_STATIC_FLAG_2_INTERACT_WHILE_DEAD
@ CREATURE_STATIC_FLAG_2_NO_OWNER_THREAT
@ CREATURE_STATIC_FLAG_2_SKIN_WITH_HERBALISM
@ CREATURE_STATIC_FLAG_2_CAN_ASSIST
@ CREATURE_STATIC_FLAG_2_NO_PET_BAR
@ CREATURE_STATIC_FLAG_2_NO_CRUSHING_BLOWS
@ CREATURE_STATIC_FLAG_2_FULL_SPELL_LIST
@ CREATURE_STATIC_FLAG_2_IGNORE_PATHING_FAILURE
@ CREATURE_STATIC_FLAG_2_SPELL_ATTACKABLE
@ CREATURE_STATIC_FLAG_2_NO_DEATH_MESSAGE
@ CREATURE_STATIC_FLAG_2_NO_PET_SCALING
static const uint32 MAX_CREATURE_SPELLS
static const uint32 PET_FOCUS_REGEN_INTERVAL
InhabitTypeValues
@ INHABIT_AIR
@ INHABIT_WATER
@ INHABIT_GROUND
@ INHABIT_ANYWHERE
@ INHABIT_ROOT
static const uint32 MAX_CREATURE_MODELS
#define MAX_DIFFICULTY
Definition DBCEnums.h:296
#define TC_GAME_API
Definition Define.h:114
uint8_t uint8
Definition Define.h:135
int8_t int8
Definition Define.h:131
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
VisibilityDistanceType
@ MAX_SPELL_SCHOOL
CreatureFamily
@ CREATURE_FAMILY_NONE
@ CREATURE_TYPE_BEAST
@ MAX_EXPANSIONS
@ CREATURE_TYPE_FLAG_SKIN_WITH_ENGINEERING
@ CREATURE_TYPE_FLAG_SKIN_WITH_HERBALISM
@ CREATURE_TYPE_FLAG_TAMEABLE
@ CREATURE_TYPE_FLAG_TAMEABLE_EXOTIC
@ CREATURE_TYPE_FLAG_SKIN_WITH_MINING
SkillType
@ SKILL_MINING
@ SKILL_ENGINEERING
@ SKILL_SKINNING
@ SKILL_HERBALISM
@ SPAWN_TYPE_CREATURE
Definition SpawnData.h:31
#define MAX_EQUIPMENT_ITEMS
Definition UnitDefines.h:29
std::vector< uint32 > auras
VisibilityDistanceType visibilityDistanceType
float GenerateBaseDamage(CreatureTemplate const *info) const
uint32 GenerateMana(CreatureTemplate const *info) const
uint32 GenerateHealth(CreatureTemplate const *info) const
uint32 GenerateArmor(CreatureTemplate const *info) const
float wander_distance
uint32 dynamicflags
uint32 unit_flags
uint32 currentwaypoint
std::vector< std::string > Title
std::vector< std::string > Name
uint32 modelid_other_gender
bool IsGroundAllowed() const
CreatureRandomMovementType Random
bool IsSwimAllowed() const
bool IsRooted() const
CreatureFlightMovementType Flight
CreatureChaseMovementType GetChase() const
uint32 GetInteractionPauseTimer() const
bool IsFlightAllowed() const
CreatureChaseMovementType Chase
CreatureGroundMovementType Ground
CreatureRandomMovementType GetRandom() const
SkillType GetRequiredLootSkill() const
CreatureFamily family
uint32 MechanicImmuneMask
std::string Name
std::string StringId
uint32 SpellSchoolImmuneMask
bool IsExotic() const
CreatureMovementData Movement
std::string Title
bool IsTameable(bool canTameExotic) const
std::string AIName
std::string IconName
std::vector< VendorItem > m_items
uint32 GetItemCount() const
VendorItem const * GetItem(uint32 slot) const
void AddItem(uint32 item, int32 maxcount, uint32 ptime, uint32 ExtendedCost)
VendorItem const * FindItemCostPair(uint32 item_id, uint32 extendedCost) const
Definition Creature.cpp:101
bool RemoveItem(uint32 item_id)
Definition Creature.cpp:89
bool Empty() const
uint32 ExtendedCost
bool IsGoldRequired(ItemTemplate const *pProto) const
Definition Creature.cpp:84
uint32 maxcount
VendorItem(uint32 _item, int32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
uint32 incrtime