mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
refactor(Core/Unit): PC&NPC Immunity (#11986)
* initial * refactor(Core/Unit): PC & NPC Immunities Cherry-pick TC:74af880217Co-authored-by: Treeston <treeston.nmoc@gmail.com> * fix builds error Cherry-pick TC:74af880217Co-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:
@@ -1773,7 +1773,7 @@ class spell_gen_creature_permanent_feign_death : public AuraScript
|
||||
Unit* target = GetTarget();
|
||||
target->SetDynamicFlag(UNIT_DYNFLAG_DEAD);
|
||||
target->SetUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
target->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
target->SetImmuneToAll(true);
|
||||
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
target->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
@@ -1784,7 +1784,7 @@ class spell_gen_creature_permanent_feign_death : public AuraScript
|
||||
Unit* target = GetTarget();
|
||||
target->RemoveDynamicFlag(UNIT_DYNFLAG_DEAD);
|
||||
target->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
target->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
target->SetImmuneToAll(false);
|
||||
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
target->ToCreature()->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
Reference in New Issue
Block a user