[8614] Simplify check, drop redundent break.

This commit is contained in:
VladimirMangos 2009-10-10 11:40:11 +04:00
parent 21de4570dc
commit 17b0c43ea9
2 changed files with 3 additions and 8 deletions

View file

@ -2825,14 +2825,9 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
{
if (!player)
return SPELL_FAILED_REQUIRES_AREA;
MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
if (!mapEntry)
return SPELL_FAILED_REQUIRES_AREA;
if (!mapEntry->IsBattleGround())
return SPELL_FAILED_REQUIRES_AREA;
BattleGround* bg = player->GetBattleGround();
return map_id == 30 && bg && bg->GetStatus()!=STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
break;
return map_id == 30 && bg
&& bg->GetStatus() != STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
}
case 23333: // Warsong Flag
case 23335: // Silverwing Flag

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8613"
#define REVISION_NR "8614"
#endif // __REVISION_NR_H__