Skip to content

Commit

Permalink
Spell: Remove setting flags from TakePossessOf in favor of configurat…
Browse files Browse the repository at this point in the history
…ion in db

They are custom summoned for this task, should inherit from db based on known data
  • Loading branch information
killerwife committed May 20, 2024
1 parent 5dc5609 commit bd63be9
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12603,14 +12603,6 @@ Unit* Unit::TakePossessOf(SpellEntry const* spellEntry, SummonPropertiesEntry co
if (HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
possessed->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);

const bool immunePC = IsImmuneToPlayer();
if (possessed->IsImmuneToPlayer() != immunePC)
possessed->SetImmuneToPlayer(immunePC);

const bool immuneNPC = IsImmuneToNPC();
if (possessed->IsImmuneToNPC() != immuneNPC)
possessed->SetImmuneToNPC(immuneNPC);

charmInfo->ProcessUnattackableTargets(possessed->m_combatData);

if (player)
Expand Down

0 comments on commit bd63be9

Please sign in to comment.