Vanilla spell resistances, other creature fixes, temporary disable broken Hunter pet leveling change

This commit is contained in:
郑佩茹
2022-06-08 17:44:06 -06:00
parent 43e4491aed
commit 979e229adf
5 changed files with 10002 additions and 13 deletions

View File

@@ -227,15 +227,16 @@ public:
void OnBeforeGuardianInitStatsForLevel(Player* player, Guardian* guardian, CreatureTemplate const* cinfo, PetType& petType) override
{
if (!enabled || !hunterPetLevelFix)
{
return;
}
// We don't want to scale hunter pet to its owners level, but we don't know of the original level, so use the maximum from the creature_template
if (guardian->IsPet() && player->getClass() == CLASS_HUNTER && guardian->getLevel() > cinfo->maxlevel)
{
guardian->SetLevel(cinfo->maxlevel);
}
// Currently bugged - disabled for now
// if (!enabled || !hunterPetLevelFix)
// {
// return;
// }
// // We don't want to scale hunter pet to its owners level, but we don't know of the original level, so use the maximum from the creature_template
// if (guardian->IsPet() && player->getClass() == CLASS_HUNTER && guardian->getLevel() > cinfo->maxlevel)
// {
// guardian->SetLevel(cinfo->maxlevel);
// }
}
bool OnBeforeTeleport(Player* player, uint32 mapid, float x, float y, float z, float /*orientation*/, uint32 /*options*/, Unit* /*target*/) override