mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Add OP_PetCommandState for ghold/hold
This commit is contained in:
@@ -8935,3 +8935,12 @@ void Client::ProcessAggroMeter()
|
||||
}
|
||||
}
|
||||
|
||||
void Client::SetPetCommandState(int button, int state)
|
||||
{
|
||||
auto app = new EQApplicationPacket(OP_PetCommandState, sizeof(PetCommandState_Struct));
|
||||
auto pcs = (PetCommandState_Struct *)app->pBuffer;
|
||||
pcs->button_id = button;
|
||||
pcs->state = state;
|
||||
FastQueuePacket(&app);
|
||||
}
|
||||
|
||||
|
||||
@@ -352,6 +352,8 @@ public:
|
||||
inline InspectMessage_Struct& GetInspectMessage() { return m_inspect_message; }
|
||||
inline const InspectMessage_Struct& GetInspectMessage() const { return m_inspect_message; }
|
||||
|
||||
void SetPetCommandState(int button, int state);
|
||||
|
||||
bool CheckAccess(int16 iDBLevel, int16 iDefaultLevel);
|
||||
|
||||
void CheckQuests(const char* zonename, const char* message, uint32 npc_id, uint32 item_id, Mob* other);
|
||||
|
||||
@@ -10202,6 +10202,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetHeld(true);
|
||||
}
|
||||
mypet->SetGHeld(false);
|
||||
SetPetCommandState(PET_BUTTON_GHOLD, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10210,6 +10211,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->Say_StringID(MT_PetResponse, PET_ON_HOLD);
|
||||
mypet->SetHeld(true);
|
||||
mypet->SetGHeld(false);
|
||||
SetPetCommandState(PET_BUTTON_GHOLD, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10230,6 +10232,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->SetGHeld(true);
|
||||
}
|
||||
mypet->SetHeld(false);
|
||||
SetPetCommandState(PET_BUTTON_HOLD, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -10238,6 +10241,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
mypet->Say_StringID(MT_PetResponse, PET_ON_HOLD);
|
||||
mypet->SetGHeld(true);
|
||||
mypet->SetHeld(false);
|
||||
SetPetCommandState(PET_BUTTON_HOLD, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user