Core/SpellScripts: rename GetTarget*() functions to GetExplTarget*(), so the names reflect better what those functions do. Also update some comments.
This commit is contained in:
1 parent
4b5e763d21
commit
b899f5fc94
22 files changed
+68
-55
No files matched your search
@@ -775,7 +775,7 @@ class spell_dk_death_grip : public SpellScriptLoader
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
int32 damage = GetEffectValue();
|
||||
Position const* pos = GetTargetDest();
|
||||
Position const* pos = GetExplTargetDest();
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (!target->HasAuraType(SPELL_AURA_DEFLECT_SPELLS)) // Deterrence
|
||||
|
||||
@@ -237,7 +237,7 @@ class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader
|
||||
}
|
||||
else
|
||||
{
|
||||
unitList.remove(GetTargetUnit());
|
||||
unitList.remove(GetExplTargetUnit());
|
||||
std::list<Unit*> tempTargets;
|
||||
for (std::list<Unit*>::const_iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
|
||||
if ((*itr)->GetTypeId() == TYPEID_PLAYER && GetCaster()->IsInRaidWith(*itr))
|
||||
@@ -279,7 +279,7 @@ class spell_dru_starfall_aoe : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove(GetTargetUnit());
|
||||
unitList.remove(GetExplTargetUnit());
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -1282,7 +1282,7 @@ class spell_gen_launch : public SpellScriptLoader
|
||||
|
||||
void Launch()
|
||||
{
|
||||
WorldLocation const* const position = GetTargetDest();
|
||||
WorldLocation const* const position = GetExplTargetDest();
|
||||
|
||||
if (Player* player = GetHitPlayer())
|
||||
{
|
||||
|
||||
@@ -286,8 +286,8 @@ class spell_hun_masters_call : public SpellScriptLoader
|
||||
target->CastSpell(target, HUNTER_SPELL_MASTERS_CALL_TRIGGERED, castMask);
|
||||
// there is a possibility that this effect should access effect 0 (dummy) target, but i dubt that
|
||||
// it's more likely that on on retail it's possible to call target selector based on dbc values
|
||||
// anyways, we're using GetTargetUnit() here and it's ok
|
||||
if (Unit* ally = GetTargetUnit())
|
||||
// anyways, we're using GetExplTargetUnit() here and it's ok
|
||||
if (Unit* ally = GetExplTargetUnit())
|
||||
{
|
||||
target->CastSpell(ally, GetEffectValue(), castMask);
|
||||
target->CastSpell(ally, GetSpellInfo()->Effects[EFFECT_0].CalcValue(), castMask);
|
||||
|
||||
@@ -288,10 +288,9 @@ class spell_pal_holy_shock : public SpellScriptLoader
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (GetTargetUnit())
|
||||
if (Unit* target = GetTargetUnit())
|
||||
if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -227,10 +227,9 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (GetTargetUnit())
|
||||
if (Unit* target = GetTargetUnit())
|
||||
if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
if (!caster->IsFriendlyTo(target) && !caster->IsValidAttackTarget(target))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ class spell_q11396_11399_scourging_crystal_controller : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetTargetUnit())
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
if (target->GetTypeId() == TYPEID_UNIT && target->HasAura(SPELL_FORCE_SHIELD_ARCANE_PURPLE_X3))
|
||||
// Make sure nobody else is channeling the same target
|
||||
if (!target->HasAura(SPELL_SCOURGING_CRYSTAL_CONTROLLER))
|
||||
|
||||
@@ -301,8 +301,8 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<Unit*>& unitList)
|
||||
{
|
||||
if (GetTargetUnit())
|
||||
unitList.remove(GetTargetUnit());
|
||||
if (GetExplTargetUnit())
|
||||
unitList.remove(GetExplTargetUnit());
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in new issue
Block a user