Core: Combat/threat system rewrite
Port From (https://github.com/TrinityCore/TrinityCore/commit/34c7810fe507eca1b8b9389630db5d5d26d92e77)
This commit is contained in:
@@ -1022,8 +1022,8 @@ namespace Game.Spells
|
||||
// creature/player specific target checks
|
||||
if (unitTarget != null)
|
||||
{
|
||||
// spells cannot be cast if player is in fake combat also
|
||||
if (HasAttribute(SpellAttr1.CantTargetInCombat) && (unitTarget.IsInCombat() || unitTarget.IsPetInCombat()))
|
||||
// spells cannot be cast if target has a pet in combat either
|
||||
if (HasAttribute(SpellAttr1.CantTargetInCombat) && (unitTarget.IsInCombat() || unitTarget.HasUnitFlag(UnitFlags.PetInCombat)))
|
||||
return SpellCastResult.TargetAffectingCombat;
|
||||
|
||||
// only spells with SPELL_ATTR3_ONLY_TARGET_GHOSTS can target ghosts
|
||||
|
||||
Reference in New Issue
Block a user