Core/Spells: Cleanup in Spell.h:
- Codestyle (fix function naming) and cleanup changes in SpellCastTargets class, also access variables of this class by getters/setters - Move IsQuestTameSpell function to SpellMgr.h - Move UnitList typedef to Unit.h Additionally - add missing copyright notice to SpellAuraEffects.h
This commit is contained in:
@@ -845,7 +845,7 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered,
|
||||
originalCaster=owner->GetGUID();
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setUnitTarget(Victim);
|
||||
targets.SetUnitTarget(Victim);
|
||||
|
||||
if (castItem)
|
||||
sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id);
|
||||
@@ -888,7 +888,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
|
||||
}
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setUnitTarget(Victim);
|
||||
targets.SetUnitTarget(Victim);
|
||||
|
||||
if (!originalCaster && triggeredByAura)
|
||||
originalCaster = triggeredByAura->GetCasterGUID();
|
||||
@@ -927,9 +927,9 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setDst(x, y, z, GetOrientation());
|
||||
targets.SetDst(x, y, z, GetOrientation());
|
||||
if (OriginalVictim)
|
||||
targets.setUnitTarget(OriginalVictim);
|
||||
targets.SetUnitTarget(OriginalVictim);
|
||||
spell->m_CastItem = castItem;
|
||||
spell->prepare(&targets, triggeredByAura);
|
||||
}
|
||||
@@ -963,7 +963,7 @@ void Unit::CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castI
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setGOTarget(go);
|
||||
targets.SetGOTarget(go);
|
||||
spell->m_CastItem = castItem;
|
||||
spell->prepare(&targets, triggeredByAura);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user