diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index fd2a746..783cee7 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -130,7 +130,7 @@ public: } } - void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 /*xpSource*/) override + void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/, uint8 xpSource) override { if (!sIndividualProgression->enabled) { @@ -139,11 +139,19 @@ public: // Player is still in Vanilla content - do not give XP past level 60 if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_NAXX40) && player->getLevel() >= 60) { + // Still award XP to pets - they won't be able to pass the player's level + Pet* pet = player->GetPet(); + if (pet && xpSource == XPSOURCE_KILL) + pet->GivePetXP(player->GetGroup() ? amount / 2 : amount); amount = 0; } // Player is in TBC content - do not give XP past level 70 else if (!sIndividualProgression->hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->getLevel() >= 70) { + // Still award XP to pets - they won't be able to pass the player's level + Pet* pet = player->GetPet(); + if (pet && xpSource == XPSOURCE_KILL) + pet->GivePetXP(player->GetGroup() ? amount / 2 : amount); amount = 0; } }