mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7545] Fixed exploration achievements for certian areas
This commit is contained in:
parent
68ec6ae8ab
commit
ff0c31e103
4 changed files with 19 additions and 9 deletions
|
|
@ -725,14 +725,24 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
|
|||
if(!worldOverlayEntry)
|
||||
break;
|
||||
|
||||
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID);
|
||||
if(exploreFlag < 0)
|
||||
break;
|
||||
bool matchFound = false;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int32 exploreFlag = GetAreaFlagByAreaID(worldOverlayEntry->areatableID[i]);
|
||||
if(exploreFlag < 0)
|
||||
break;
|
||||
|
||||
uint32 playerIndexOffset = uint32(exploreFlag) / 32;
|
||||
uint32 mask = 1<< (uint32(exploreFlag) % 32);
|
||||
uint32 playerIndexOffset = uint32(exploreFlag) / 32;
|
||||
uint32 mask = 1<< (uint32(exploreFlag) % 32);
|
||||
|
||||
if(GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask)
|
||||
if(GetPlayer()->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + playerIndexOffset) & mask)
|
||||
{
|
||||
matchFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(matchFound)
|
||||
SetCriteriaProgress(achievementCriteria, 1);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1609,7 +1609,7 @@ struct WorldSafeLocsEntry
|
|||
struct WorldMapOverlayEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
uint32 areatableID; // 2
|
||||
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
|
||||
|
|
|
|||
|
|
@ -96,4 +96,4 @@ const char VehicleEntryfmt[]="niffffiiiiiiiiffffiiiiiifffffffffffssssfifi";
|
|||
const char VehicleSeatEntryfmt[]="niiffffffffffiiiiiifffffffiiifffiiiiiiiffiiiii";
|
||||
const char WorldMapAreaEntryfmt[]="xinxffffix";
|
||||
const char WorldSafeLocsEntryfmt[]="nifffxxxxxxxxxxxxxxxxx";
|
||||
const char WorldMapOverlayEntryfmt[]="nxixxxxxxxxxxxxxx";
|
||||
const char WorldMapOverlayEntryfmt[]="nxiiiixxxxxxxxxxx";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7544"
|
||||
#define REVISION_NR "7545"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue