*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:
QAston
2009-06-29 20:50:38 +02:00
parent 4067989096
commit 8609527066
3 changed files with 9 additions and 8 deletions
+7 -6
View File
@@ -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
View File
@@ -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
View File
@@ -728,8 +728,8 @@ void Spell::FillTargetMap()
m_UniqueTargetInfo.erase(ihit++);
continue;
}
++ihit;
}
++ihit;
}
if (checkLvl && m_UniqueTargetInfo.empty())
{