Add OP_PetCommandState for ghold/hold

This commit is contained in:
Michael Cook (mackal)
2017-05-04 00:27:42 -04:00
parent b3d8bcab4a
commit 9229ca4f79
5 changed files with 21 additions and 0 deletions
+9
View File
@@ -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);
}
+2
View File
@@ -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);
+4
View File
@@ -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;
}