Core/Spells: Remove OriginalVictim parameter from Unit::CastSpell(x,y,z) - setting unit target was enough for all spells which used it, there's never a need to cast with both unit and dest target on retail (in such cases unit target + DEST_TARGET target types are used).
This commit is contained in:
@@ -978,7 +978,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const& value, Unit*
|
||||
}
|
||||
|
||||
// used for scripting
|
||||
void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item* castItem, AuraEffect const* triggeredByAura, uint64 originalCaster, Unit* OriginalVictim)
|
||||
void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item* castItem, AuraEffect const* triggeredByAura, uint64 originalCaster)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||
|
||||
@@ -998,8 +998,6 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.SetDst(x, y, z, GetOrientation());
|
||||
if (OriginalVictim)
|
||||
targets.SetUnitTarget(OriginalVictim);
|
||||
spell->m_CastItem = castItem;
|
||||
spell->prepare(&targets, triggeredByAura);
|
||||
}
|
||||
|
||||
@@ -1563,7 +1563,7 @@ class Unit : public WorldObject
|
||||
void CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* victim, SpellInfo const *spellInfo, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(Unit* victim, SpellInfo const *spellInfo, TriggerCastFlags triggerFlags, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0, Unit* originalVictim = 0);
|
||||
void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item *castItem= NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item *castItem = NULL, AuraEffect const* triggeredByAura = NULL, uint64 originalCaster = 0);
|
||||
|
||||
Reference in New Issue
Block a user