refactor(Core/Unit): PC&NPC Immunity (#11986)
* initial * refactor(Core/Unit): PC & NPC Immunities Cherry-pick TC: https://github.com/TrinityCore/TrinityCore/commit/74af880217fc567c9949d7557408718af889402f Co-authored-by: Treeston <treeston.nmoc@gmail.com> * fix builds error Cherry-pick TC: https://github.com/TrinityCore/TrinityCore/commit/74af880217fc567c9949d7557408718af889402f Co-authored-by: Treeston <treeston.nmoc@gmail.com> * Fix nef combat, and replace SetFlag by SetUnitFlag * fix combat with jedoga Co-authored-by: Treeston <treeston.nmoc@gmail.com>
This commit is contained in:
@@ -228,7 +228,7 @@ public:
|
||||
me->SetDisableGravity(false);
|
||||
me->CastSpell(me, SPELL_DUAL_WIELD, true);
|
||||
me->LoadEquipment(0, true);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetImmuneToAll(true);
|
||||
beamPosId = urand(0, 3);
|
||||
}
|
||||
|
||||
@@ -957,7 +957,7 @@ public:
|
||||
case EVENT_AKAMA_SCENE_29:
|
||||
if (Creature* illidan = ObjectAccessor::GetCreature(*me, instance->GetGuidData(NPC_ILLIDAN_STORMRAGE)))
|
||||
{
|
||||
illidan->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
illidan->SetImmuneToAll(false);
|
||||
illidan->SetInCombatWithZone();
|
||||
AttackStart(illidan);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,8 @@ public:
|
||||
{
|
||||
BossAI::Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetImmuneToAll(true);
|
||||
me->SetWalk(true);
|
||||
}
|
||||
|
||||
@@ -249,7 +250,8 @@ public:
|
||||
DoResetThreat();
|
||||
me->GetVictim()->InterruptNonMeleeSpells(false);
|
||||
me->AddThreat(me->GetVictim(), 1000000.0f);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetImmuneToAll(false);
|
||||
summonsGenerator.DoAction(ACTION_STOP_SPAWNING);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user