mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Core/Combat): Removed UNIT_FLAG_IMMUNE_TO_PC when entering comb… (#12288)
fix(Core/Combat): Removed `UNIT_FLAG_IMMUNE_TO_PC` when entering combat with player. Fixes #12211 Fixes #12214 Fixes #12219 Fixes #12212
This commit is contained in:
@@ -13163,7 +13163,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy, uint32 duration)
|
||||
|
||||
// xinef: if we somehow engage in combat (scripts, dunno) with player, remove this flag so he can fight back
|
||||
if (GetTypeId() == TYPEID_UNIT && enemy && IsImmuneToPC() && enemy->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
SetImmuneToPC(true); // unit has engaged in combat, remove immunity so players can fight back
|
||||
SetImmuneToPC(false); // unit has engaged in combat, remove immunity so players can fight back
|
||||
|
||||
if (IsInCombat())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user