Core/Spells: Implemented SPELL_ATTR12_NOT_IN_PROVING_GROUNDS
This commit is contained in:
@@ -4973,7 +4973,7 @@ bool Player::CanJoinConstantChannelInZone(ChatChannelsEntry const* channel, Area
|
||||
|
||||
if (channel->GetFlags().HasFlag(ChatChannelFlags::OnlyInCities) && !zone->GetFlags().HasFlag(AreaFlags::AllowTradeChannel))
|
||||
return false;
|
||||
|
||||
|
||||
if (channel->GetFlags().HasFlag(ChatChannelFlags::GuildRecruitment) && GetGuildId())
|
||||
return false;
|
||||
|
||||
|
||||
@@ -894,7 +894,7 @@ enum SpellAttr12 : uint32
|
||||
SPELL_ATTR12_UNK14 = 0x00004000, // TITLE Unknown attribute 14@Attr12
|
||||
SPELL_ATTR12_UNK15 = 0x00008000, // TITLE Unknown attribute 15@Attr12
|
||||
SPELL_ATTR12_UNK16 = 0x00010000, // TITLE Unknown attribute 16@Attr12
|
||||
SPELL_ATTR12_UNK17 = 0x00020000, // TITLE Unknown attribute 17@Attr12
|
||||
SPELL_ATTR12_NOT_IN_PROVING_GROUNDS = 0x00020000, // TITLE Not In Proving Grounds
|
||||
SPELL_ATTR12_UNK18 = 0x00040000, // TITLE Unknown attribute 18@Attr12
|
||||
SPELL_ATTR12_UNK19 = 0x00080000, // TITLE Unknown attribute 19@Attr12
|
||||
SPELL_ATTR12_UNK20 = 0x00100000, // TITLE Unknown attribute 20@Attr12
|
||||
|
||||
@@ -1842,7 +1842,7 @@ namespace Trinity::Impl::EnumUtilsImpl
|
||||
case SPELL_ATTR12_UNK14: return { "SPELL_ATTR12_UNK14", "Unknown attribute 14@Attr12", "" };
|
||||
case SPELL_ATTR12_UNK15: return { "SPELL_ATTR12_UNK15", "Unknown attribute 15@Attr12", "" };
|
||||
case SPELL_ATTR12_UNK16: return { "SPELL_ATTR12_UNK16", "Unknown attribute 16@Attr12", "" };
|
||||
case SPELL_ATTR12_UNK17: return { "SPELL_ATTR12_UNK17", "Unknown attribute 17@Attr12", "" };
|
||||
case SPELL_ATTR12_NOT_IN_PROVING_GROUNDS: return { "SPELL_ATTR12_NOT_IN_PROVING_GROUNDS", "Not In Proving Grounds", "" };
|
||||
case SPELL_ATTR12_UNK18: return { "SPELL_ATTR12_UNK18", "Unknown attribute 18@Attr12", "" };
|
||||
case SPELL_ATTR12_UNK19: return { "SPELL_ATTR12_UNK19", "Unknown attribute 19@Attr12", "" };
|
||||
case SPELL_ATTR12_UNK20: return { "SPELL_ATTR12_UNK20", "Unknown attribute 20@Attr12", "" };
|
||||
@@ -1886,7 +1886,7 @@ namespace Trinity::Impl::EnumUtilsImpl
|
||||
case 14: return SPELL_ATTR12_UNK14;
|
||||
case 15: return SPELL_ATTR12_UNK15;
|
||||
case 16: return SPELL_ATTR12_UNK16;
|
||||
case 17: return SPELL_ATTR12_UNK17;
|
||||
case 17: return SPELL_ATTR12_NOT_IN_PROVING_GROUNDS;
|
||||
case 18: return SPELL_ATTR12_UNK18;
|
||||
case 19: return SPELL_ATTR12_UNK19;
|
||||
case 20: return SPELL_ATTR12_UNK20;
|
||||
@@ -1927,7 +1927,7 @@ namespace Trinity::Impl::EnumUtilsImpl
|
||||
case SPELL_ATTR12_UNK14: return 14;
|
||||
case SPELL_ATTR12_UNK15: return 15;
|
||||
case SPELL_ATTR12_UNK16: return 16;
|
||||
case SPELL_ATTR12_UNK17: return 17;
|
||||
case SPELL_ATTR12_NOT_IN_PROVING_GROUNDS: return 17;
|
||||
case SPELL_ATTR12_UNK18: return 18;
|
||||
case SPELL_ATTR12_UNK19: return 19;
|
||||
case SPELL_ATTR12_UNK20: return 20;
|
||||
|
||||
@@ -2255,6 +2255,13 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
return SPELL_FAILED_NOT_IN_BATTLEGROUND;
|
||||
}
|
||||
|
||||
if (HasAttribute(SPELL_ATTR12_NOT_IN_PROVING_GROUNDS))
|
||||
{
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
|
||||
if (mapEntry && mapEntry->GetFlags().HasFlag(MapFlags::ProvingGrounds))
|
||||
return SPELL_FAILED_NOT_HERE;
|
||||
}
|
||||
|
||||
// DB base check (if non empty then must fit at least single for allow)
|
||||
SpellAreaMapBounds saBounds = sSpellMgr->GetSpellAreaMapBounds(Id);
|
||||
if (saBounds.first != saBounds.second)
|
||||
|
||||
Reference in New Issue
Block a user