Core/Spells: rework part 4: iterate over effects first
Implement far spell queue processing # Conflicts: # src/server/game/Spells/Spell.cpp
This commit is contained in:
1 parent
3fbbea61bd
commit
4bb8c93df8
12 files changed
+765
-834
No files matched your search
@@ -418,19 +418,6 @@ bool SpellEffectInfo::IsAreaAuraEffect() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SpellEffectInfo::IsFarUnitTargetEffect() const
|
||||
{
|
||||
return (Effect == SPELL_EFFECT_SUMMON_PLAYER)
|
||||
|| (Effect == SPELL_EFFECT_SUMMON_RAF_FRIEND)
|
||||
|| (Effect == SPELL_EFFECT_RESURRECT)
|
||||
|| (Effect == SPELL_EFFECT_RESURRECT_NEW);
|
||||
}
|
||||
|
||||
bool SpellEffectInfo::IsFarDestTargetEffect() const
|
||||
{
|
||||
return Effect == SPELL_EFFECT_TELEPORT_UNITS;
|
||||
}
|
||||
|
||||
bool SpellEffectInfo::IsUnitOwnedAuraEffect() const
|
||||
{
|
||||
return IsAreaAuraEffect() || Effect == SPELL_EFFECT_APPLY_AURA || Effect == SPELL_EFFECT_APPLY_AURA_2;
|
||||
@@ -3366,14 +3353,14 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
|
||||
int32 SpellInfo::GetDuration() const
|
||||
{
|
||||
if (!DurationEntry)
|
||||
return 0;
|
||||
return IsPassive() ? -1 : 0;
|
||||
return (DurationEntry->Duration == -1) ? -1 : abs(DurationEntry->Duration);
|
||||
}
|
||||
|
||||
int32 SpellInfo::GetMaxDuration() const
|
||||
{
|
||||
if (!DurationEntry)
|
||||
return 0;
|
||||
return IsPassive() ? -1 : 0;
|
||||
return (DurationEntry->MaxDuration == -1) ? -1 : abs(DurationEntry->MaxDuration);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user