diff --git a/zone/client.cpp b/zone/client.cpp index 3b2b5fd23..cf3814a7d 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -54,6 +54,7 @@ extern volatile bool RunLoops; #include "guild_mgr.h" #include "quest_parser_collection.h" #include "queryserv.h" +#include "pets.h" extern QueryServ* QServ; extern EntityList entity_list; @@ -5713,6 +5714,20 @@ void Client::SuspendMinion() Message_StringID(clientMessageTell, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName()); memset(&m_suspendedminion, 0, sizeof(struct PetInfo)); + // TODO: These pet command states need to be synced ... + // Will just fix them for now + if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater) { + SetPetCommandState(PET_BUTTON_SIT, 0); + SetPetCommandState(PET_BUTTON_STOP, 0); + SetPetCommandState(PET_BUTTON_REGROUP, 0); + SetPetCommandState(PET_BUTTON_FOLLOW, 1); + SetPetCommandState(PET_BUTTON_GUARD, 0); + SetPetCommandState(PET_BUTTON_TAUNT, 1); + SetPetCommandState(PET_BUTTON_HOLD, 0); + SetPetCommandState(PET_BUTTON_GHOLD, 0); + SetPetCommandState(PET_BUTTON_FOCUS, 0); + SetPetCommandState(PET_BUTTON_SPELLHOLD, 0); + } } else return; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index b8661e79e..499402997 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -858,6 +858,21 @@ void Client::CompleteConnect() CastToClient()->FastQueuePacket(&outapp); } + // TODO: load these states + // We at least will set them to the correct state for now + if (m_ClientVersionBit & EQEmu::versions::bit_UFAndLater && GetPet()) { + SetPetCommandState(PET_BUTTON_SIT, 0); + SetPetCommandState(PET_BUTTON_STOP, 0); + SetPetCommandState(PET_BUTTON_REGROUP, 0); + SetPetCommandState(PET_BUTTON_FOLLOW, 1); + SetPetCommandState(PET_BUTTON_GUARD, 0); + SetPetCommandState(PET_BUTTON_TAUNT, 1); + SetPetCommandState(PET_BUTTON_HOLD, 0); + SetPetCommandState(PET_BUTTON_GHOLD, 0); + SetPetCommandState(PET_BUTTON_FOCUS, 0); + SetPetCommandState(PET_BUTTON_SPELLHOLD, 0); + } + entity_list.RefreshClientXTargets(this); worldserver.RequestTellQueue(GetName()); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index af96a7e2e..ceffc1ef3 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -30,6 +30,7 @@ #include "quest_parser_collection.h" #include "string_ids.h" #include "worldserver.h" +#include "pets.h" #include @@ -1240,6 +1241,23 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove else { MakePet(spell_id, spell.teleport_zone); + // TODO: we need to sync the states for these clients ... + // Will fix buttons for now + if (IsClient()) { + auto c = CastToClient(); + if (c->ClientVersionBit() & EQEmu::versions::bit_UFAndLater) { + c->SetPetCommandState(PET_BUTTON_SIT, 0); + c->SetPetCommandState(PET_BUTTON_STOP, 0); + c->SetPetCommandState(PET_BUTTON_REGROUP, 0); + c->SetPetCommandState(PET_BUTTON_FOLLOW, 1); + c->SetPetCommandState(PET_BUTTON_GUARD, 0); + c->SetPetCommandState(PET_BUTTON_TAUNT, 1); + c->SetPetCommandState(PET_BUTTON_HOLD, 0); + c->SetPetCommandState(PET_BUTTON_GHOLD, 0); + c->SetPetCommandState(PET_BUTTON_FOCUS, 0); + c->SetPetCommandState(PET_BUTTON_SPELLHOLD, 0); + } + } } break; }