Loading...   


 common/emu_oplist.h        |  2 ++
 common/eq_packet_structs.h |  9 ++++++---
 zone/client.cpp            | 29 ++++++++++++++++++++++++++++-
 zone/client.h              |  2 ++
 zone/client_packet.cpp     | 44 ++++++++++++++++++++++++++++++++++++++++++++
 zone/client_packet.h       |  6 ++++++
 6 files changed, 88 insertions(+), 4 deletions(-)

diff --git a/common/emu_oplist.h b/common/emu_oplist.h
index c1ceb3c..6b5c6fc 100644
--- a/common/emu_oplist.h
+++ b/common/emu_oplist.h
@@ -481,6 +481,8 @@ N(OP_DzAddPlayer),
 N(OP_DzRemovePlayer),
 N(OP_DzSwapPlayer),
 N(OP_DzMakeLeader),
+N(OP_DzInviteRaid),
+N(OP_DzInviteTask),
 N(OP_DzJoinExpeditionConfirm),
 N(OP_DzJoinExpeditionReply),
 N(OP_DzExpeditionInfo),
diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h
index 1751f4b..906c78c 100644
--- a/common/eq_packet_structs.h
+++ b/common/eq_packet_structs.h
@@ -4600,9 +4600,12 @@ struct BuffIcon_Struct
 
 struct ExpeditionInfo_Struct
 {
-/*000*/ uint32 max_players;
-/*004*/ char expedition_name[128];
-/*132*/ char leader_name[64];
+	/*000*/ uint32 clientid;
+	/*004*/ uint32 unknown004;
+	/*008*/ uint32 unknown008;
+	/*012*/ uint32 max_players;
+	/*016*/ char expedition_name[128];
+	/*142*/ char leader_name[64];
 };
 
 struct ExpeditionJoinPrompt_Struct
diff --git a/zone/client.cpp b/zone/client.cpp
index 8340dde..4248c86 100644
--- a/zone/client.cpp
+++ b/zone/client.cpp
@@ -6118,7 +6118,7 @@ void Client::CheckEmoteHail(Mob *target, const char* message)
 void Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, uint8 count)
 {
 
-	EQApplicationPacket* outapp = new EQApplicationPacket(OP_DzCompass, sizeof(ExpeditionInfo_Struct) + sizeof(ExpeditionCompassEntry_Struct) * count);
+	EQApplicationPacket* outapp = new EQApplicationPacket(OP_DzCompass, sizeof(ExpeditionInfo_Struct)+sizeof(ExpeditionCompassEntry_Struct)* count);
 	ExpeditionCompass_Struct *ecs = (ExpeditionCompass_Struct*)outapp->pBuffer;
 	//ecs->clientid = GetID();
 	ecs->count = count;
@@ -8308,7 +8308,34 @@ void Client::PlayMP3(const char* fname)
 	safe_delete(outapp);
 }
 
+void Client::ExpeditionInfoUpdate()
+{
+	EQApplicationPacket* outapp = new EQApplicationPacket(OP_DzExpeditionInfo, sizeof(ExpeditionInfo_Struct));
+	ExpeditionInfo_Struct *eis = (ExpeditionInfo_Struct*)outapp->pBuffer;
+	
+	strcpy(eis->expedition_name, "Expedition Info Test Entry");
+	strcpy(eis->leader_name, this->GetName());
+	eis->max_players = 54;
+	FastQueuePacket(&outapp);
+	safe_delete(outapp);
+}
+
+void Client::ExpeditionQuit() {
+	
+	EQApplicationPacket* outapp = new EQApplicationPacket(OP_DzExpeditionInfo, sizeof(ExpeditionInfo_Struct));
+	ExpeditionInfo_Struct *eis = (ExpeditionInfo_Struct*)outapp->pBuffer;
+
+	strcpy(eis->expedition_name, "You quit the Expedition");
+	strcpy(eis->leader_name, "Need to find correct quit");
+	// setting this to 0 makes it not show up
+	eis->max_players = 0;
+	FastQueuePacket(&outapp);
+	safe_delete(outapp);
+	
+}
+
 void Client::ExpeditionSay(const char *str, int ExpID) {
+	//In use with custom expedition mod that will be released soon
 	char errbuf[MYSQL_ERRMSG_SIZE];
 	char* query = 0;
 	MYSQL_RES *result;
diff --git a/zone/client.h b/zone/client.h
index 9d6de33..34a72d4 100644
--- a/zone/client.h
+++ b/zone/client.h
@@ -1174,6 +1174,8 @@ public:
 	std::string GetAccountFlag(std::string flag);    float GetDamageMultiplier(SkillUseTypes);
 	void Consume(const Item_Struct *item, uint8 type, int16 slot, bool auto_consume);
 	void PlayMP3(const char* fname);
+	void ExpeditionInfoUpdate();
+	void ExpeditionQuit();
 	void ExpeditionSay(const char *str, int ExpID);
 	int mod_client_damage(int damage, SkillUseTypes skillinuse, int hand, const ItemInst* weapon, Mob* other);
 	bool mod_client_message(char* message, uint8 chan_num);
diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp
index 9d7c9e0..512730f 100644
--- a/zone/client_packet.cpp
+++ b/zone/client_packet.cpp
@@ -390,6 +390,12 @@ void MapOpcodes() {
 	ConnectedOpcodes[OP_OpenInventory] = &Client::Handle_OP_OpenInventory;
 	ConnectedOpcodes[OP_OpenContainer] = &Client::Handle_OP_OpenContainer;
 	ConnectedOpcodes[OP_ClientTimeStamp] = &Client::Handle_OP_ClientTimeStamp;
+	ConnectedOpcodes[OP_DzQuit] = &Client::Handle_OP_DzQuit;
+	ConnectedOpcodes[OP_DzAddPlayer] = &Client::Handle_OP_DzAddPlayer;
+	ConnectedOpcodes[OP_DzRemovePlayer] = &Client::Handle_OP_DzRemovePlayer;
+	ConnectedOpcodes[OP_DzMakeLeader] = &Client::Handle_OP_DzMakeLeader;
+	ConnectedOpcodes[OP_DzInviteRaid] = &Client::Handle_OP_DzInviteRaid;
+	ConnectedOpcodes[OP_DzInviteTask] = &Client::Handle_OP_DzInviteTask;
 }
 
 void ClearMappedOpcode(EmuOpcode op) {
@@ -2973,6 +2979,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
 			SetAppearance(eaCrouching);
 			playeraction = 2;
 			SetFeigned(false);
+			ExpeditionInfoUpdate();
 		}
 		else if (sa->parameter == ANIM_DEATH) { // feign death too
 			SetAppearance(eaDead);
@@ -14063,3 +14070,40 @@ void Client::Handle_OP_OpenContainer(const EQApplicationPacket *app) {
 void Client::Handle_OP_ClientTimeStamp(const EQApplicationPacket *app) {
 	// handle as needed or ignore like we have been doing...
 }
+
+void Client::Handle_OP_DzQuit(const EQApplicationPacket *app) {
+	// packet size: 8
+	// needs a return to quit
+	ExpeditionQuit();
+	this->Message(15, "Client::Handle_OP_DzQuit() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
+
+void Client::Handle_OP_DzAddPlayer(const EQApplicationPacket *app) {
+	// packet size: 72
+	
+	this->Message(15, "Client::Handle_OP_DzAddPlayer() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
+
+void Client::Handle_OP_DzRemovePlayer(const EQApplicationPacket *app) {
+	// packet size: ? - grayed out
+
+	this->Message(15, "Client::Handle_OP_DzRemovePlayer() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
+
+void Client::Handle_OP_DzMakeLeader(const EQApplicationPacket *app) {
+	// packet size: ? - grayed out
+
+	this->Message(15, "Client::Handle_OP_DzMakeLeader() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
+
+void Client::Handle_OP_DzInviteRaid(const EQApplicationPacket *app) {
+	// packet size: ? - untested
+
+	this->Message(15, "Client::Handle_OP_DzInviteRaid() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
+
+void Client::Handle_OP_DzInviteTask(const EQApplicationPacket *app) {
+	// packet size: ? - untested
+
+	this->Message(15, "Client::Handle_OP_DzInviteTask() - Client version: %i, packet size: %i", this->ClientVersion, app->size);
+}
diff --git a/zone/client_packet.h b/zone/client_packet.h
index 424a8f7..3cca2a6 100644
--- a/zone/client_packet.h
+++ b/zone/client_packet.h
@@ -290,3 +290,9 @@
 	void Handle_OP_OpenInventory(const EQApplicationPacket *app);
 	void Handle_OP_OpenContainer(const EQApplicationPacket *app);
 	void Handle_OP_ClientTimeStamp(const EQApplicationPacket *app);
+	void Handle_OP_DzQuit(const EQApplicationPacket *app);
+	void Handle_OP_DzAddPlayer(const EQApplicationPacket *app);
+	void Handle_OP_DzRemovePlayer(const EQApplicationPacket *app);
+	void Handle_OP_DzMakeLeader(const EQApplicationPacket *app);
+	void Handle_OP_DzInviteRaid(const EQApplicationPacket *app);
+	void Handle_OP_DzInviteTask(const EQApplicationPacket *app);

Raw Paste Data