Now also checking achievements for progression kills (#587)

- now checking achievements as well for progression updates
- no longer checking progression after every creature kill. now only after boss kills.
This commit is contained in:
Grimfeather
2025-07-29 05:54:58 +02:00
committed by GitHub
parent 17714b461e
commit 07a79aaa23
3 changed files with 172 additions and 73 deletions

View File

@@ -208,6 +208,80 @@ bool IndividualProgression::hasCustomProgressionValue(uint32 creatureEntry)
}
void IndividualProgression::checkIPProgression(Player* killer)
{
if (!enabled || disableDefaultProgression)
{
return;
}
if (killer->HasAchieved(HALION_KILL)) // 4815
{
UpdateProgressionState(killer, PROGRESSION_WOTLK_TIER_5);
return;
}
else if (killer->HasAchieved(LICH_KING_KILL)) // 4597
{
UpdateProgressionState(killer, PROGRESSION_WOTLK_TIER_4);
return;
}
else if (killer->HasAchieved(ANUB_ARAK_KILL)) // 3916
{
UpdateProgressionState(killer, PROGRESSION_WOTLK_TIER_3);
return;
}
else if (killer->HasAchieved(KEL_THUZAD_KILL)) // 575
{
UpdateProgressionState(killer, PROGRESSION_WOTLK_TIER_1);
return;
}
else if (killer->HasAchieved(KIL_JAEDEN_KILL)) // 698
{
UpdateProgressionState(killer, PROGRESSION_TBC_TIER_5);
return;
}
else if (killer->HasAchieved(ZUL_JIN_KILL)) // 691
{
UpdateProgressionState(killer, PROGRESSION_TBC_TIER_4);
return;
}
else if (killer->HasAchieved(ILLIDAN_KILL)) // 697
{
UpdateProgressionState(killer, PROGRESSION_TBC_TIER_3);
return;
}
else if (killer->HasAchieved(KAEL_THAS_KILL)) // 696
{
UpdateProgressionState(killer, PROGRESSION_TBC_TIER_2);
return;
}
else if (killer->HasAchieved(MALCHEZAAR_KILL)) // 690
{
UpdateProgressionState(killer, PROGRESSION_TBC_TIER_1);
return;
}
else if (killer->HasAchieved(C_THUN_KILL)) // 687
{
UpdateProgressionState(killer, PROGRESSION_AQ);
return;
}
else if (killer->HasAchieved(NEFARIAN_KILL)) // 685
{
UpdateProgressionState(killer, PROGRESSION_BLACKWING_LAIR);
return;
}
else if (killer->HasAchieved(ONYXIAS_KILL)) // 684
{
UpdateProgressionState(killer, PROGRESSION_ONYXIA);
return;
}
else if (killer->HasAchieved(RAGNAROS_KILL)) // 686
{
UpdateProgressionState(killer, PROGRESSION_MOLTEN_CORE);
return;
}
}
void IndividualProgression::checkKillProgression(Player* killer, Creature* killed)
{
if (!enabled)
@@ -225,6 +299,7 @@ void IndividualProgression::checkKillProgression(Player* killer, Creature* kille
{
return;
}
switch (killed->GetEntry())
{
case RAGNAROS:

View File

@@ -92,6 +92,23 @@ enum ProgressionQuests
PROGRESSION_FLAG_WOTLK_T5 = 66018
};
enum ProgressionAchievements
{
KEL_THUZAD_KILL = 575, // WotLK, naxx40 does not have an achievement
ONYXIAS_KILL = 684,
NEFARIAN_KILL = 685,
RAGNAROS_KILL = 686,
C_THUN_KILL = 687,
MALCHEZAAR_KILL = 690,
ZUL_JIN_KILL = 691,
KAEL_THAS_KILL = 696,
ILLIDAN_KILL = 697,
KIL_JAEDEN_KILL = 698,
ANUB_ARAK_KILL = 3916,
LICH_KING_KILL = 4597,
HALION_KILL = 4815
};
enum ProgressionZones
{
ZONE_AZUREMYST = 3524,
@@ -242,6 +259,7 @@ public:
void AdjustTBCStats(Player* player) const;
void AdjustWotLKStats(Player* player) const;
bool hasCustomProgressionValue(uint32 creatureEntry);
void checkIPProgression(Player* player);
void checkKillProgression(Player* player, Creature* killed);
static void LoadCustomProgressionEntries(const std::string& customProgressionString);
static void AdjustStats(Player* player, float computedAdjustment, float computedHealingAdjustment);

View File

@@ -32,7 +32,9 @@ public:
{
sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(sIndividualProgression->startingProgression));
}
sIndividualProgression->CheckAdjustments(player);
sIndividualProgression->checkIPProgression(player);
if ((sIndividualProgression->hasPassedProgression(player, PROGRESSION_MOLTEN_CORE)) && (player->GetQuestStatus(PROGRESSION_FLAG_MC) != QUEST_STATUS_REWARDED))
{
@@ -504,7 +506,10 @@ public:
void OnPlayerCreatureKill(Player* killer, Creature* killed) override
{
if (killed->GetCreatureTemplate()->rank > CREATURE_ELITE_NORMAL)
{
sIndividualProgression->checkKillProgression(killer, killed);
Group* group = killer->GetGroup();
@@ -522,6 +527,7 @@ public:
sIndividualProgression->checkKillProgression(member, killed);
}
}
}
bool OnPlayerUpdateFishingSkill(Player* player, int32 /*skill*/, int32 /*zone_skill*/, int32 chance, int32 roll) override
{