Core/Creature: Remove UNIT_FLAG2_FEIGN_DEATH if no unit_flags are set
This commit is contained in:
1 parent
a04920122a
commit
5d2d60258b
1 file changed
+6
@@ -2253,6 +2253,12 @@ void ObjectMgr::LoadCreatures()
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) with disallowed `unit_flags2` %u, removing incorrect flag.", guid, data.id, disallowedUnitFlags2);
|
||||
*data.unit_flags2 &= UNIT_FLAG2_ALLOWED;
|
||||
}
|
||||
|
||||
if (*data.unit_flags2 & UNIT_FLAG2_FEIGN_DEATH && (!data.unit_flags.has_value() || !(*data.unit_flags & (UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC))))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: %u Entry: %u) has UNIT_FLAG2_FEIGN_DEATH set without IMMUNE_TO_PC | IMMUNE_TO_NPC, removing incorrect flag.", guid, data.id);
|
||||
*data.unit_flags2 &= ~UNIT_FLAG2_FEIGN_DEATH;
|
||||
}
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA))
|
||||
|
||||
Reference in new issue
Block a user