Update IndividualProgressionPlayer.cpp

This commit is contained in:
Grimfeather
2025-11-27 18:58:20 +01:00
committed by GitHub
parent 8fc208cf54
commit 6fb4b03caa

View File

@@ -38,7 +38,7 @@ public:
sIndividualProgression->checkIPProgression(player); sIndividualProgression->checkIPProgression(player);
sIndividualProgression->UpdateProgressionQuests(player); sIndividualProgression->UpdateProgressionQuests(player);
} }
if (sIndividualProgression->ExcludedAccountsEarnPvPTitles || !sIndividualProgression->isExcludedFromProgression(player)) if (sIndividualProgression->ExcludedAccountsEarnPvPTitles || !sIndividualProgression->isExcludedFromProgression(player))
{ {
sIndividualProgression->AwardEarnedVanillaPvpTitles(player); sIndividualProgression->AwardEarnedVanillaPvpTitles(player);
@@ -47,7 +47,7 @@ public:
if (sIndividualProgression->isExcludedFromProgression(player)) if (sIndividualProgression->isExcludedFromProgression(player))
{ {
sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(0)); sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(0));
} }
sIndividualProgression->CheckAdjustments(player); sIndividualProgression->CheckAdjustments(player);
@@ -107,7 +107,7 @@ public:
{ {
return false; return false;
} }
// Player is still in Vanilla content - give money at 60 level cap // Player is still in Vanilla content - give money at 60 level cap
return ((!sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_TBC) && player->GetLevel() == IP_LEVEL_VANILLA) || return ((!sIndividualProgression->hasPassedProgression(player, PROGRESSION_PRE_TBC) && player->GetLevel() == IP_LEVEL_VANILLA) ||
// Player is in TBC content - give money at 70 level cap // Player is in TBC content - give money at 70 level cap
@@ -159,7 +159,7 @@ public:
static bool isAttuned(Player* player) static bool isAttuned(Player* player)
{ {
if ((player->GetQuestStatus(NAXX40_ATTUNEMENT_1) == QUEST_STATUS_REWARDED) || if ((player->GetQuestStatus(NAXX40_ATTUNEMENT_1) == QUEST_STATUS_REWARDED) ||
(player->GetQuestStatus(NAXX40_ATTUNEMENT_2) == QUEST_STATUS_REWARDED) || (player->GetQuestStatus(NAXX40_ATTUNEMENT_2) == QUEST_STATUS_REWARDED) ||
(player->GetQuestStatus(NAXX40_ATTUNEMENT_3) == QUEST_STATUS_REWARDED)) (player->GetQuestStatus(NAXX40_ATTUNEMENT_3) == QUEST_STATUS_REWARDED))
{ {
@@ -172,11 +172,11 @@ public:
} }
bool OnPlayerBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override bool OnPlayerBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override
{ {
if (!sIndividualProgression->enabled || player->IsGameMaster() || sIndividualProgression->isExcludedFromProgression(player)) if (!sIndividualProgression->enabled || player->IsGameMaster() || sIndividualProgression->isExcludedFromProgression(player))
{ {
return true; return true;
} }
if (mapid == MAP_BLACKWING_LAIR && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_MOLTEN_CORE)) if (mapid == MAP_BLACKWING_LAIR && !sIndividualProgression->hasPassedProgression(player, PROGRESSION_MOLTEN_CORE))
{ {
ChatHandler(player->GetSession()).PSendSysMessage("Progression Level Required = |cff00ffff{}|r", PROGRESSION_MOLTEN_CORE); ChatHandler(player->GetSession()).PSendSysMessage("Progression Level Required = |cff00ffff{}|r", PROGRESSION_MOLTEN_CORE);
@@ -194,9 +194,9 @@ public:
} }
} }
if (mapid == MAP_ZUL_GURUB) if (mapid == MAP_ZUL_GURUB)
{ {
ProgressionState REQUIRED_ZG_PROGRESSION = static_cast<ProgressionState>(sIndividualProgression->RequiredZulGurubProgression); ProgressionState REQUIRED_ZG_PROGRESSION = static_cast<ProgressionState>(sIndividualProgression->RequiredZulGurubProgression);
if (!sIndividualProgression->hasPassedProgression(player, REQUIRED_ZG_PROGRESSION)) if (!sIndividualProgression->hasPassedProgression(player, REQUIRED_ZG_PROGRESSION))
{ {
ChatHandler(player->GetSession()).PSendSysMessage("Progression Level Required = |cff00ffff{}|r", REQUIRED_ZG_PROGRESSION); ChatHandler(player->GetSession()).PSendSysMessage("Progression Level Required = |cff00ffff{}|r", REQUIRED_ZG_PROGRESSION);
@@ -271,7 +271,7 @@ public:
{ {
return false; return false;
} }
if (instanceTemplate->Parent == MAP_NORTHREND && mapid == MAP_NAXXRAMAS && player->GetLevel() <= IP_LEVEL_TBC && (!isAttuned(player) || sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) )) if (instanceTemplate->Parent == MAP_NORTHREND && mapid == MAP_NAXXRAMAS && player->GetLevel() <= IP_LEVEL_TBC && (!isAttuned(player) || sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) ))
{ {
return false; return false;
} }
@@ -338,7 +338,7 @@ public:
{ {
return true; return true;
} }
if (sIndividualProgression->enforceGroupRules) // enforceGroupRules enabled if (sIndividualProgression->enforceGroupRules) // enforceGroupRules enabled
{ {
if (!sIndividualProgression->isExcludedFromProgression(player)) // player has a normal account if (!sIndividualProgression->isExcludedFromProgression(player)) // player has a normal account
@@ -453,7 +453,7 @@ public:
if (currentState != otherPlayerState) if (currentState != otherPlayerState)
{ {
sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(otherPlayerState)); sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(otherPlayerState));
} }
return true; return true;
} }
@@ -486,12 +486,12 @@ public:
killer->RemoveAura(IPP_PHASE); killer->RemoveAura(IPP_PHASE);
killer->RemoveAura(IPP_PHASE_II); killer->RemoveAura(IPP_PHASE_II);
killer->RemoveAura(IPP_PHASE_III); killer->RemoveAura(IPP_PHASE_III);
killer->CastSpell(killer, IPP_PHASE, false); killer->CastSpell(killer, IPP_PHASE, false);
killer->CastSpell(killer, IPP_PHASE_II, false); killer->CastSpell(killer, IPP_PHASE_II, false);
killer->CastSpell(killer, IPP_PHASE_III, false); killer->CastSpell(killer, IPP_PHASE_III, false);
break; break;
} }
if (killed->GetCreatureTemplate()->rank > CREATURE_ELITE_NORMAL) if (killed->GetCreatureTemplate()->rank > CREATURE_ELITE_NORMAL)
{ {
sIndividualProgression->checkKillProgression(killer, killed); sIndividualProgression->checkKillProgression(killer, killed);
@@ -684,7 +684,7 @@ public:
{ {
if (!sIndividualProgression->enabled || !attacker) if (!sIndividualProgression->enabled || !attacker)
return; return;
bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER; bool isPet = attacker->GetOwner() && attacker->GetOwner()->GetTypeId() == TYPEID_PLAYER;
if (!isPet && attacker->GetTypeId() != TYPEID_PLAYER) if (!isPet && attacker->GetTypeId() != TYPEID_PLAYER)
{ {