[7467] Use SpellCastResult and replace CanCast by CheckCast.

Note: proper way to check: if(spell->CheckCast(...)==SPELL_CAST_OK)
This commit is contained in:
VladimirMangos 2009-03-16 13:12:51 +03:00
parent c1b0e7d57a
commit 0e987bf59e
6 changed files with 75 additions and 76 deletions

View file

@ -2964,7 +2964,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
if( goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune ||
goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK )
{
//CanUseBattleGroundObject() already called in CanCast()
//CanUseBattleGroundObject() already called in CheckCast()
// in battleground check
if(BattleGround *bg = player->GetBattleGround())
{
@ -2976,7 +2976,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
}
else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
{
//CanUseBattleGroundObject() already called in CanCast()
//CanUseBattleGroundObject() already called in CheckCast()
// in battleground check
if(BattleGround *bg = player->GetBattleGround())
{
@ -3012,7 +3012,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
SendLoot(guid, LOOT_SKINNING);
// not allow use skill grou at item base open
// not allow use skill grow at item base open
if(!m_CastItem && skillId != SKILL_NONE)
{
// update skill if really known