mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
Core/Creature: Remove UNIT_FLAG3_FAKE_DEAD and UNIT_FLAG2_FEIGN_DEATH if no unit_flags are set
*d66f2dcdacfollowup (cherry picked from commit72d952db74)
This commit is contained in:
@@ -2376,13 +2376,10 @@ void ObjectMgr::LoadCreatures()
|
||||
*data.unit_flags2 &= UNIT_FLAG2_ALLOWED;
|
||||
}
|
||||
|
||||
if (data.unit_flags.has_value())
|
||||
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))))
|
||||
{
|
||||
if (*data.unit_flags2 & UNIT_FLAG2_FEIGN_DEATH && !(*data.unit_flags & (UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC)))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: {} Entry: {}) 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;
|
||||
}
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: {} Entry: {}) 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2394,13 +2391,10 @@ void ObjectMgr::LoadCreatures()
|
||||
*data.unit_flags3 &= UNIT_FLAG3_ALLOWED;
|
||||
}
|
||||
|
||||
if (data.unit_flags.has_value())
|
||||
if (*data.unit_flags3 & UNIT_FLAG3_FAKE_DEAD && (!data.unit_flags.has_value() || !(*data.unit_flags & (UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC))))
|
||||
{
|
||||
if (*data.unit_flags3 & UNIT_FLAG3_FAKE_DEAD && !(*data.unit_flags & (UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC)))
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: {} Entry: {}) has UNIT_FLAG3_FAKE_DEAD set without IMMUNE_TO_PC | IMMUNE_TO_NPC, removing incorrect flag.", guid, data.id);
|
||||
*data.unit_flags3 &= ~UNIT_FLAG3_FAKE_DEAD;
|
||||
}
|
||||
TC_LOG_ERROR("sql.sql", "Table `creature` has creature (GUID: {} Entry: {}) has UNIT_FLAG3_FAKE_DEAD set without IMMUNE_TO_PC | IMMUNE_TO_NPC, removing incorrect flag.", guid, data.id);
|
||||
*data.unit_flags3 &= ~UNIT_FLAG3_FAKE_DEAD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user