aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/PetHandler.cpp5
-rw-r--r--src/game/Spell.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 350c390d86c..8ffe2529227 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -632,7 +632,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)
@@ -651,7 +654,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
caster->clearUnitState(UNIT_STAT_FOLLOW);
- Spell *spell = new Spell(caster, spellInfo, false);
+ Spell *spell = new Spell(caster, spellInfo, spellid == 33395); // water elemental can cast freeze as triggered
spell->m_targets = targets;
int16 result = spell->PetCanCast(NULL);
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d8cf24c2933..88bee994820 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4269,7 +4269,7 @@ int16 Spell::PetCanCast(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->IsNonMeleeSpellCasted(false) && !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;