[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
+18 -12
View File
@@ -11034,7 +11034,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
// fix GUI sit button to be unpressed and stop sitting regen
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SetAppearance(eaStanding);
if (mypet->GetPetOrder() == SPO_Sit || mypet->GetPetOrder() == SPO_FeignDeath) {
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
mypet->SetAppearance(eaStanding);
}
zone->AddAggroMob();
// classic acts like qattack
@@ -11081,7 +11084,10 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
// fix GUI sit button to be unpressed and stop sitting regen
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SetAppearance(eaStanding);
if (mypet->GetPetOrder() == SPO_Sit || mypet->GetPetOrder() == SPO_FeignDeath) {
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
mypet->SetAppearance(eaStanding);
}
zone->AddAggroMob();
mypet->AddToHateList(GetTarget(), 1, 0, true, false, false, SPELL_UNKNOWN, true);
@@ -11147,7 +11153,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
// Set Sit button to unpressed - send stand anim/end hpregen
mypet->SetFeigned(false);
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
mypet->SetAppearance(eaStanding);
mypet->SayString(this, Chat::PetResponse, PET_GUARDINGLIFE);
mypet->SetPetOrder(SPO_Guard);
@@ -11172,7 +11178,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
// fix GUI sit button to be unpressed - send stand anim/end hpregen
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
mypet->SetAppearance(eaStanding);
if (mypet->IsPetStop()) {
mypet->SetPetStop(false);
@@ -11220,7 +11226,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
// Set Sit button to unpressed - send stand anim/end hpregen
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
mypet->SetAppearance(eaStanding);
if (mypet->IsPetStop()) {
mypet->SetPetStop(false);
@@ -11237,8 +11243,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
{
mypet->SetFeigned(false);
mypet->SayString(this, Chat::PetResponse, PET_SIT_STRING);
mypet->SetPetOrder(SPO_Follow);
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
mypet->SetAppearance(eaStanding);
}
else
{
@@ -11248,7 +11254,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
mypet->SetRunAnimSpeed(0);
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Sitting);
mypet->SetAppearance(eaSitting);
}
}
break;
@@ -11260,8 +11266,8 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
mypet->SetFeigned(false);
mypet->SayString(this, Chat::PetResponse, PET_SIT_STRING);
SetPetCommandState(PET_BUTTON_SIT, 0);
mypet->SetPetOrder(SPO_Follow);
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Standing);
mypet->SetPetOrder(mypet->GetPreviousPetOrder());
mypet->SetAppearance(eaStanding);
}
break;
}
@@ -11276,7 +11282,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
mypet->SetRunAnimSpeed(0);
if (!mypet->UseBardSpellLogic()) //maybe we can have a bard pet
mypet->InterruptSpell(); //No cast 4 u. //i guess the pet should start casting
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Sitting);
mypet->SetAppearance(eaSitting);
}
break;
}
@@ -11481,7 +11487,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
mypet->SetPetOrder(SPO_FeignDeath);
mypet->SetRunAnimSpeed(0);
mypet->StopNavigation();
mypet->SendAppearancePacket(AppearanceType::Animation, Animation::Lying);
mypet->SetAppearance(eaDead);
mypet->SetFeigned(true);
mypet->SetTarget(nullptr);
if (!mypet->UseBardSpellLogic()) {