Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.

Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;

(cherry picked from commit 74af880217)
This commit is contained in:
treeston
2017-07-09 02:07:29 +02:00
committed by Shauren
parent befbfbb655
commit 2dfafa69eb
82 changed files with 294 additions and 203 deletions

View File

@@ -1992,8 +1992,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
summon->SelectLevel(); // some summoned creaters have different from 1 DB data for level/hp
summon->SetNpcFlags(NPCFlags(summon->GetCreatureTemplate()->npcflag & 0xFFFFFFFF));
summon->SetNpcFlags2(NPCFlags2(summon->GetCreatureTemplate()->npcflag >> 32));
summon->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
summon->SetImmuneToAll(true);
summon->AI()->EnterEvadeMode();
break;