[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 authored and GitHub committed 2024-04-15 04:59:36 -05:00
1 parent d6b5a9d343
commit 41c5369c18
5 files changed
+37 -19

No files matched your search

+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);