Core/Spells: rework part 4: iterate over effects first
Port From (https://github.com/TrinityCore/TrinityCore/commit/65dca120d34febdaa84a63e17f638ab0fa59b3df)
This commit is contained in:
@@ -2657,14 +2657,16 @@ namespace Game.Spells
|
||||
public int GetDuration()
|
||||
{
|
||||
if (DurationEntry == null)
|
||||
return 0;
|
||||
return IsPassive() ? -1 : 0;
|
||||
|
||||
return (DurationEntry.Duration == -1) ? -1 : Math.Abs(DurationEntry.Duration);
|
||||
}
|
||||
|
||||
public int GetMaxDuration()
|
||||
{
|
||||
if (DurationEntry == null)
|
||||
return 0;
|
||||
return IsPassive() ? -1 : 0;
|
||||
|
||||
return (DurationEntry.MaxDuration == -1) ? -1 : Math.Abs(DurationEntry.MaxDuration);
|
||||
}
|
||||
|
||||
@@ -4021,18 +4023,6 @@ namespace Game.Spells
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsFarUnitTargetEffect()
|
||||
{
|
||||
return (Effect == SpellEffectName.SummonPlayer)
|
||||
|| (Effect == SpellEffectName.SummonRafFriend)
|
||||
|| (Effect == SpellEffectName.Resurrect);
|
||||
}
|
||||
|
||||
bool IsFarDestTargetEffect()
|
||||
{
|
||||
return Effect == SpellEffectName.TeleportUnits;
|
||||
}
|
||||
|
||||
public bool IsUnitOwnedAuraEffect()
|
||||
{
|
||||
return IsAreaAuraEffect() || Effect == SpellEffectName.ApplyAura || Effect == SpellEffectName.ApplyAuraOnPet;
|
||||
|
||||
Reference in New Issue
Block a user