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:
QAston
2011-06-23 13:28:52 +02:00
parent 9d9472e5cc
commit 3137a82c7c
19 changed files with 630 additions and 588 deletions
+5 -5
View File
@@ -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);
}