mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8610] castchecks for recall spell for the av-trinket
this spell should be cast only in battlegrounds and only after battleground started
This commit is contained in:
parent
bb10fada9a
commit
4dc1df7d54
2 changed files with 16 additions and 1 deletions
|
|
@ -2819,6 +2819,21 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||||
|
|
||||||
switch(spellInfo->Id)
|
switch(spellInfo->Id)
|
||||||
{
|
{
|
||||||
|
// a trinket in alterac valley allows to teleport to the boss
|
||||||
|
case 22564: // recall
|
||||||
|
case 22563: // recall
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
case 23333: // Warsong Flag
|
case 23333: // Warsong Flag
|
||||||
case 23335: // Silverwing Flag
|
case 23335: // Silverwing Flag
|
||||||
return map_id == 489 && player && player->InBattleGround() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
return map_id == 489 && player && player->InBattleGround() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8609"
|
#define REVISION_NR "8610"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue