Core/Spells: Rename Spell::EffectSummonDeadPet with Spell::EffectResurrectPet and get rid of two TODO's that are already done.

This commit is contained in:
Discover- committed 2014-01-17 17:54:52 +01:00
1 parent c1a468365b
commit ebfdeb067f
2 files changed
+5 -10

No files matched your search

+1 -1
View File
@@ -301,7 +301,7 @@ class Spell
void EffectKnockBack(SpellEffIndex effIndex);
void EffectPullTowards(SpellEffIndex effIndex);
void EffectDispelMechanic(SpellEffIndex effIndex);
void EffectSummonDeadPet(SpellEffIndex effIndex);
void EffectResurrectPet(SpellEffIndex effIndex);
void EffectDestroyAllTotems(SpellEffIndex effIndex);
void EffectDurabilityDamage(SpellEffIndex effIndex);
void EffectSkill(SpellEffIndex effIndex);
+4 -9
View File
@@ -175,7 +175,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
&Spell::EffectSummonObject, //106 SPELL_EFFECT_SUMMON_OBJECT_SLOT3
&Spell::EffectSummonObject, //107 SPELL_EFFECT_SUMMON_OBJECT_SLOT4
&Spell::EffectDispelMechanic, //108 SPELL_EFFECT_DISPEL_MECHANIC
&Spell::EffectSummonDeadPet, //109 SPELL_EFFECT_SUMMON_DEAD_PET
&Spell::EffectResurrectPet, //109 SPELL_EFFECT_RESURRECT_PET
&Spell::EffectDestroyAllTotems, //110 SPELL_EFFECT_DESTROY_ALL_TOTEMS
&Spell::EffectDurabilityDamage, //111 SPELL_EFFECT_DURABILITY_DAMAGE
&Spell::EffectUnused, //112 SPELL_EFFECT_112
@@ -5049,7 +5049,7 @@ void Spell::EffectDispelMechanic(SpellEffIndex effIndex)
}
}
void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
void Spell::EffectResurrectPet(SpellEffIndex /*effIndex*/)
{
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
return;
@@ -5061,9 +5061,9 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
if (!player)
return;
// Maybe player dismissed dead pet or pet despawned?
bool hadPet = true;
if (!player->GetPet())
{
// Position passed to SummonPet is irrelevant with current implementation,
@@ -5072,13 +5072,8 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/)
hadPet = false;
}
// TODO: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
Pet* pet = player->GetPet(); // Attempt to get current pet
if (!pet)
return;
// TODO: Better to fail Hunter's "Revive Pet" at cast instead of here when casting ends
if (pet->IsAlive())
if (!pet || pet->IsAlive())
return;
// If player did have a pet before reviving, teleport it