*Fix the issue of water elemental GCD preventing freeze to be casted - by Larva
*Correct a typo in prev commit. --HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -728,8 +728,8 @@ void Spell::FillTargetMap()
|
||||
m_UniqueTargetInfo.erase(ihit++);
|
||||
continue;
|
||||
}
|
||||
++ihit;
|
||||
}
|
||||
++ihit;
|
||||
}
|
||||
if (checkLvl && m_UniqueTargetInfo.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user