aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/PetHandler.cpp7
-rw-r--r--src/game/Spell.cpp2
2 files changed, 6 insertions, 3 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);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index bfa843c873e..a7e7212f9e9 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4753,7 +4753,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
if(!m_caster->isAlive())
return SPELL_FAILED_CASTER_DEAD;
- if(m_caster->IsNonMeleeSpellCasted(false)) //prevent spellcast interruption by another spellcast
+ if(m_caster->hasUnitState(UNIT_STAT_CASTING) && !m_IsTriggeredSpell) //prevent spellcast interruption by another spellcast
return SPELL_FAILED_SPELL_IN_PROGRESS;
if(m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo))
return SPELL_FAILED_AFFECTING_COMBAT;