Core/Spells: Send expected type of spell implicit target to client.
This commit is contained in:
@@ -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?
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user