Core/Spells: Send expected type of spell implicit target to client.

This commit is contained in:
QAston
2011-08-27 12:59:57 +02:00
parent 1faea1f98e
commit 8754166071
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -698,6 +698,13 @@ void Spell::SelectSpellTargets()
if (!m_spellInfo->Effects[i].Effect) if (!m_spellInfo->Effects[i].Effect)
continue; continue;
// set expected type of implicit targets to be sent to client
uint32 implicitTargetMask = GetTargetFlagMask(m_spellInfo->Effects[i].TargetA.GetObjectType()) | GetTargetFlagMask(m_spellInfo->Effects[i].TargetB.GetObjectType());
if (implicitTargetMask & TARGET_FLAG_UNIT)
m_targets.SetTargetFlag(TARGET_FLAG_UNIT);
if (implicitTargetMask & (TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM))
m_targets.SetTargetFlag(TARGET_FLAG_GAMEOBJECT);
uint32 effectTargetType = m_spellInfo->Effects[i].GetRequiredTargetType(); uint32 effectTargetType = m_spellInfo->Effects[i].GetRequiredTargetType();
// is it possible that areaaura is not applied to caster? // is it possible that areaaura is not applied to caster?
+2
View File
@@ -104,6 +104,8 @@ class SpellCastTargets
uint32 GetTargetMask() const { return m_targetMask; } uint32 GetTargetMask() const { return m_targetMask; }
void SetTargetMask(uint32 newMask) { m_targetMask = newMask; } void SetTargetMask(uint32 newMask) { m_targetMask = newMask; }
void SetTargetFlag(SpellCastTargetFlags flag) { m_targetMask |= flag; }
uint64 GetUnitTargetGUID() const; uint64 GetUnitTargetGUID() const;
Unit* GetUnitTarget() const; Unit* GetUnitTarget() const;
void SetUnitTarget(Unit* target); void SetUnitTarget(Unit* target);