diff options
| author | Shauren <shauren.trinity@gmail.com> | 2015-03-04 12:17:06 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-03-04 12:17:06 +0100 |
| commit | e63872e1eeafb39483bfdecbd5c4efc1e3703069 (patch) | |
| tree | be0c1c5c546afb42443d062ee022bc3afec17162 /src/server/game/Spells | |
| parent | 0652b1072a329a2397398f4e5f101e54d7b6deae (diff) | |
Core/DataStores: Updated dbc structures to 6.1
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 14fcef182a0..ebc4cf53b98 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1695,16 +1695,14 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a if (RequiredAreasID > 0) { bool found = false; - AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(RequiredAreasID); - while (groupEntry) + std::vector<uint32> areaGroupMembers = sDB2Manager.GetAreasForGroup(RequiredAreasID); + for (uint32 areaId : areaGroupMembers) { - for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i) - if (groupEntry->AreaID[i] == zone_id || groupEntry->AreaID[i] == area_id) - found = true; - if (found || !groupEntry->NextAreaID) + if (areaId == zone_id || areaId == area_id) + { + found = true; break; - // Try search in next group - groupEntry = sAreaGroupStore.LookupEntry(groupEntry->NextAreaID); + } } if (!found) |
