diff --git a/src/game/AI/BaseAI/CreatureAI.cpp b/src/game/AI/BaseAI/CreatureAI.cpp index cef26cfe051..60a11ce09fd 100644 --- a/src/game/AI/BaseAI/CreatureAI.cpp +++ b/src/game/AI/BaseAI/CreatureAI.cpp @@ -33,7 +33,7 @@ CreatureAI::CreatureAI(Creature* creature, uint32 combatActions) : m_creature(creature), m_deathPrevented(false), m_followAngle(0.f), m_followDist(0.f) { - m_dismountOnAggro = !(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_MOUNTED_COMBAT); + m_dismountOnAggro = !(m_creature->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::MOUNTED_COMBAT); SetMeleeEnabled(!m_creature->GetSettings().HasFlag(CreatureStaticFlags::NO_MELEE_FLEE)); if (m_creature->GetSettings().HasFlag(CreatureStaticFlags::SESSILE)) SetAIImmobilizedState(true); diff --git a/src/game/AI/ScriptDevAI/base/escort_ai.cpp b/src/game/AI/ScriptDevAI/base/escort_ai.cpp index a22112e1954..8bd85511110 100644 --- a/src/game/AI/ScriptDevAI/base/escort_ai.cpp +++ b/src/game/AI/ScriptDevAI/base/escort_ai.cpp @@ -61,7 +61,7 @@ bool npc_escortAI::AssistPlayerInCombat(Unit* who) return false; // experimental (unknown) flag not present - if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST)) + if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::CAN_ASSIST)) return false; // unit state prevents (similar check is done in CanInitiateAttack which also include checking unit_flags. We skip those here) diff --git a/src/game/AI/ScriptDevAI/base/follower_ai.cpp b/src/game/AI/ScriptDevAI/base/follower_ai.cpp index e5d35b15b5d..f0c3c58cc6f 100644 --- a/src/game/AI/ScriptDevAI/base/follower_ai.cpp +++ b/src/game/AI/ScriptDevAI/base/follower_ai.cpp @@ -36,7 +36,7 @@ bool FollowerAI::AssistPlayerInCombat(Unit* who) return false; // experimental (unknown) flag not present - if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_CAN_ASSIST)) + if (!(m_creature->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::CAN_ASSIST)) return false; // unit state prevents (similar check is done in CanInitiateAttack which also include checking unit_flags. We skip those here) diff --git a/src/game/Entities/Creature.cpp b/src/game/Entities/Creature.cpp index 37373258a15..d3b3733e249 100644 --- a/src/game/Entities/Creature.cpp +++ b/src/game/Entities/Creature.cpp @@ -2166,7 +2166,7 @@ bool Creature::IsVisibleInGridForPlayer(Player* pl) const } // Dead player can see ghosts - if (GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_GHOST_VISIBLE) + if (GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::GHOST_VISIBLE) return true; // and not see any other diff --git a/src/game/Entities/Creature.h b/src/game/Entities/Creature.h index 22ceabcf862..b5072a3be2d 100644 --- a/src/game/Entities/Creature.h +++ b/src/game/Entities/Creature.h @@ -194,11 +194,11 @@ struct CreatureInfo SkillType GetRequiredLootSkill() const { - if (CreatureTypeFlags & CREATURE_TYPEFLAGS_HERBLOOT) + if (CreatureTypeFlags & CreatureTypeFlags::HERBLOOT) return SKILL_HERBALISM; - if (CreatureTypeFlags & CREATURE_TYPEFLAGS_MININGLOOT) + if (CreatureTypeFlags & CreatureTypeFlags::MININGLOOT) return SKILL_MINING; - if (CreatureTypeFlags & CREATURE_TYPEFLAGS_ENGINEERLOOT) + if (CreatureTypeFlags & CreatureTypeFlags::ENGINEERLOOT) return SKILL_ENGINEERING; return SKILL_SKINNING; // normal case @@ -206,12 +206,12 @@ struct CreatureInfo bool IsExotic() const { - return (CreatureTypeFlags & CREATURE_TYPEFLAGS_EXOTIC) != 0; + return (CreatureTypeFlags & CreatureTypeFlags::EXOTIC) != 0; } bool isTameable(bool exotic) const { - if (CreatureType != CREATURE_TYPE_BEAST || Family == 0 || (CreatureTypeFlags & CREATURE_TYPEFLAGS_TAMEABLE) == 0) + if (CreatureType != CREATURE_TYPE_BEAST || Family == 0 || (CreatureTypeFlags & CreatureTypeFlags::TAMEABLE) == 0) return false; // if can tame exotic then can tame any tameable @@ -780,7 +780,7 @@ class Creature : public Unit uint32 GetInteractionPauseTimer() const { return m_interactionPauseTimer; } GridReference& GetGridRef() { return m_gridRef; } - bool IsRegeneratingHealth() const { return (GetCreatureInfo()->RegenerateStats & REGEN_FLAG_HEALTH) != 0 && !(GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_SIEGE_WEAPON); } + bool IsRegeneratingHealth() const { return (GetCreatureInfo()->RegenerateStats & REGEN_FLAG_HEALTH) != 0 && !(GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::SIEGE_WEAPON); } bool IsRegeneratingPower() const; virtual uint8 GetPetAutoSpellSize() const { return CREATURE_MAX_SPELLS; } virtual uint32 GetPetAutoSpellOnPos(uint8 pos) const diff --git a/src/game/Entities/Relations.cpp b/src/game/Entities/Relations.cpp index 651467c73f5..84d604daeb4 100644 --- a/src/game/Entities/Relations.cpp +++ b/src/game/Entities/Relations.cpp @@ -338,7 +338,7 @@ bool Unit::IsFriend(const Unit* unit) const // WotLK+: Special flag overrides reaction if (GetTypeId() == TYPEID_UNIT) { - if (static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_TREAT_AS_IN_RAID) + if (static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::TREAT_AS_IN_RAID) return true; } return (GetReactionTo(unit) > REP_NEUTRAL); @@ -367,7 +367,7 @@ bool Unit::CanAttack(const Unit* unit) const // Creatures cannot attack player ghosts, unless it is a specially flagged ghost creature if (GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && static_cast(unit)->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) { - if (!(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_GHOST_VISIBLE)) + if (!(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::GHOST_VISIBLE)) return false; } @@ -478,7 +478,7 @@ bool Unit::CanAttackNow(const Unit* unit) const if (IsMounted()) { // ... unless we are a creature with a special flag - if (GetTypeId() != TYPEID_UNIT || !(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_MOUNTED_COMBAT)) + if (GetTypeId() != TYPEID_UNIT || !(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::MOUNTED_COMBAT)) return false; } @@ -524,7 +524,7 @@ bool Unit::CanAssist(const Unit* unit, bool ignoreFlags) const if (GetReactionTo(unit) < REP_FRIENDLY) { // ... unless we are a creature with a special flag - if (GetTypeId() != TYPEID_UNIT || !(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_TREAT_AS_IN_RAID)) + if (GetTypeId() != TYPEID_UNIT || !(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::TREAT_AS_IN_RAID)) return false; } @@ -568,10 +568,10 @@ bool Unit::CanAssist(const Unit* unit, bool ignoreFlags) const { if (const uint32 flags = static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags) { - if (flags & CREATURE_TYPEFLAGS_CAN_ASSIST) + if (flags & CreatureTypeFlags::CAN_ASSIST) return true; - if (flags & CREATURE_TYPEFLAGS_TREAT_AS_IN_RAID) + if (flags & CreatureTypeFlags::TREAT_AS_IN_RAID) return true; } } @@ -668,14 +668,14 @@ bool Unit::CanInteract(const Unit* unit) const // We can't interact with anyone as a ghost except specially flagged NPCs if (GetTypeId() == TYPEID_PLAYER && static_cast(this)->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) { - if (unit->GetTypeId() != TYPEID_UNIT || !(static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_GHOST_VISIBLE)) + if (unit->GetTypeId() != TYPEID_UNIT || !(static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::GHOST_VISIBLE)) return false; } // WotLK+: personal squire support if (GetTypeId() == TYPEID_PLAYER && unit->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP) && unit->GetTypeId() == TYPEID_UNIT) { - if ((static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_SQUIRE) && unit->GetOwnerGuid() != GetObjectGuid()) + if ((static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::SQUIRE) && unit->GetOwnerGuid() != GetObjectGuid()) return false; } @@ -724,7 +724,7 @@ bool Unit::CanInteractNow(const Unit* unit) const // We can't interact with dead units, unless it's a creature with special flag if (!unit->IsAlive()) { - if (GetTypeId() != TYPEID_UNIT || !(static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_INTERACT_DEAD)) + if (GetTypeId() != TYPEID_UNIT || !(static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::INTERACT_DEAD)) return false; } @@ -739,7 +739,7 @@ bool Unit::CanInteractNow(const Unit* unit) const bool interactable = false; // We can interact with siege weapons in fight - if (!interactable && unit->GetTypeId() == TYPEID_UNIT && (static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_SIEGE_WEAPON)) + if (!interactable && unit->GetTypeId() == TYPEID_UNIT && (static_cast(unit)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::SIEGE_WEAPON)) interactable = true; // We can interact with UNIT_FLAG2_INTERACT_ANY_REACTION flagged units even in fight @@ -1368,7 +1368,7 @@ bool Unit::CanAttackServerside(const Unit* unit, bool ignoreFlagsSource, bool ig // Creatures cannot attack player ghosts, unless it is a specially flagged ghost creature if (GetTypeId() == TYPEID_UNIT && unit->GetTypeId() == TYPEID_PLAYER && static_cast(unit)->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) { - if (!(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_GHOST_VISIBLE)) + if (!(static_cast(this)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::GHOST_VISIBLE)) return false; } diff --git a/src/game/Globals/ObjectMgr.cpp b/src/game/Globals/ObjectMgr.cpp index 29c85ea7f9d..77e6b00b098 100644 --- a/src/game/Globals/ObjectMgr.cpp +++ b/src/game/Globals/ObjectMgr.cpp @@ -1043,69 +1043,69 @@ VehicleSeatParameters const* ObjectMgr::GetVehicleSeatParameters(uint32 seatEntr uint32 ObjectMgr::GetTypeFlagsFromStaticFlags(uint32 typeFlags, uint32 staticFlags1, uint32 staticFlags2, uint32 staticFlags3, uint32 staticFlags4) const { if (staticFlags1 & uint32(CreatureStaticFlags::TAMEABLE)) - typeFlags |= CREATURE_TYPEFLAGS_TAMEABLE; + typeFlags |= CreatureTypeFlags::TAMEABLE; if (staticFlags1 & uint32(CreatureStaticFlags::BOSS_MOB)) - typeFlags |= CREATURE_TYPEFLAGS_BOSS_MOB; + typeFlags |= CreatureTypeFlags::BOSS_MOB; if (staticFlags1 & uint32(CreatureStaticFlags::VISIBLE_TO_GHOSTS)) - typeFlags |= CREATURE_TYPEFLAGS_GHOST_VISIBLE; + typeFlags |= CreatureTypeFlags::GHOST_VISIBLE; if (staticFlags1 & uint32(CreatureStaticFlags::NO_FACTION_TOOLTIP)) - typeFlags |= CREATURE_TYPEFLAGS_NO_FACTION_TOOLTIP; + typeFlags |= CreatureTypeFlags::NO_FACTION_TOOLTIP; if (staticFlags1 & uint32(CreatureStaticFlags::DO_NOT_PLAY_WOUND_ANIM)) - typeFlags |= CREATURE_TYPEFLAGS_NO_WOUND_ANIM; + typeFlags |= CreatureTypeFlags::NO_WOUND_ANIM; if (staticFlags1 & uint32(CreatureStaticFlags::MORE_AUDIBLE)) - typeFlags |= CREATURE_TYPEFLAGS_MORE_AUDIBLE; + typeFlags |= CreatureTypeFlags::MORE_AUDIBLE; if (staticFlags2 & uint32(CreatureStaticFlags2::SPELL_ATTACKABLE)) - typeFlags |= CREATURE_TYPEFLAGS_SPELL_ATTACKABLE; + typeFlags |= CreatureTypeFlags::SPELL_ATTACKABLE; if (staticFlags2 & uint32(CreatureStaticFlags2::INTERACT_WHILE_DEAD)) - typeFlags |= CREATURE_TYPEFLAGS_INTERACT_DEAD; + typeFlags |= CreatureTypeFlags::INTERACT_DEAD; if (staticFlags2 & uint32(CreatureStaticFlags2::SKIN_WITH_HERBALISM)) - typeFlags |= CREATURE_TYPEFLAGS_HERBLOOT; + typeFlags |= CreatureTypeFlags::HERBLOOT; if (staticFlags2 & uint32(CreatureStaticFlags2::SKIN_WITH_MINING)) - typeFlags |= CREATURE_TYPEFLAGS_MININGLOOT; + typeFlags |= CreatureTypeFlags::MININGLOOT; if (staticFlags2 & uint32(CreatureStaticFlags2::ALLOW_MOUNTED_COMBAT)) - typeFlags |= CREATURE_TYPEFLAGS_MOUNTED_COMBAT; + typeFlags |= CreatureTypeFlags::MOUNTED_COMBAT; if (staticFlags2 & uint32(CreatureStaticFlags2::NO_DEATH_MESSAGE)) - typeFlags |= CREATURE_TYPEFLAGS_NO_DEATH_MSG; + typeFlags |= CreatureTypeFlags::NO_DEATH_MSG; if (staticFlags2 & uint32(CreatureStaticFlags2::CAN_ASSIST)) - typeFlags |= CREATURE_TYPEFLAGS_CAN_ASSIST; + typeFlags |= CreatureTypeFlags::CAN_ASSIST; if (staticFlags2 & uint32(CreatureStaticFlags2::NO_PET_BAR)) - typeFlags |= CREATURE_TYPEFLAGS_NO_PET_BAR; + typeFlags |= CreatureTypeFlags::NO_PET_BAR; if (staticFlags3 & uint32(CreatureStaticFlags3::MASK_UID)) - typeFlags |= CREATURE_TYPEFLAGS_MASK_UID; + typeFlags |= CreatureTypeFlags::MASK_UID; if (staticFlags3 & uint32(CreatureStaticFlags3::SKIN_WITH_ENGINEERING)) - typeFlags |= CREATURE_TYPEFLAGS_ENGINEERLOOT; + typeFlags |= CreatureTypeFlags::ENGINEERLOOT; if (staticFlags3 & uint32(CreatureStaticFlags3::TAMEABLE_EXOTIC)) - typeFlags |= CREATURE_TYPEFLAGS_EXOTIC; + typeFlags |= CreatureTypeFlags::EXOTIC; if (staticFlags3 & uint32(CreatureStaticFlags3::NO_NAME_PLATE)) - typeFlags |= CREATURE_TYPEFLAGS_NO_NAMEPLATE; + typeFlags |= CreatureTypeFlags::NO_NAMEPLATE; if (staticFlags3 & uint32(CreatureStaticFlags3::USE_MODEL_COLLISION_SIZE)) - typeFlags |= CREATURE_TYPEFLAGS_MODEL_COLLISION_SIZE; + typeFlags |= CreatureTypeFlags::MODEL_COLLISION_SIZE; if (staticFlags3 & uint32(CreatureStaticFlags3::ALLOW_INTERACTION_WHILE_IN_COMBAT)) - typeFlags |= CREATURE_TYPEFLAGS_SIEGE_WEAPON; + typeFlags |= CreatureTypeFlags::SIEGE_WEAPON; if (staticFlags3 & uint32(CreatureStaticFlags3::COLLIDE_WITH_MISSILES)) - typeFlags |= CREATURE_TYPEFLAGS_COLLIDE_WITH_MISSILES; + typeFlags |= CreatureTypeFlags::COLLIDE_WITH_MISSILES; if (staticFlags3 & uint32(CreatureStaticFlags3::DO_NOT_PLAY_MOUNTED_ANIMATIONS)) - typeFlags |= CREATURE_TYPEFLAGS_NO_MOUNTED_ANIM; + typeFlags |= CreatureTypeFlags::NO_MOUNTED_ANIM; if (staticFlags3 & uint32(CreatureStaticFlags3::LINK_ALL)) - typeFlags |= CREATURE_TYPEFLAGS_LINK_ALL; + typeFlags |= CreatureTypeFlags::LINK_ALL; if (staticFlags4 & uint32(CreatureStaticFlags4::INTERACT_ONLY_WITH_CREATOR)) - typeFlags |= CREATURE_TYPEFLAGS_SQUIRE; + typeFlags |= CreatureTypeFlags::SQUIRE; if (staticFlags4 & uint32(CreatureStaticFlags4::DO_NOT_PLAY_UNIT_EVENT_SOUNDS)) - typeFlags |= CREATURE_TYPEFLAGS_NO_DEATH_SOUND; + typeFlags |= CreatureTypeFlags::NO_DEATH_SOUND; if (staticFlags4 & uint32(CreatureStaticFlags4::HAS_NO_SHADOW_BLOB)) - typeFlags |= CREATURE_TYPEFLAGS_NO_SHADOW_BLOB; + typeFlags |= CreatureTypeFlags::NO_SHADOW_BLOB; if (staticFlags4 & uint32(CreatureStaticFlags4::TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS)) - typeFlags |= CREATURE_TYPEFLAGS_TREAT_AS_IN_RAID; + typeFlags |= CreatureTypeFlags::TREAT_AS_IN_RAID; if (staticFlags4 & uint32(CreatureStaticFlags4::FORCE_GOSSIP)) - typeFlags |= CREATURE_TYPEFLAGS_FORCE_GOSSIP; + typeFlags |= CreatureTypeFlags::FORCE_GOSSIP; if (staticFlags4 & uint32(CreatureStaticFlags4::DO_NOT_SHEATHE)) - typeFlags |= CREATURE_TYPEFLAGS_DO_NOT_SHEATHE; + typeFlags |= CreatureTypeFlags::DO_NOT_SHEATHE; if (staticFlags4 & uint32(CreatureStaticFlags4::DO_NOT_TARGET_ON_INTERACTION)) - typeFlags |= CREATURE_TYPEFLAGS_NO_INTERACT_TARGET; + typeFlags |= CreatureTypeFlags::NO_INTERACT_TARGET; if (staticFlags4 & uint32(CreatureStaticFlags4::DO_NOT_RENDER_OBJECT_NAME)) - typeFlags |= CREATURE_TYPEFLAGS_DO_NOT_RENDER_NAME; + typeFlags |= CreatureTypeFlags::DO_NOT_RENDER_NAME; if (staticFlags4 & uint32(CreatureStaticFlags4::QUEST_BOSS)) - typeFlags |= CREATURE_TYPEFLAGS_QUEST_BOSS; + typeFlags |= CreatureTypeFlags::QUEST_BOSS; return typeFlags; } diff --git a/src/game/Globals/SharedDefines.h b/src/game/Globals/SharedDefines.h index 5918907f503..a228461fc7c 100644 --- a/src/game/Globals/SharedDefines.h +++ b/src/game/Globals/SharedDefines.h @@ -1316,41 +1316,44 @@ enum CreatureFamily CREATURE_FAMILY_SPIRIT_BEAST = 46 }; +namespace CreatureTypeFlags +{ enum CreatureTypeFlags { - CREATURE_TYPEFLAGS_TAMEABLE = 0x00000001, // Tameable by any hunter - CREATURE_TYPEFLAGS_GHOST_VISIBLE = 0x00000002, // Creatures which can _also_ be seen when player is a ghost, used in CanInteract function by client, can't be attacked - CREATURE_TYPEFLAGS_BOSS_MOB = 0x00000004, // "BOSS" flag for tooltips - CREATURE_TYPEFLAGS_NO_WOUND_ANIM = 0x00000008, - CREATURE_TYPEFLAGS_NO_FACTION_TOOLTIP = 0x00000010, // controls something in client tooltip related to creature faction - CREATURE_TYPEFLAGS_MORE_AUDIBLE = 0x00000020, // may be sound related - CREATURE_TYPEFLAGS_SPELL_ATTACKABLE = 0x00000040, // may be related to attackable / not attackable creatures with spells, used together with lua_IsHelpfulSpell/lua_IsHarmfulSpell - CREATURE_TYPEFLAGS_INTERACT_DEAD = 0x00000080, // Creature can be interacted with even if it's dead - CREATURE_TYPEFLAGS_HERBLOOT = 0x00000100, // Can be looted by herbalist - CREATURE_TYPEFLAGS_MININGLOOT = 0x00000200, // Can be looted by miner - CREATURE_TYPEFLAGS_NO_DEATH_MSG = 0x00000400, // no idea, but it used by client - CREATURE_TYPEFLAGS_MOUNTED_COMBAT = 0x00000800, // possibility to attack and cast spells while mounted - CREATURE_TYPEFLAGS_CAN_ASSIST = 0x00001000, // Can aid any player (and group) in combat. Typically seen for escorting NPC's - CREATURE_TYPEFLAGS_NO_PET_BAR = 0x00002000, // checked from calls in Lua_PetHasActionBar - CREATURE_TYPEFLAGS_MASK_UID = 0x00004000, // Lua_UnitGUID, client does guid_low &= 0xFF000000 if this flag is set - CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x00008000, // Can be looted by engineer - CREATURE_TYPEFLAGS_EXOTIC = 0x00010000, // Can be tamed by hunter as exotic pet - CREATURE_TYPEFLAGS_MODEL_COLLISION_SIZE = 0x00020000, // related to CreatureDisplayInfo and scaling in some way - CREATURE_TYPEFLAGS_SIEGE_WEAPON = 0x00040000, // Related to vehicle/siege weapons - CREATURE_TYPEFLAGS_COLLIDE_WITH_MISSILES = 0x00080000, // may be has something to do with missiles - CREATURE_TYPEFLAGS_NO_NAMEPLATE = 0x00100000, // no idea, but it used by client, may be related to rendering - CREATURE_TYPEFLAGS_NO_MOUNTED_ANIM = 0x00200000, // may be has something to do with animation (disable animation?) - CREATURE_TYPEFLAGS_LINK_ALL = 0x00400000, // this one probably controls some creature visual - CREATURE_TYPEFLAGS_SQUIRE = 0x00800000, // First seen in 3.2.2. Related to banner/backpack of creature/companion, used in CanInteract function by client - CREATURE_TYPEFLAGS_NO_DEATH_SOUND = 0x01000000, // pet sounds related? - CREATURE_TYPEFLAGS_NO_SHADOW_BLOB = 0x02000000, // this one probably controls some creature visual - CREATURE_TYPEFLAGS_TREAT_AS_IN_RAID = 0x04000000, // creature has no type, or forces creature to be considered as in party, may be related to creature assistance - CREATURE_TYPEFLAGS_FORCE_GOSSIP = 0x08000000, // used in Lua_ForceGossip - CREATURE_TYPEFLAGS_DO_NOT_SHEATHE = 0x10000000, // no idea, but it used by client - CREATURE_TYPEFLAGS_NO_INTERACT_TARGET = 0x20000000, - CREATURE_TYPEFLAGS_DO_NOT_RENDER_NAME = 0x40000000, - CREATURE_TYPEFLAGS_QUEST_BOSS = 0x80000000, // Lua_UnitIsQuestBoss + TAMEABLE = 0x00000001, // Tameable by any hunter + GHOST_VISIBLE = 0x00000002, // Creatures which can _also_ be seen when player is a ghost, used in CanInteract function by client, can't be attacked + BOSS_MOB = 0x00000004, // "BOSS" flag for tooltips + NO_WOUND_ANIM = 0x00000008, + NO_FACTION_TOOLTIP = 0x00000010, // controls something in client tooltip related to creature faction + MORE_AUDIBLE = 0x00000020, // may be sound related + SPELL_ATTACKABLE = 0x00000040, // may be related to attackable / not attackable creatures with spells, used together with lua_IsHelpfulSpell/lua_IsHarmfulSpell + INTERACT_DEAD = 0x00000080, // Creature can be interacted with even if it's dead + HERBLOOT = 0x00000100, // Can be looted by herbalist + MININGLOOT = 0x00000200, // Can be looted by miner + NO_DEATH_MSG = 0x00000400, // no idea, but it used by client + MOUNTED_COMBAT = 0x00000800, // possibility to attack and cast spells while mounted + CAN_ASSIST = 0x00001000, // Can aid any player (and group) in combat. Typically seen for escorting NPC's + NO_PET_BAR = 0x00002000, // checked from calls in Lua_PetHasActionBar + MASK_UID = 0x00004000, // Lua_UnitGUID, client does guid_low &= 0xFF000000 if this flag is set + ENGINEERLOOT = 0x00008000, // Can be looted by engineer + EXOTIC = 0x00010000, // Can be tamed by hunter as exotic pet + MODEL_COLLISION_SIZE = 0x00020000, // related to CreatureDisplayInfo and scaling in some way + SIEGE_WEAPON = 0x00040000, // Related to vehicle/siege weapons + COLLIDE_WITH_MISSILES = 0x00080000, // may be has something to do with missiles + NO_NAMEPLATE = 0x00100000, // no idea, but it used by client, may be related to rendering + NO_MOUNTED_ANIM = 0x00200000, // may be has something to do with animation (disable animation?) + LINK_ALL = 0x00400000, // this one probably controls some creature visual + SQUIRE = 0x00800000, // First seen in 3.2.2. Related to banner/backpack of creature/companion, used in CanInteract function by client + NO_DEATH_SOUND = 0x01000000, // pet sounds related? + NO_SHADOW_BLOB = 0x02000000, // this one probably controls some creature visual + TREAT_AS_IN_RAID = 0x04000000, // creature has no type, or forces creature to be considered as in party, may be related to creature assistance + FORCE_GOSSIP = 0x08000000, // used in Lua_ForceGossip + DO_NOT_SHEATHE = 0x10000000, // no idea, but it used by client + NO_INTERACT_TARGET = 0x20000000, + DO_NOT_RENDER_NAME = 0x40000000, + QUEST_BOSS = 0x80000000, // Lua_UnitIsQuestBoss }; +} enum CreatureEliteType { diff --git a/src/game/Mails/MailHandler.cpp b/src/game/Mails/MailHandler.cpp index d061a223e33..64bd75949aa 100644 --- a/src/game/Mails/MailHandler.cpp +++ b/src/game/Mails/MailHandler.cpp @@ -72,7 +72,7 @@ bool WorldSession::CheckMailBox(ObjectGuid guid) const return false; } - if (!(creature->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_SQUIRE)) + if (!(creature->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::SQUIRE)) { DEBUG_LOG("%s not have access to mailbox.", creature->GetGuidStr().c_str()); return false; diff --git a/src/game/PlayerBot/Base/PlayerbotAI.cpp b/src/game/PlayerBot/Base/PlayerbotAI.cpp index 7fafb0ab512..a5c2b21507c 100644 --- a/src/game/PlayerBot/Base/PlayerbotAI.cpp +++ b/src/game/PlayerBot/Base/PlayerbotAI.cpp @@ -5191,7 +5191,7 @@ void PlayerbotAI::UpdateAI(const uint32 /*p_time*/) return; if (m_bot->GetPetGuid() || spell->CheckCast(true) != SPELL_CAST_OK || !pTarget || - pTarget->IsDead() || !m_bot->IsInMap(pTarget) || !(((Creature*) pTarget)->GetCreatureInfo()->CreatureTypeFlags & CREATURE_TYPEFLAGS_TAMEABLE)) + pTarget->IsDead() || !m_bot->IsInMap(pTarget) || !(((Creature*) pTarget)->GetCreatureInfo()->CreatureTypeFlags & CreatureTypeFlags::TAMEABLE)) { MovementReset(); m_bot->SetSelectionGuid(ObjectGuid());