Fix travel to Azuremyst via Elune's Blessing

This commit is contained in:
郑佩茹
2023-03-27 10:40:15 -06:00
parent 53b21879bd
commit c604f800e3
2 changed files with 16 additions and 4 deletions

View File

@@ -82,7 +82,8 @@ enum ProgressionZones
ZONE_EVERSONG = 3430, ZONE_EVERSONG = 3430,
ZONE_EXODAR = 3557, ZONE_EXODAR = 3557,
ZONE_SILVERMOON = 3487, ZONE_SILVERMOON = 3487,
ZONE_QUELDANAS = 4080 ZONE_QUELDANAS = 4080,
ZONE_VEILED_SEA = 3479
}; };
enum ProgressionAreas enum ProgressionAreas

View File

@@ -2,6 +2,17 @@
class IndividualPlayerProgression : public PlayerScript class IndividualPlayerProgression : public PlayerScript
{ {
private:
static bool IsTBCRaceStartingZone(uint32 mapid, float x, float y, float z)
{
Map const *map = sMapMgr->FindMap(mapid, 0);
uint32 zoneId = map->GetZoneId(0, x, y, z);
return (zoneId == ZONE_AZUREMYST || zoneId == ZONE_BLOODMYST || zoneId == ZONE_GHOSTLANDS ||
zoneId == ZONE_EVERSONG || zoneId == ZONE_EXODAR || zoneId == ZONE_SILVERMOON ||
zoneId == ZONE_VEILED_SEA);
}
public: public:
IndividualPlayerProgression() : PlayerScript("IndividualProgression") { } IndividualPlayerProgression() : PlayerScript("IndividualProgression") { }
@@ -161,13 +172,13 @@ public:
} }
if (mapid == MAP_OUTLANDS) if (mapid == MAP_OUTLANDS)
{ {
Map const* map = sMapMgr->FindMap(mapid, 0);
uint32 zoneId = map->GetZoneId(0, x, y, z);
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40)) if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40))
{ {
// The player may be in the Azuremyst area which is on the outlands map - check the area ID // The player may be in the Azuremyst area which is on the outlands map - check the area ID
return (zoneId == ZONE_AZUREMYST || zoneId == ZONE_BLOODMYST || zoneId == ZONE_GHOSTLANDS || zoneId == ZONE_EVERSONG || zoneId == ZONE_EXODAR || zoneId == ZONE_SILVERMOON); return IsTBCRaceStartingZone(mapid, x, y, z);
} }
Map const *map = sMapMgr->FindMap(mapid, 0);
uint32 zoneId = map->GetZoneId(0, x, y, z);
if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_4) && zoneId == ZONE_QUELDANAS) if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_4) && zoneId == ZONE_QUELDANAS)
{ {
return false; return false;