mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[8456] Implement area check for SPELL_ATTR_EX6_NOT_IN_RAID_INSTANCE
Base at hunuza reseach.
This commit is contained in:
parent
664112a738
commit
e59eea4fb5
5 changed files with 16 additions and 8 deletions
|
|
@ -1302,7 +1302,7 @@ struct SpellEntry
|
||||||
uint32 AttributesEx3; // 7 m_attributesExC
|
uint32 AttributesEx3; // 7 m_attributesExC
|
||||||
uint32 AttributesEx4; // 8 m_attributesExD
|
uint32 AttributesEx4; // 8 m_attributesExD
|
||||||
uint32 AttributesEx5; // 9 m_attributesExE
|
uint32 AttributesEx5; // 9 m_attributesExE
|
||||||
//uint32 AttributesEx6; // 10 m_attributesExF not used
|
uint32 AttributesEx6; // 10 m_attributesExF
|
||||||
uint32 Stances; // 11 m_shapeshiftMask
|
uint32 Stances; // 11 m_shapeshiftMask
|
||||||
uint32 StancesNot; // 12 m_shapeshiftExclude
|
uint32 StancesNot; // 12 m_shapeshiftExclude
|
||||||
uint32 Targets; // 13 m_targets
|
uint32 Targets; // 13 m_targets
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ const char SkillLineAbilityfmt[]="niiiixxiiiiixx";
|
||||||
const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
const char SoundEntriesfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||||
const char SpellCastTimefmt[]="nixx";
|
const char SpellCastTimefmt[]="nixx";
|
||||||
const char SpellDurationfmt[]="niii";
|
const char SpellDurationfmt[]="niii";
|
||||||
const char SpellEntryfmt[]="niiiiiiiiixiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixx";
|
const char SpellEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiifxiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffffffiiiiiiiiiiiiiiiiiiiiifffiiiiiiiiiiiiiiifffiiiiiiiiiiiiixssssssssssssssssxssssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiiiiiiiiiiixfffxxxiiiiixx";
|
||||||
const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
|
const char SpellFocusObjectfmt[]="nxxxxxxxxxxxxxxxxx";
|
||||||
const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiixxx";
|
const char SpellItemEnchantmentfmt[]="nxiiiiiixxxiiissssssssssssssssxiiiixxx";
|
||||||
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
|
const char SpellItemEnchantmentConditionfmt[]="nbbbbbxxxxxbbbbbbbbbbiiiiiXXXXX";
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
||||||
#define SPELL_ATTR_EX5_UNK31 0x80000000 // 31 Forces all nearby enemies to focus attacks caster
|
#define SPELL_ATTR_EX5_UNK31 0x80000000 // 31 Forces all nearby enemies to focus attacks caster
|
||||||
|
|
||||||
#define SPELL_ATTR_EX6_UNK0 0x00000001 // 0 Only Move spell have this flag
|
#define SPELL_ATTR_EX6_UNK0 0x00000001 // 0 Only Move spell have this flag
|
||||||
#define SPELL_ATTR_EX6_UNK1 0x00000002 // 1 only usable in arena
|
#define SPELL_ATTR_EX6_ONLY_IN_ARENA 0x00000002 // 1 only usable in arena, not used in 3.2.0a and early
|
||||||
#define SPELL_ATTR_EX6_UNK2 0x00000004 // 2
|
#define SPELL_ATTR_EX6_UNK2 0x00000004 // 2
|
||||||
#define SPELL_ATTR_EX6_UNK3 0x00000008 // 3
|
#define SPELL_ATTR_EX6_UNK3 0x00000008 // 3
|
||||||
#define SPELL_ATTR_EX6_UNK4 0x00000010 // 4
|
#define SPELL_ATTR_EX6_UNK4 0x00000010 // 4
|
||||||
|
|
@ -427,7 +427,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
||||||
#define SPELL_ATTR_EX6_UNK8 0x00000100 // 8
|
#define SPELL_ATTR_EX6_UNK8 0x00000100 // 8
|
||||||
#define SPELL_ATTR_EX6_UNK9 0x00000200 // 9
|
#define SPELL_ATTR_EX6_UNK9 0x00000200 // 9
|
||||||
#define SPELL_ATTR_EX6_UNK10 0x00000400 // 10
|
#define SPELL_ATTR_EX6_UNK10 0x00000400 // 10
|
||||||
#define SPELL_ATTR_EX6_UNK11 0x00000800 // 11 not usable in raid instance
|
#define SPELL_ATTR_EX6_NOT_IN_RAID_INSTANCE 0x00000800 // 11 not usable in raid instance
|
||||||
#define SPELL_ATTR_EX6_UNK12 0x00001000 // 12
|
#define SPELL_ATTR_EX6_UNK12 0x00001000 // 12
|
||||||
#define SPELL_ATTR_EX6_UNK13 0x00002000 // 13
|
#define SPELL_ATTR_EX6_UNK13 0x00002000 // 13
|
||||||
#define SPELL_ATTR_EX6_UNK14 0x00004000 // 14
|
#define SPELL_ATTR_EX6_UNK14 0x00004000 // 14
|
||||||
|
|
|
||||||
|
|
@ -2746,7 +2746,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||||
while (groupEntry)
|
while (groupEntry)
|
||||||
{
|
{
|
||||||
for (uint32 i=0; i<6; ++i)
|
for (uint32 i=0; i<6; ++i)
|
||||||
if( groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id )
|
if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id)
|
||||||
found = true;
|
found = true;
|
||||||
if (found || !groupEntry->nextGroup)
|
if (found || !groupEntry->nextGroup)
|
||||||
break;
|
break;
|
||||||
|
|
@ -2754,7 +2754,7 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||||
groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
|
groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!found)
|
if (!found)
|
||||||
return SPELL_FAILED_INCORRECT_AREA;
|
return SPELL_FAILED_INCORRECT_AREA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2763,10 +2763,18 @@ SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spell
|
||||||
{
|
{
|
||||||
uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
|
uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
|
||||||
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
|
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
|
||||||
if(!mapEntry || mapEntry->addon < 1 || !mapEntry->IsContinent())
|
if (!mapEntry || mapEntry->addon < 1 || !mapEntry->IsContinent())
|
||||||
return SPELL_FAILED_INCORRECT_AREA;
|
return SPELL_FAILED_INCORRECT_AREA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// raid instance limitation
|
||||||
|
if (spellInfo->AttributesEx6 & SPELL_ATTR_EX6_NOT_IN_RAID_INSTANCE)
|
||||||
|
{
|
||||||
|
MapEntry const* mapEntry = sMapStore.LookupEntry(map_id);
|
||||||
|
if (!mapEntry || mapEntry->IsRaid())
|
||||||
|
return SPELL_FAILED_NOT_IN_RAID_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
// DB base check (if non empty then must fit at least single for allow)
|
// DB base check (if non empty then must fit at least single for allow)
|
||||||
SpellAreaMapBounds saBounds = spellmgr.GetSpellAreaMapBounds(spellInfo->Id);
|
SpellAreaMapBounds saBounds = spellmgr.GetSpellAreaMapBounds(spellInfo->Id);
|
||||||
if (saBounds.first != saBounds.second)
|
if (saBounds.first != saBounds.second)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8455"
|
#define REVISION_NR "8456"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue