[Bug Fix] Ensure synchronization of pet taunt state with UI (#3025)

* fix to desync between pet taunt state and button

* Update npc.h

* Update npc.cpp

* Update npc.h

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
catapultam-habeo 2023-03-04 10:40:29 -06:00 committed by GitHub
parent 5d7a7bb4b2
commit 2cc61ef8c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -3963,3 +3963,11 @@ void NPC::HandleRoambox()
return; return;
} }
void NPC::SetTaunting(bool is_taunting) {
taunting = is_taunting;
if (IsPet() && IsPetOwnerClient()) {
GetOwner()->CastToClient()->SetPetCommandState(PET_BUTTON_TAUNT, is_taunting);
}
}

View File

@ -310,7 +310,7 @@ public:
uint16 GetPetSpellID() const {return pet_spell_id;} uint16 GetPetSpellID() const {return pet_spell_id;}
void SetPetSpellID(uint16 amt) {pet_spell_id = amt;} void SetPetSpellID(uint16 amt) {pet_spell_id = amt;}
uint32 GetMaxDamage(uint8 tlevel); uint32 GetMaxDamage(uint8 tlevel);
void SetTaunting(bool tog) {taunting = tog;} void SetTaunting(bool is_taunting);
bool IsTaunting() const { return taunting; } bool IsTaunting() const { return taunting; }
void PickPocket(Client* thief); void PickPocket(Client* thief);
void Disarm(Client* client, int chance); void Disarm(Client* client, int chance);