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

@@ -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,22 +506,26 @@ public:
void OnPlayerCreatureKill(Player* killer, Creature* killed) override
{
sIndividualProgression->checkKillProgression(killer, killed);
Group* group = killer->GetGroup();
if (!group)
if (killed->GetCreatureTemplate()->rank > CREATURE_ELITE_NORMAL)
{
return;
}
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* member = itr->GetSource();
if (!member)
continue;
sIndividualProgression->checkKillProgression(killer, killed);
Group* group = killer->GetGroup();
if (!group)
{
return;
}
for (GroupReference* itr = group->GetFirstMember(); itr != nullptr; itr = itr->next())
{
Player* member = itr->GetSource();
if (!member)
continue;
if (killer->IsAtLootRewardDistance(member))
sIndividualProgression->checkKillProgression(member, killed);
if (killer->IsAtLootRewardDistance(member))
sIndividualProgression->checkKillProgression(member, killed);
}
}
}