Skip to content

Commit

Permalink
Creature: Implement several needed static flags
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jul 13, 2024
1 parent 2f0339b commit 5be89e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/game/Entities/CreatureSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ void CreatureSettings::ResetStaticFlags(CreatureStaticFlags staticFlags, Creatur
m_owner->GetVisibilityData().SetVisibilityDistanceOverride(VisibilityDistanceType::Gigantic);
if (HasFlag(CreatureStaticFlags3::INFINITE_AOI))
m_owner->GetVisibilityData().SetVisibilityDistanceOverride(VisibilityDistanceType::Infinite);

if (HasFlag(CreatureStaticFlags::UNINTERACTIBLE))
m_owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNINTERACTIBLE);
if (HasFlag(CreatureStaticFlags::IMMUNE_TO_PC))
m_owner->SetImmuneToPlayer(true);
if (HasFlag(CreatureStaticFlags::IMMUNE_TO_NPC))
m_owner->SetImmuneToNPC(true);

if (HasFlag(CreatureStaticFlags2::NO_OWNER_THREAT))
m_owner->DisableThreatPropagationToOwner();
if (HasFlag(CreatureStaticFlags2::HIDE_BODY))
m_owner->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_HIDE_BODY);
}

void CreatureSettings::SetFlag(CreatureStaticFlags flag)
Expand Down

0 comments on commit 5be89e6

Please sign in to comment.