mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +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:
@@ -724,13 +724,13 @@ public:
|
||||
if (ptarget->GetPositionX() > 120)
|
||||
{
|
||||
ptarget->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(WEAPON_SPEAR));
|
||||
ptarget->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
ptarget->SetImmuneToPC(true);
|
||||
ptarget->SetReactState(REACT_PASSIVE);
|
||||
ptarget->AI()->SetData(0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptarget->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
ptarget->SetImmuneToPC(true);
|
||||
ptarget->SetReactState(REACT_PASSIVE);
|
||||
ptarget->AI()->SetData(0, 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user