diff options
author | krz <none@none> | 2009-06-05 02:02:50 +0200 |
---|---|---|
committer | krz <none@none> | 2009-06-05 02:02:50 +0200 |
commit | 65598fe2333472adb9a9eaa80ff4d5d3f62cce10 (patch) | |
tree | 9ae510ce0a862839e6081092db05fcb0c924e75b /src | |
parent | 85b68d886aa5ebc92dbd28ad83f710c0fd655579 (diff) |
Backported from TC2: allow Water Elemental to cast Freeze while casting Water Bolt
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/PetHandler.cpp | 5 | ||||
-rw-r--r-- | src/game/Spell.cpp | 2 |
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; |