aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiscover- <amort11@hotmail.com>2014-01-17 17:54:52 +0100
committerDiscover- <amort11@hotmail.com>2014-01-17 17:54:52 +0100
commitebfdeb067f4576d9e9da5c392e43d6a3e6a521ab (patch)
tree481e3cda6094a0ef1a97056da73dee022a7afc05 /src
parentc1a468365b6a312c5efdf30a63c5cd2b1a2d35ef (diff)
Core/Spells: Rename Spell::EffectSummonDeadPet with Spell::EffectResurrectPet and get rid of two TODO's that are already done.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.h2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp13
2 files changed, 5 insertions, 10 deletions
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 5653bc1194f..72bc195aec7 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -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);
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index b8e5b3ff742..4e57c538c4d 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -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