[Pets] Fix errors in sync with client of sit/stand (#4245)

* [Pets] Fix errors in sync with client of sit/stand

* Forgot bot.h
This commit is contained in:
Paul Coene
2024-04-15 05:59:36 -04:00
committed by GitHub
parent d6b5a9d343
commit 41c5369c18
5 changed files with 37 additions and 19 deletions
+11
View File
@@ -442,6 +442,7 @@ Mob::Mob(
weaponstance.aabonus_buff_spell_id = 0;
pStandingPetOrder = SPO_Follow;
m_previous_pet_order = SPO_Follow;
pseudo_rooted = false;
nobuff_invisible = 0;
@@ -635,6 +636,16 @@ void Mob::CalcInvisibleLevel()
BreakCharmPetIfConditionsMet();
}
void Mob::SetPetOrder(eStandingPetOrder i) {
if (i == SPO_Sit || i == SPO_FeignDeath) {
if (pStandingPetOrder == SPO_Follow || pStandingPetOrder == SPO_Guard) {
m_previous_pet_order = pStandingPetOrder;
}
}
pStandingPetOrder = i;
}
void Mob::SetInvisible(uint8 state, bool set_on_bonus_calc) {
if (state == Invisibility::Visible) {
SendAppearancePacket(AppearanceType::Invisibility, Invisibility::Visible);