mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
feat(Core/Unit): New helpers for DynamicFlags (#11230)
* feat(Core/Unit): New helpers for DynamicFlags
* cherry-pick commit (d611925dc7)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
* oopsie
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -2483,7 +2483,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo
|
||||
// blizz like 2.0.x
|
||||
target->SetUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
// blizz like 2.0.x
|
||||
target->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
target->SetDynamicFlag(UNIT_DYNFLAG_DEAD);
|
||||
|
||||
target->AddUnitState(UNIT_STATE_DIED);
|
||||
}
|
||||
@@ -2500,7 +2500,7 @@ void AuraEffect::HandleFeignDeath(AuraApplication const* aurApp, uint8 mode, boo
|
||||
// blizz like 2.0.x
|
||||
target->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
// blizz like 2.0.x
|
||||
target->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
target->RemoveDynamicFlag(UNIT_DYNFLAG_DEAD);
|
||||
|
||||
target->ClearUnitState(UNIT_STATE_DIED);
|
||||
}
|
||||
@@ -2746,12 +2746,12 @@ void AuraEffect::HandleAuraModStalked(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
// used by spells: Hunter's Mark, Mind Vision, Syndicate Tracker (MURP) DND
|
||||
if (apply)
|
||||
target->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TRACK_UNIT);
|
||||
target->SetDynamicFlag(UNIT_DYNFLAG_TRACK_UNIT);
|
||||
else
|
||||
{
|
||||
// do not remove unit flag if there are more than this auraEffect of that kind on unit on unit
|
||||
if (!target->HasAuraType(GetAuraType()))
|
||||
target->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TRACK_UNIT);
|
||||
target->RemoveDynamicFlag(UNIT_DYNFLAG_TRACK_UNIT);
|
||||
}
|
||||
|
||||
// call functions which may have additional effects after chainging state of unit
|
||||
|
||||
Reference in New Issue
Block a user