From c79f511defbf4b079aef73ac80471bd52292f2d7 Mon Sep 17 00:00:00 2001 From: Grimfeather <88028633+Grimfeather@users.noreply.github.com> Date: Tue, 24 Jun 2025 09:42:08 +0200 Subject: [PATCH] Update IndividualProgressionPlayer.cpp a lot of phasing was removed in an update 2 weeks ago https://github.com/ZhengPeiRu21/mod-individual-progression/pull/492 can't revert, so fixing it manually. --- src/IndividualProgressionPlayer.cpp | 364 ++++++++++++++++++++++++++-- 1 file changed, 345 insertions(+), 19 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index 848b0ef..6a255d0 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -531,8 +531,29 @@ public: { switch (newArea) { case AREA_DARKSHORE: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_GROVE_OF_THE_ANCIENTS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_WILDBEND_RIVER: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_TWILIGHT_VALE: if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) { @@ -542,8 +563,47 @@ public: } break; case AREA_SILITHUS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + else if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ_WAR)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE_II, false); + } + break; case AREA_HIVE_ASHI: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + else if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ_WAR)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE_II, false); + } + break; case AREA_HIVE_ZORA: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + else if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ_WAR)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE_II, false); + } + break; case AREA_HIVE_REGAL: if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_AQ_WAR))) { @@ -559,9 +619,37 @@ public: } break; case AREA_BOUGH_SHADOW: + if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_ONYXIA)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_SERADANE: + if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_ONYXIA)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_DREAM_BOUGH: + if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_ONYXIA)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_JADEMIR_LAKE: + if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_ONYXIA)) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_TWILIGHT_GROVE: if (sIndividualProgression->hasPassedProgression(player, PROGRESSION_ONYXIA)) { @@ -571,40 +659,126 @@ public: } break; case AREA_DUROTAR: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_ROCKTUSK_FARM: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_TIRISFAL_GLADES: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_RUINS_OF_LORDAERON: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_MULGORE: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_VALLEY_OF_HEROES: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_ELWYNN_FOREST: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_DUN_MOROGH: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_TELDRASSIL: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_EASTERN_PLAGUELANDS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_PESTILENT_SCAR: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_THE_MARRIS_STEAD: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_BLASTED_LANDS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_RISE_OF_THE_DEFILER: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_DREADMAUL_HOLD: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; case AREA_DREADMAUL_POST: - case AREA_SERPENTS_COIL: - case AREA_TANARIS: - case AREA_GADGETZAN: - case AREA_ABYSSAL_SANDS: - case AREA_BROKEN_PILLAR: - case AREA_WINTERSPRING: - case AREA_TIMBERMAW_POST: - case AREA_FROSTSABER_ROCK: - case AREA_ICE_THISTLE_HILLS: - case AREA_MAZTHORIL: - case AREA_AZSHARA: - case AREA_HALDARR_ENCAMPMENT: - case AREA_THE_SHATTERED_STRAND: - case AREA_SOUTHRIDGE_BEACH: - case AREA_BURNING_STEPPES: - case AREA_DRACO_DAR: - case AREA_BLACKROCK_MOUNTAIN: - case AREA_DREADMAUL_ROCK: - case AREA_RUINS_OF_THAURISSAN: if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) { player->RemoveAura(IPP_PHASE); @@ -624,6 +798,158 @@ public: player->RemoveAura(IPP_PHASE); player->RemoveAura(IPP_PHASE_II); player->CastSpell(player, IPP_PHASE_II, false); + } + break; + case AREA_SERPENTS_COIL: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_TANARIS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_GADGETZAN: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_ABYSSAL_SANDS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_BROKEN_PILLAR: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_WINTERSPRING: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_TIMBERMAW_POST: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_FROSTSABER_ROCK: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_ICE_THISTLE_HILLS: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_MAZTHORIL: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_AZSHARA: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_HALDARR_ENCAMPMENT: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_THE_SHATTERED_STRAND: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_SOUTHRIDGE_BEACH: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_BURNING_STEPPES: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_DRACO_DAR: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_BLACKROCK_MOUNTAIN: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_DREADMAUL_ROCK: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); + } + break; + case AREA_RUINS_OF_THAURISSAN: + if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_AQ)) && (sIndividualProgression->isBeforeProgression(player, PROGRESSION_NAXX40))) + { + player->RemoveAura(IPP_PHASE); + player->RemoveAura(IPP_PHASE_II); + player->CastSpell(player, IPP_PHASE, false); } break; case AREA_LIGHTS_HOPE: