mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-27 08:12:27 +00:00
fix: only dismiss pet summoned by the fading familiar buff
When a Familiar buff fades, BuffFadeBySlot called GetPet() and depopulated whatever pet the player currently had — regardless of whether that pet was the familiar or a combat pet summoned later. Add a spell ID check: only dismiss the pet if its PetSpellID matches the buff's spell ID. If the player replaced the familiar with a different pet, the new pet is unaffected when the old familiar buff expires. Fixes #5026
This commit is contained in:
parent
ba2ca5eada
commit
d413ea4243
@ -4394,9 +4394,9 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
|||||||
case SpellEffect::Familiar:
|
case SpellEffect::Familiar:
|
||||||
{
|
{
|
||||||
Mob *mypet = GetPet();
|
Mob *mypet = GetPet();
|
||||||
if (mypet){
|
if (mypet && mypet->IsNPC() &&
|
||||||
if(mypet->IsNPC())
|
mypet->CastToNPC()->GetPetSpellID() == buffs[slot].spellid) {
|
||||||
mypet->CastToNPC()->Depop();
|
mypet->CastToNPC()->Depop();
|
||||||
SetPetID(0);
|
SetPetID(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user