aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/PetHandler.cpp13
-rw-r--r--src/game/Player.cpp2
-rw-r--r--src/game/Spell.cpp2
3 files changed, 9 insertions, 8 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 3dc7c6d4ff1..67e6576c25b 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -615,12 +615,6 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
return;
}
- 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)
{
@@ -628,6 +622,13 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
return;
}
+ if (spellInfo->StartRecoveryCategory > 0) //Check if spell is affected by GCD
+ if (caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->GetGlobalCooldown() > 0)
+ {
+ caster->SendPetCastFail(spellid, SPELL_FAILED_NOT_READY);
+ return;
+ }
+
// do not cast not learned spells
if(!caster->HasSpell(spellid) || IsPassiveSpell(spellid))
return;
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 53add222819..0a90f721899 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17316,7 +17316,7 @@ void Player::SetSpellModTakingSpell(Spell * spell, bool apply)
if (!spell || (m_spellModTakingSpell && m_spellModTakingSpell != spell))
return;
- if (apply && spell->m_spellState == SPELL_STATE_FINISHED)
+ if (apply && spell->getState() == SPELL_STATE_FINISHED)
return;
if (apply)
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 4d0ea4a23ad..88e815352e1 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -728,8 +728,8 @@ void Spell::FillTargetMap()
m_UniqueTargetInfo.erase(ihit++);
continue;
}
- ++ihit;
}
+ ++ihit;
}
if (checkLvl && m_UniqueTargetInfo.empty())
{