[Feature] Allow pets to zone with permanent (buffdurationformula 50) buffs to maintain them through zone transitions (#2035)

This commit is contained in:
catapultam-habeo 2022-03-06 18:17:25 -08:00 committed by GitHub
parent c4eb1f8439
commit 751db6fffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,7 +598,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
}
}
if (pet_buffs[i].spellid <= (uint32)SPDAT_RECORDS && pet_buffs[i].spellid != 0 && pet_buffs[i].duration > 0) {
if (pet_buffs[i].spellid <= (uint32)SPDAT_RECORDS && pet_buffs[i].spellid != 0 && (pet_buffs[i].duration > 0 || pet_buffs[i].duration == -1)) {
if(pet_buffs[i].level == 0 || pet_buffs[i].level > 100)
pet_buffs[i].level = 1;
buffs[i].spellid = pet_buffs[i].spellid;