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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user