Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2023-08-24 22:07:53 +08:00
96 changed files with 3271 additions and 2541 deletions

View File

@@ -530,7 +530,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
pet->SendPetAIReaction(guid1);
}
pet->ToPet()->CastWhenWillAvailable(spellId, unit_target, nullptr, tempspellIsPositive);
pet->ToPet()->CastWhenWillAvailable(spellId, unit_target, ObjectGuid::Empty, tempspellIsPositive);
}
}
else if (haspositiveeffect)
@@ -566,7 +566,11 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
pet->SendPetAIReaction(guid1);
}
pet->ToPet()->CastWhenWillAvailable(spellId, unit_target, victim, tmpSpellIsPositive);
ObjectGuid oldTarget = ObjectGuid::Empty;
if (victim)
oldTarget = victim->GetGUID();
pet->ToPet()->CastWhenWillAvailable(spellId, unit_target, oldTarget, tmpSpellIsPositive);
}
}
}