Creature type flags (#2195)
fix(Core/Creature): refactoring creature type flags and adding CREATURE_TYPE_FLAG_CAN_COLLIDE_WITH_MISSILES - closes #1984
This commit is contained in:
@@ -892,7 +892,7 @@ bool Creature::Create(uint32 guidlow, Map* map, uint32 phaseMask, uint32 Entry,
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||
}
|
||||
else if (cinfo->type_flags & CREATURE_TYPEFLAGS_GHOST) // Xinef: Add ghost visibility for ghost units
|
||||
else if (cinfo->type_flags & CREATURE_TYPE_FLAG_GHOST_VISIBLE) // Xinef: Add ghost visibility for ghost units
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE | GHOST_VISIBILITY_GHOST);
|
||||
|
||||
if (Entry == VISUAL_WAYPOINT)
|
||||
|
||||
@@ -139,11 +139,11 @@ struct CreatureTemplate
|
||||
// helpers
|
||||
SkillType GetRequiredLootSkill() const
|
||||
{
|
||||
if (type_flags & CREATURE_TYPEFLAGS_HERBLOOT)
|
||||
if (type_flags & CREATURE_TYPE_FLAG_HERB_SKINNING_SKILL)
|
||||
return SKILL_HERBALISM;
|
||||
else if (type_flags & CREATURE_TYPEFLAGS_MININGLOOT)
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_MINING_SKINNING_SKILL)
|
||||
return SKILL_MINING;
|
||||
else if (type_flags & CREATURE_TYPEFLAGS_ENGINEERLOOT)
|
||||
else if (type_flags & CREATURE_TYPE_FLAG_ENGINEERING_SKINNING_SKILL)
|
||||
return SKILL_ENGINEERING;
|
||||
else
|
||||
return SKILL_SKINNING; // normal case
|
||||
@@ -151,11 +151,11 @@ struct CreatureTemplate
|
||||
|
||||
bool IsTameable(bool exotic) const
|
||||
{
|
||||
if (type != CREATURE_TYPE_BEAST || family == 0 || (type_flags & CREATURE_TYPEFLAGS_TAMEABLE) == 0)
|
||||
if (type != CREATURE_TYPE_BEAST || family == 0 || (type_flags & CREATURE_TYPE_FLAG_TAMEABLE_PET) == 0)
|
||||
return false;
|
||||
|
||||
// if can tame exotic then can tame any temable
|
||||
return exotic || (type_flags & CREATURE_TYPEFLAGS_EXOTIC) == 0;
|
||||
// if can tame exotic then can tame any tameable
|
||||
return exotic || (type_flags & CREATURE_TYPE_FLAG_EXOTIC_PET) == 0;
|
||||
}
|
||||
|
||||
void InitializeQueryData();
|
||||
@@ -483,7 +483,7 @@ class Creature : public Unit, public GridObject<Creature>, public MovableMapObje
|
||||
if (IsPet())
|
||||
return false;
|
||||
|
||||
return GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_BOSS;
|
||||
return GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_BOSS_MOB;
|
||||
}
|
||||
|
||||
bool IsDungeonBoss() const;
|
||||
|
||||
Reference in New Issue
Block a user