mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -2058,13 +2058,13 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
|
||||
// needed for GO casts for proper target validation checks
|
||||
trigger->SetOwnerGUID(owner->GetGUID());
|
||||
// xinef: fixes some duel bugs with traps]
|
||||
if (owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED))
|
||||
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
if (owner->HasUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED))
|
||||
trigger->SetUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
if (owner->IsFFAPvP())
|
||||
trigger->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
|
||||
|
||||
// xinef: Remove Immunity flags
|
||||
trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
trigger->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
// xinef: set proper orientation, fixes cast against stealthed targets
|
||||
if (target)
|
||||
trigger->SetInFront(target);
|
||||
|
||||
Reference in New Issue
Block a user