aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-03 23:23:58 -0500
committermegamage <none@none>2009-06-03 23:23:58 -0500
commit65881812aa3660fb2f7f902060a54f73321ffc92 (patch)
tree1924adbf9c920efb18f4c401e8b16505527cf5a5 /src/game/PetHandler.cpp
parented7e8569cc7ae60feaf21c0742de93fd2f776630 (diff)
*Allow water elemental to cast freeze while casting water bolt.
--HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index d6ffb51f74d..87c667f1e77 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -627,7 +627,10 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
}
if (caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->GetGlobalCooldown() > 0)
+ {
+ caster->SendPetCastFail(spellid, SPELL_FAILED_NOT_READY);
return;
+ }
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid);
if(!spellInfo)
@@ -646,8 +649,8 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
caster->clearUnitState(UNIT_STAT_FOLLOW);
- Spell *spell = new Spell(caster, spellInfo, false);
- spell->m_cast_count = cast_count; // probably pending spell cast
+ Spell *spell = new Spell(caster, spellInfo, spellid == 33395); // water elemental can cast freeze as triggered
+ spell->m_cast_count = spellid == 33395 ? 0 : cast_count; // probably pending spell cast
spell->m_targets = targets;
SpellCastResult result = spell->CheckPetCast(NULL);