mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8614] Simplify check, drop redundent break.
This commit is contained in:
parent
21de4570dc
commit
17b0c43ea9
2 changed files with 3 additions and 8 deletions
|
|
@ -2825,14 +2825,9 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||||
{
|
{
|
||||||
if (!player)
|
if (!player)
|
||||||
return SPELL_FAILED_REQUIRES_AREA;
|
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();
|
BattleGround* bg = player->GetBattleGround();
|
||||||
return map_id == 30 && bg && bg->GetStatus()!=STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
return map_id == 30 && bg
|
||||||
break;
|
&& bg->GetStatus() != STATUS_WAIT_JOIN ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||||
}
|
}
|
||||||
case 23333: // Warsong Flag
|
case 23333: // Warsong Flag
|
||||||
case 23335: // Silverwing Flag
|
case 23335: // Silverwing Flag
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8613"
|
#define REVISION_NR "8614"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue