mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7719] Use all existed 4 world map overlay area ids instead 3, replace values by constant for avoid problem repeat.
This commit is contained in:
parent
d74cdadc54
commit
b62c142425
6 changed files with 24 additions and 14 deletions
|
|
@ -890,12 +890,16 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
||||||
break;
|
break;
|
||||||
|
|
||||||
bool matchFound = false;
|
bool matchFound = false;
|
||||||
for (int j = 0; j < 3; ++j)
|
for (int j = 0; j < MAX_WORLD_MAP_OVERLAY_AREA_IDX; ++j)
|
||||||
{
|
{
|
||||||
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[j]);
|
uint32 area_id = worldOverlayEntry->areatableID[j];
|
||||||
if(exploreFlag < 0)
|
if(!area_id) // array have 0 only in empty tail
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
int32 exploreFlag = GetAreaFlagByAreaID(area_id);
|
||||||
|
if(exploreFlag < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
uint32 playerIndexOffset = uint32(exploreFlag) / 32;
|
uint32 playerIndexOffset = uint32(exploreFlag) / 32;
|
||||||
uint32 mask = 1<< (uint32(exploreFlag) % 32);
|
uint32 mask = 1<< (uint32(exploreFlag) % 32);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,8 +149,8 @@ DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt);
|
||||||
DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
|
DBCStorage <VehicleEntry> sVehicleStore(VehicleEntryfmt);
|
||||||
DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
|
DBCStorage <VehicleSeatEntry> sVehicleSeatStore(VehicleSeatEntryfmt);
|
||||||
DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
|
DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt);
|
||||||
DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
|
|
||||||
DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt);
|
DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore(WorldMapOverlayEntryfmt);
|
||||||
|
DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
|
||||||
|
|
||||||
typedef std::list<std::string> StoreProblemList;
|
typedef std::list<std::string> StoreProblemList;
|
||||||
|
|
||||||
|
|
@ -508,8 +508,8 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleStore, dbcPath,"Vehicle.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleStore, dbcPath,"Vehicle.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleSeatStore, dbcPath,"VehicleSeat.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sVehicleSeatStore, dbcPath,"VehicleSeat.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapAreaStore, dbcPath,"WorldMapArea.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapAreaStore, dbcPath,"WorldMapArea.dbc");
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
|
|
||||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapOverlayStore, dbcPath,"WorldMapOverlay.dbc");
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldMapOverlayStore, dbcPath,"WorldMapOverlay.dbc");
|
||||||
|
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sWorldSafeLocsStore, dbcPath,"WorldSafeLocs.dbc");
|
||||||
|
|
||||||
// error checks
|
// error checks
|
||||||
if(bad_dbc_files.size() >= DBCFilesCount )
|
if(bad_dbc_files.size() >= DBCFilesCount )
|
||||||
|
|
|
||||||
|
|
@ -144,8 +144,8 @@ extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
|
||||||
extern DBCStorage <VehicleEntry> sVehicleStore;
|
extern DBCStorage <VehicleEntry> sVehicleStore;
|
||||||
extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
|
extern DBCStorage <VehicleSeatEntry> sVehicleSeatStore;
|
||||||
//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
|
//extern DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore; -- use Zone2MapCoordinates and Map2ZoneCoordinates
|
||||||
extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
|
|
||||||
extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
|
extern DBCStorage <WorldMapOverlayEntry> sWorldMapOverlayStore;
|
||||||
|
extern DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore;
|
||||||
|
|
||||||
void LoadDBCStores(const std::string& dataPath);
|
void LoadDBCStores(const std::string& dataPath);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1641,6 +1641,18 @@ struct WorldMapAreaEntry
|
||||||
// int32 dungeonMap_id; // 9 pointer to DungeonMap.dbc (owerride x1,x2,y1,y2 coordinates)
|
// int32 dungeonMap_id; // 9 pointer to DungeonMap.dbc (owerride x1,x2,y1,y2 coordinates)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MAX_WORLD_MAP_OVERLAY_AREA_IDX 4
|
||||||
|
|
||||||
|
struct WorldMapOverlayEntry
|
||||||
|
{
|
||||||
|
uint32 ID; // 0
|
||||||
|
//uint32 worldMapAreaId; // 1 idx in WorldMapArea.dbc
|
||||||
|
uint32 areatableID[MAX_WORLD_MAP_OVERLAY_AREA_IDX]; // 2-5
|
||||||
|
// 6-7 always 0, possible part of areatableID[]
|
||||||
|
//char* internal_name // 8
|
||||||
|
// 9-16 some ints
|
||||||
|
};
|
||||||
|
|
||||||
struct WorldSafeLocsEntry
|
struct WorldSafeLocsEntry
|
||||||
{
|
{
|
||||||
uint32 ID; // 0
|
uint32 ID; // 0
|
||||||
|
|
@ -1652,12 +1664,6 @@ struct WorldSafeLocsEntry
|
||||||
// 21 name flags, unused
|
// 21 name flags, unused
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WorldMapOverlayEntry
|
|
||||||
{
|
|
||||||
uint32 ID; // 0
|
|
||||||
uint32 areatableID[4]; // 2-5
|
|
||||||
};
|
|
||||||
|
|
||||||
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
// GCC have alternative #pragma pack() syntax and old gcc version not support pack(pop), also any gcc version not support it at some platform
|
||||||
#if defined( __GNUC__ )
|
#if defined( __GNUC__ )
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ const char TotemCategoryEntryfmt[]="nxxxxxxxxxxxxxxxxxii";
|
||||||
const char VehicleEntryfmt[]="niffffiiiiiiiiffffiiiiiifffffffffffssssfifi";
|
const char VehicleEntryfmt[]="niffffiiiiiiiiffffiiiiiifffffffffffssssfifi";
|
||||||
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii";
|
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii";
|
||||||
const char WorldMapAreaEntryfmt[]="xinxffffix";
|
const char WorldMapAreaEntryfmt[]="xinxffffix";
|
||||||
const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx";
|
|
||||||
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx";
|
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx";
|
||||||
|
const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx";
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7718"
|
#define REVISION_NR "7719"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue