[11639] Limit spells 74410 and 74411 only to bg and arenas

This commit is contained in:
zergtmn 2011-06-18 01:37:33 +06:00
parent b4ec3f3fd9
commit 479cfcf84a
2 changed files with 11 additions and 1 deletions

View file

@ -3933,6 +3933,16 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
BattleGround* bg = player->GetBattleGround(); BattleGround* bg = player->GetBattleGround();
return bg && bg->GetStatus()==STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_ONLY_IN_ARENA; return bg && bg->GetStatus()==STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_ONLY_IN_ARENA;
} }
case 74410: // Arena - Dampening
return player && player->InArena() ? SPELL_CAST_OK : SPELL_FAILED_ONLY_IN_ARENA;
case 74411: // Battleground - Dampening
{
if (!player)
return SPELL_FAILED_ONLY_BATTLEGROUNDS;
BattleGround* bg = player->GetBattleGround();
return bg && !bg->isArena() ? SPELL_CAST_OK : SPELL_FAILED_ONLY_BATTLEGROUNDS;
}
} }
return SPELL_CAST_OK; return SPELL_CAST_OK;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11638" #define REVISION_NR "11639"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__