diff options
-rw-r--r-- | src/server/game/DataStores/DBCStores.cpp | 17 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 2 | ||||
-rwxr-xr-x | src/server/game/DataStores/DBCfmt.h | 2 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index e2fce5491a9..c3fc1275468 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -882,6 +882,10 @@ uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId) return mapid; } +/* +Used only for calculate xp gain by content lvl. +Calculation on Gilneas and group maps of LostIslands calculated as CONTENT_1_60. +*/ ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId) { mapid = GetVirtualMapForMapAndZone(mapid, zoneId); @@ -892,7 +896,18 @@ ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId) if (!mapEntry) return CONTENT_1_60; - return ContentLevels(mapEntry->Expansion()); + // no need enum all maps from phasing + if (mapEntry->rootPhaseMap >= 0) + mapid = mapEntry->rootPhaseMap; + + switch (mapid) + { + case 648: //LostIslands + case 654: //Gilneas + return CONTENT_1_60; + default: + return ContentLevels(mapEntry->Expansion()); + } } bool IsTotemCategoryCompatiableWith(uint32 itemTotemCategoryId, uint32 requiredTotemCategoryId) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 38cc9fe29e7..b62f86e6799 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1425,7 +1425,7 @@ struct MapEntry uint32 addon; // 16 m_expansionID uint32 unk_time; // 17 m_raidOffset //uint32 maxPlayers; // 18 m_maxPlayers - //uint32 unk400; // 19 new 4.0.0, mapid, related to phasing + int32 rootPhaseMap; // 19 new 4.0.0, mapid, related to phasing // Helpers uint32 Expansion() const { return addon; } diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 6561fd9029c..a19dfd0b803 100755 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -103,7 +103,7 @@ const char LiquidTypefmt[]="nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx"; const char PhaseEntryfmt[]="nsi"; const char MailTemplateEntryfmt[]="nxs"; -const char MapEntryfmt[]="nxixxxsixxixiffxiixx"; +const char MapEntryfmt[]="nxixxxsixxixiffxiixi"; const char MapDifficultyEntryfmt[]="diisiix"; const char MovieEntryfmt[]="nxxx"; const char MountCapabilityfmt[]="niiiiiii"; |