Update opcodes and packet structs for expeditions

Add and rename some opcodes

Add packet translations for expeditions

Fix OP_DzExpeditionEndsWarning opcode for RoF2

Add RoF2 OP_KickPlayers
This commit is contained in:
hg
2020-02-21 19:35:54 -05:00
parent 51a74c23ef
commit a77f8b582e
28 changed files with 2132 additions and 663 deletions
+8 -5
View File
@@ -136,20 +136,22 @@ N(OP_Dye),
N(OP_DynamicWall),
N(OP_DzAddPlayer),
N(OP_DzChooseZone),
N(OP_DzChooseZoneReply),
N(OP_DzCompass),
N(OP_DzExpeditionEndsWarning),
N(OP_DzExpeditionInfo),
N(OP_DzExpeditionList),
N(OP_DzJoinExpeditionConfirm),
N(OP_DzJoinExpeditionReply),
N(OP_DzLeaderStatus),
N(OP_DzExpeditionInvite),
N(OP_DzExpeditionInviteResponse),
N(OP_DzExpeditionLockoutTimers),
N(OP_DzListTimers),
N(OP_DzMakeLeader),
N(OP_DzMemberList),
N(OP_DzMemberStatus),
N(OP_DzMemberListName),
N(OP_DzMemberListStatus),
N(OP_DzPlayerList),
N(OP_DzQuit),
N(OP_DzRemovePlayer),
N(OP_DzSetLeaderName),
N(OP_DzSwapPlayer),
N(OP_Emote),
N(OP_EndLootRequest),
@@ -271,6 +273,7 @@ N(OP_ItemVerifyRequest),
N(OP_ItemViewUnknown),
N(OP_Jump),
N(OP_KeyRing),
N(OP_KickPlayers),
N(OP_KnowledgeBase),
N(OP_LDoNButton),
N(OP_LDoNDisarmTraps),
+132 -32
View File
@@ -4835,17 +4835,98 @@ struct BuffIcon_Struct
BuffIconEntry_Struct entries[0];
};
struct ExpeditionInfo_Struct
struct ExpeditionInvite_Struct
{
/*000*/ uint32 max_players;
/*004*/ char expedition_name[128];
/*132*/ char leader_name[64];
/*000*/ uint32 client_id; // unique character id
/*004*/ uint32 unknown004; // added after titanium
/*008*/ char inviter_name[64];
/*072*/ char expedition_name[128];
/*200*/ uint8 swapping; // 0: adding 1: swapping
/*201*/ char swap_name[64]; // if swapping, swap name being removed
/*265*/ uint8 padding[3];
/*268*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*270*/ uint16 dz_instance_id;
};
struct ExpeditionJoinPrompt_Struct
struct ExpeditionInviteResponse_Struct
{
/*000*/ char player_name[64];
/*064*/ char expedition_name[64];
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004; // added after titanium
/*008*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*010*/ uint16 dz_instance_id;
/*012*/ uint8 accepted; // 0: declined 1: accepted
/*013*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*014*/ char swap_name[64]; // swap name sent in invite
/*078*/ uint8 unknown078; // padding garbage?
/*079*/ uint8 unknown079; // padding garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004; // added after titanium
/*008*/ uint32 assigned; // padded bool, 0: not in expedition (clear data), 1: in expedition
/*012*/ uint32 max_players;
/*016*/ char expedition_name[128];
/*144*/ char leader_name[64];
};
struct ExpeditionMemberEntry_Struct
{
/*000*/ char name[64]; // variable length, null terminated, max 0x40 (64)
/*064*/ uint8 status; // 0: unknown, 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*012*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[128]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[256]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char add_player_name[64]; // swap to (player must confirm)
/*072*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
@@ -4853,48 +4934,67 @@ struct ExpeditionExpireWarning
/*008*/ uint32 minutes_remaining;
};
struct ExpeditionCompassEntry_Struct
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint32 enabled; //guess
/*004*/ float y;
/*008*/ float x;
/*012*/ float z;
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 client_id;
/*000*/ uint32 count;
/*004*/ ExpeditionCompassEntry_Struct entries[0];
/*004*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct ExpeditionMemberEntry_Struct
struct DynamicZoneChooseZoneEntry_Struct
{
char name[64];
char status;
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // seen 28 00 00 00 (40), sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[128]; // variable length, null terminated
/*144*/ char leader_name[64]; // variable length, null terminated
};
struct ExpeditionMemberList_Struct
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 count;
/*004*/ ExpeditionMemberEntry_Struct entries[0];
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct ExpeditionLockoutEntry_Struct
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 time_left;
/*004*/ char expedition[128];
/*132*/ char expedition_event[128];
/*000*/ uint32 unknown000; // ff ff ff ff
/*004*/ uint32 unknown004; // seen 69 00 00 00
/*008*/ uint32 unknown008; // ff ff ff ff
/*012*/ uint32 unknown_id1; // from choose zone entry message
/*016*/ uint16 dz_zone_id; // dz_id pair
/*018*/ uint16 dz_instance_id;
/*020*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*024*/ uint32 unknown_id2; // from choose zone entry message
/*028*/ uint32 unknown028; // 00 00 00 00
/*032*/ uint32 unknown032; // always same as unknown044
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040;
/*044*/ uint32 unknown044; // always same as unknown032
/*048*/ uint32 unknown048; // seen 01 00 00 00 and 02 00 00 00
};
struct ExpeditionLockoutList_Struct
struct KickPlayers_Struct
{
/*000*/ uint32 count;
/*004*/ ExpeditionLockoutEntry_Struct entries[0];
};
struct ExpeditionLeaderSet_Struct
{
/*000*/ char leader_name[64];
/*000*/ char char_name[64];
/*064*/ uint32 unknown064; // always 0
/*068*/ uint8 kick_expedition; // true if /kickplayers exp
/*069*/ uint8 kick_task; // true if /kickplayers task
/*070*/ uint8 padding[2];
};
struct CorpseDrag_Struct
+177 -70
View File
@@ -710,15 +710,48 @@ namespace RoF
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -742,81 +775,60 @@ namespace RoF
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->unknown004 = 785316192;
eq->unknown008 = 435601;
strncpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strncpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strncpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strncpy(eq->player_name, emu->player_name, sizeof(eq->player_name));
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -825,26 +837,43 @@ namespace RoF
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -4388,6 +4417,84 @@ namespace RoF
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
IN(unknown000);
IN(unknown004);
IN(unknown008);
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
IN(unknown028);
IN(unknown032);
IN(unknown036);
IN(unknown040);
IN(unknown044);
IN(unknown048);
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+177 -70
View File
@@ -759,15 +759,48 @@ namespace RoF2
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -791,81 +824,60 @@ namespace RoF2
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->unknown004 = 785316192;
eq->unknown008 = 435601;
strncpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strncpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strncpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strncpy(eq->player_name, emu->player_name, sizeof(eq->player_name));
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -874,26 +886,43 @@ namespace RoF2
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -4585,6 +4614,84 @@ namespace RoF2
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
IN(unknown000);
IN(unknown004);
IN(unknown008);
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
IN(unknown028);
IN(unknown032);
IN(unknown036);
IN(unknown040);
IN(unknown044);
IN(unknown048);
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+12 -3
View File
@@ -58,13 +58,16 @@ E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DisciplineUpdate)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_ExpansionInfo)
E(OP_FormattedMessage)
@@ -159,6 +162,12 @@ D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_EnvDamage)
D(OP_FaceChange)
+144 -27
View File
@@ -4882,52 +4882,169 @@ struct VeteranClaim
/*076*/ uint32 action;
};
struct ExpeditionEntryHeader_Struct
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id; // unique character id
/*004*/ uint32 unknown004;
/*008*/ char inviter_name[64];
/*072*/ char expedition_name[128];
/*200*/ uint8 swapping; // 0: adding 1: swapping
/*201*/ char swap_name[64]; // if swapping, swap name being removed
/*265*/ uint8 padding[3];
/*268*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*270*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*000*/ uint32 number_of_entries;
};
struct ExpeditionJoinPrompt_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ char player_name[64];
/*072*/ char expedition_name[64];
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
/*008*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*010*/ uint16 dz_instance_id;
/*012*/ uint8 accepted; // 0: declined 1: accepted
/*013*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*014*/ char swap_name[64]; // swap name sent in invite
/*078*/ uint8 unknown078; // padding garbage?
/*079*/ uint8 unknown079; // padding garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown008;
/*008*/ uint32 assigned; // padded bool, 0: not in expedition (clear data), 1: in expedition
/*012*/ uint32 max_players;
/*016*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*016*/ char expedition_name[128];
/*144*/ char leader_name[64];
//*208*/ uint32 unknown208; // live sends 01 00 00 00 here but client doesn't read it
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count; // number of players in window
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*012*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char add_player_name[64]; // swap to (player must confirm)
/*072*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // seen 28 00 00 00 (40), sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000; // ff ff ff ff
/*004*/ uint32 unknown004; // seen 69 00 00 00
/*008*/ uint32 unknown008; // ff ff ff ff
/*012*/ uint32 unknown_id1; // from choose zone entry message
/*016*/ uint16 dz_zone_id; // dz_id pair
/*018*/ uint16 dz_instance_id;
/*020*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*024*/ uint32 unknown_id2; // from choose zone entry message
/*028*/ uint32 unknown028; // 00 00 00 00
/*032*/ uint32 unknown032; // always same as unknown044
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040;
/*044*/ uint32 unknown044; // always same as unknown032
/*048*/ uint32 unknown048; // seen 01 00 00 00 and 02 00 00 00
};
struct KickPlayers_Struct
{
/*000*/ char char_name[64];
/*064*/ uint32 unknown064; // always 0
/*068*/ uint8 kick_expedition; // true if /kickplayers exp
/*069*/ uint8 kick_task; // true if /kickplayers task
/*070*/ uint8 padding[2];
};
struct MaxCharacters_Struct
+12 -3
View File
@@ -44,13 +44,16 @@ E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DisciplineUpdate)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_ExpansionInfo)
E(OP_FormattedMessage)
@@ -145,6 +148,12 @@ D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_EnvDamage)
D(OP_FaceChange)
+134 -27
View File
@@ -4815,52 +4815,159 @@ struct VeteranClaim
/*076*/ uint32 action;
};
struct ExpeditionEntryHeader_Struct
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id; // unique character id
/*004*/ uint32 unknown004;
/*008*/ char inviter_name[64];
/*072*/ char expedition_name[128];
/*200*/ uint8 swapping; // 0: adding 1: swapping
/*201*/ char swap_name[64]; // if swapping, swap name being removed
/*265*/ uint8 padding[3];
/*268*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*270*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*000*/ uint32 number_of_entries;
};
struct ExpeditionJoinPrompt_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ char player_name[64];
/*072*/ char expedition_name[64];
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
/*008*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*010*/ uint16 dz_instance_id;
/*012*/ uint8 accepted; // 0: declined 1: accepted
/*013*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*014*/ char swap_name[64]; // swap name sent in invite
/*078*/ uint8 unknown078; // padding garbage?
/*079*/ uint8 unknown079; // padding garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown008;
/*008*/ uint32 assigned; // padded bool
/*012*/ uint32 max_players;
/*016*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*016*/ char expedition_name[128];
/*144*/ char leader_name[64];
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count; // number of players in window
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*012*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char add_player_name[64]; // swap to (player must confirm)
/*072*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000; // ff ff ff ff
/*004*/ uint32 unknown004; // seen 69 00 00 00
/*008*/ uint32 unknown008; // ff ff ff ff
/*012*/ uint32 unknown_id1; // from choose zone entry message
/*016*/ uint16 dz_zone_id; // dz_id pair
/*018*/ uint16 dz_instance_id;
/*020*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*024*/ uint32 unknown_id2; // from choose zone entry message
/*028*/ uint32 unknown028; // 00 00 00 00
/*032*/ uint32 unknown032; // always same as unknown044
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040;
/*044*/ uint32 unknown044; // always same as unknown032
/*048*/ uint32 unknown048; // seen 01 00 00 00 and 02 00 00 00
};
struct MaxCharacters_Struct
+178 -70
View File
@@ -483,15 +483,48 @@ namespace SoD
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -515,81 +548,60 @@ namespace SoD
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->unknown004 = 785316192;
eq->unknown008 = 435601;
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->leader_name, emu->leader_name);
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->player_name, emu->player_name);
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -598,26 +610,44 @@ namespace SoD
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -2974,6 +3004,84 @@ namespace SoD
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
IN(unknown000);
IN(unknown004);
IN(unknown008);
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
IN(unknown028);
IN(unknown032);
IN(unknown036);
IN(unknown040);
IN(unknown044);
IN(unknown048);
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+12 -3
View File
@@ -35,13 +35,16 @@ E(OP_Consider)
E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_ExpansionInfo)
E(OP_FormattedMessage)
@@ -111,6 +114,12 @@ D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_FaceChange)
D(OP_FindPersonRequest)
+135 -27
View File
@@ -4169,52 +4169,160 @@ struct VeteranReward
/*012*/ VeteranRewardItem items[8];
};
struct ExpeditionEntryHeader_Struct
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id; // unique character id
/*004*/ uint32 unknown004;
/*008*/ char inviter_name[64];
/*072*/ char expedition_name[128];
/*200*/ uint8 swapping; // 0: adding 1: swapping
/*201*/ char swap_name[64]; // if swapping, swap name being removed
/*265*/ uint8 padding[3];
/*268*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*270*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*000*/ uint32 number_of_entries;
};
struct ExpeditionJoinPrompt_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ char player_name[64];
/*072*/ char expedition_name[64];
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
/*008*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*010*/ uint16 dz_instance_id;
/*012*/ uint8 accepted; // 0: declined 1: accepted
/*013*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*014*/ char swap_name[64]; // swap name sent in invite
/*078*/ uint8 unknown078; // padding garbage?
/*079*/ uint8 unknown079; // padding garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown008;
/*008*/ uint32 assigned; // padded bool
/*012*/ uint32 max_players;
/*016*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*016*/ char expedition_name[128];
/*144*/ char leader_name[64];
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count; // number of players in window
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*012*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char add_player_name[64]; // swap to (player must confirm)
/*072*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000; // ff ff ff ff
/*004*/ uint32 unknown004; // seen 69 00 00 00
/*008*/ uint32 unknown008; // ff ff ff ff
/*012*/ uint32 unknown_id1; // from choose zone entry message
/*016*/ uint16 dz_zone_id; // dz_id pair
/*018*/ uint16 dz_instance_id;
/*020*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*024*/ uint32 unknown_id2; // from choose zone entry message
/*028*/ uint32 unknown028; // 00 00 00 00
/*032*/ uint32 unknown032; // always same as unknown044
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040;
/*044*/ uint32 unknown044; // always same as unknown032
/*048*/ uint32 unknown048; // seen 01 00 00 00 and 02 00 00 00
};
struct AltCurrencySelectItem_Struct {
+178 -70
View File
@@ -471,14 +471,48 @@ namespace SoF
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -502,80 +536,60 @@ namespace SoF
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->enabled_max = 1;
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->leader_name, emu->leader_name);
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
for (int i = 0; i < emu->count; ++i)
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->player_name, emu->player_name);
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
//ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -584,26 +598,43 @@ namespace SoF
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -2435,6 +2466,83 @@ namespace SoF
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
emu->unknown000 = eq->unknown000;
emu->unknown008 = eq->unknown004;
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
emu->unknown028 = eq->unknown024;
emu->unknown032 = eq->unknown028;
emu->unknown036 = eq->unknown032;
emu->unknown040 = eq->unknown036;
emu->unknown044 = eq->unknown040;
emu->unknown048 = eq->unknown044;
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+12 -3
View File
@@ -36,13 +36,16 @@ E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_ExpansionInfo)
E(OP_FormattedMessage)
@@ -103,6 +106,12 @@ D(OP_Consider)
D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_FaceChange)
D(OP_FindPersonRequest)
+124 -17
View File
@@ -4088,43 +4088,150 @@ struct VeteranReward
/*012*/ VeteranRewardItem items[8];
};
struct ExpeditionExpireWarning
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id;
/*004*/ char inviter_name[64];
/*068*/ char expedition_name[128];
/*196*/ uint8 swapping; // 0: adding 1: swapping
/*197*/ char swap_name[64]; // if swapping, swap name being removed
/*261*/ uint8 padding[3];
/*264*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*268*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 minutes_remaining;
/*004*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*006*/ uint16 dz_instance_id;
/*008*/ uint8 accepted; // 0: declined 1: accepted
/*009*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*010*/ char swap_name[64]; // swap name sent in invite
/*074*/ uint8 unknown078; // padding/garbage?
/*075*/ uint8 unknown079; // padding/garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 enabled_max;
/*000*/ uint32 client_id;
/*004*/ uint32 assigned; // padded bool
/*008*/ uint32 max_players;
/*012*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*012*/ char expedition_name[128];
/*140*/ char leader_name[64];
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*008*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ char add_player_name[64]; // swap to (player must confirm)
/*068*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct ExpeditionJoinPrompt_Struct
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint32 clientid;
/*004*/ char player_name[64];
/*068*/ char expedition_name[64];
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown_id1;
/*012*/ uint16 dz_zone_id;
/*014*/ uint16 dz_instance_id;
/*016*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*020*/ uint32 unknown_id2;
/*024*/ uint32 unknown024;
/*028*/ uint32 unknown028; // always same as unknown040
/*032*/ uint32 unknown032;
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040; // always same as unknown028
/*044*/ uint32 unknown044;
};
struct AltCurrencySelectItem_Struct {
+176 -69
View File
@@ -414,15 +414,48 @@ namespace Titanium
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -446,80 +479,60 @@ namespace Titanium
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->enabled_max = 1;
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->leader_name, emu->leader_name);
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->player_name, emu->player_name);
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
//ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -528,26 +541,43 @@ namespace Titanium
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -1943,6 +1973,83 @@ namespace Titanium
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
emu->unknown000 = eq->unknown000;
emu->unknown008 = eq->unknown004;
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
emu->unknown028 = eq->unknown024;
emu->unknown032 = eq->unknown028;
emu->unknown036 = eq->unknown032;
emu->unknown040 = eq->unknown036;
emu->unknown044 = eq->unknown040;
emu->unknown048 = eq->unknown044;
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+12 -3
View File
@@ -32,13 +32,16 @@ E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DeleteSpawn)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_FormattedMessage)
E(OP_GroundSpawn)
@@ -86,6 +89,12 @@ D(OP_CharacterCreate)
D(OP_ClientUpdate)
D(OP_Consume)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_FaceChange)
D(OP_InspectAnswer)
+124 -17
View File
@@ -3299,43 +3299,150 @@ struct VeteranReward
/*004*/ VeteranRewardItem item;
};
struct ExpeditionExpireWarning
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id;
/*004*/ char inviter_name[64];
/*068*/ char expedition_name[128];
/*196*/ uint8 swapping; // 0: adding 1: swapping
/*197*/ char swap_name[64]; // if swapping, swap name being removed
/*261*/ uint8 padding[3];
/*264*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*268*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 minutes_remaining;
/*004*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*006*/ uint16 dz_instance_id;
/*008*/ uint8 accepted; // 0: declined 1: accepted
/*009*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*010*/ char swap_name[64]; // swap name sent in invite
/*074*/ uint8 unknown078; // padding/garbage?
/*075*/ uint8 unknown079; // padding/garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 enabled_max;
/*000*/ uint32 client_id;
/*004*/ uint32 assigned; // padded bool
/*008*/ uint32 max_players;
/*012*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*012*/ char expedition_name[128];
/*140*/ char leader_name[64];
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*008*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ char add_player_name[64]; // swap to (player must confirm)
/*068*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct ExpeditionJoinPrompt_Struct
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint32 clientid;
/*004*/ char player_name[64];
/*068*/ char expedition_name[64];
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown_id1;
/*012*/ uint16 dz_zone_id;
/*014*/ uint16 dz_instance_id;
/*016*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*020*/ uint32 unknown_id2;
/*024*/ uint32 unknown024;
/*028*/ uint32 unknown028; // always same as unknown040
/*032*/ uint32 unknown032;
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040; // always same as unknown028
/*044*/ uint32 unknown044;
};
struct LFGuild_SearchPlayer_Struct
+178 -70
View File
@@ -613,14 +613,48 @@ namespace UF
FINISH_ENCODE();
}
ENCODE(OP_DzChooseZone)
{
SETUP_VAR_ENCODE(DynamicZoneChooseZone_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
buf.WriteUInt16(emu->choices[i].dz_zone_id);
buf.WriteUInt16(emu->choices[i].dz_instance_id);
buf.WriteUInt32(emu->choices[i].unknown_id1);
buf.WriteUInt32(emu->choices[i].dz_type);
buf.WriteUInt32(emu->choices[i].unknown_id2);
buf.WriteString(emu->choices[i].description);
buf.WriteString(emu->choices[i].leader_name);
}
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzCompass)
{
SETUP_VAR_ENCODE(ExpeditionCompass_Struct);
ALLOC_VAR_ENCODE(structs::ExpeditionCompass_Struct, sizeof(structs::ExpeditionInfo_Struct) + sizeof(structs::ExpeditionCompassEntry_Struct) * emu->count);
SETUP_VAR_ENCODE(DynamicZoneCompass_Struct);
ALLOC_VAR_ENCODE(structs::DynamicZoneCompass_Struct,
sizeof(structs::DynamicZoneCompass_Struct) +
sizeof(structs::DynamicZoneCompassEntry_Struct) * emu->count
);
OUT(client_id);
OUT(count);
for (uint32 i = 0; i < emu->count; ++i)
{
OUT(entries[i].dz_zone_id);
OUT(entries[i].dz_instance_id);
OUT(entries[i].dz_type);
OUT(entries[i].x);
OUT(entries[i].y);
OUT(entries[i].z);
@@ -644,81 +678,60 @@ namespace UF
ENCODE_LENGTH_EXACT(ExpeditionInfo_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInfo_Struct, structs::ExpeditionInfo_Struct);
OUT(client_id);
OUT(assigned);
OUT(max_players);
eq->unknown004 = 785316192;
eq->unknown008 = 435601;
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->leader_name, emu->leader_name);
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionList)
ENCODE(OP_DzExpeditionInvite)
{
SETUP_VAR_ENCODE(ExpeditionLockoutList_Struct);
ENCODE_LENGTH_EXACT(ExpeditionInvite_Struct);
SETUP_DIRECT_ENCODE(ExpeditionInvite_Struct, structs::ExpeditionInvite_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
OUT(client_id);
strn0cpy(eq->inviter_name, emu->inviter_name, sizeof(eq->inviter_name));
strn0cpy(eq->expedition_name, emu->expedition_name, sizeof(eq->expedition_name));
OUT(swapping);
strn0cpy(eq->swap_name, emu->swap_name, sizeof(eq->swap_name));
OUT(dz_zone_id);
OUT(dz_instance_id);
FINISH_ENCODE();
}
ENCODE(OP_DzExpeditionLockoutTimers)
{
SETUP_VAR_ENCODE(ExpeditionLockoutTimers_Struct);
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].expedition, strlen(emu->entries[i].expedition));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].time_left, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->entries[i].expedition_event, strlen(emu->entries[i].expedition_event));
ss.write((const char*)&null_term, sizeof(char));
buf.WriteString(emu->timers[i].expedition_name);
buf.WriteUInt32(emu->timers[i].seconds_remaining);
buf.WriteUInt32(emu->timers[i].event_type);
buf.WriteString(emu->timers[i].event_name);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzJoinExpeditionConfirm)
ENCODE(OP_DzSetLeaderName)
{
ENCODE_LENGTH_EXACT(ExpeditionJoinPrompt_Struct);
SETUP_DIRECT_ENCODE(ExpeditionJoinPrompt_Struct, structs::ExpeditionJoinPrompt_Struct);
ENCODE_LENGTH_EXACT(ExpeditionSetLeaderName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionSetLeaderName_Struct, structs::ExpeditionSetLeaderName_Struct);
strcpy(eq->expedition_name, emu->expedition_name);
strcpy(eq->player_name, emu->player_name);
FINISH_ENCODE();
}
ENCODE(OP_DzLeaderStatus)
{
SETUP_VAR_ENCODE(ExpeditionLeaderSet_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write(emu->leader_name, strlen(emu->leader_name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//0xffffffff
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&client_id, sizeof(uint32));//1
ss.write((const char*)&client_id, sizeof(uint32));
__packet->size = ss.str().length();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
OUT(client_id);
strn0cpy(eq->leader_name, emu->leader_name, sizeof(eq->leader_name));
FINISH_ENCODE();
}
@@ -727,26 +740,43 @@ namespace UF
{
SETUP_VAR_ENCODE(ExpeditionMemberList_Struct);
std::stringstream ss(std::stringstream::in | std::stringstream::out | std::stringstream::binary);
uint32 client_id = 0;
uint8 null_term = 0;
ss.write((const char*)&client_id, sizeof(uint32));
ss.write((const char*)&emu->count, sizeof(uint32));
SerializeBuffer buf;
buf.WriteUInt32(emu->client_id);
buf.WriteUInt32(emu->count);
for (uint32 i = 0; i < emu->count; ++i)
{
ss.write(emu->entries[i].name, strlen(emu->entries[i].name));
ss.write((const char*)&null_term, sizeof(char));
ss.write((const char*)&emu->entries[i].status, sizeof(char));
buf.WriteString(emu->members[i].name);
buf.WriteUInt8(emu->members[i].status);
}
__packet->size = ss.str().length();
__packet->size = buf.size();
__packet->pBuffer = new unsigned char[__packet->size];
memcpy(__packet->pBuffer, ss.str().c_str(), __packet->size);
memcpy(__packet->pBuffer, buf.buffer(), __packet->size);
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListName)
{
ENCODE_LENGTH_EXACT(ExpeditionMemberListName_Struct);
SETUP_DIRECT_ENCODE(ExpeditionMemberListName_Struct, structs::ExpeditionMemberListName_Struct);
OUT(client_id);
OUT(add_name);
strn0cpy(eq->name, emu->name, sizeof(eq->name));
FINISH_ENCODE();
}
ENCODE(OP_DzMemberListStatus)
{
auto emu = reinterpret_cast<ExpeditionMemberList_Struct*>((*p)->pBuffer);
if (emu->count == 1)
{
ENCODE_FORWARD(OP_DzMemberList);
}
}
ENCODE(OP_Emote)
{
EQApplicationPacket *in = *p;
@@ -3315,6 +3345,84 @@ namespace UF
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzAddPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzChooseZoneReply)
{
DECODE_LENGTH_EXACT(structs::DynamicZoneChooseZoneReply_Struct);
SETUP_DIRECT_DECODE(DynamicZoneChooseZoneReply_Struct, structs::DynamicZoneChooseZoneReply_Struct);
IN(unknown000);
IN(unknown004);
IN(unknown008);
IN(unknown_id1);
IN(dz_zone_id);
IN(dz_instance_id);
IN(dz_type);
IN(unknown_id2);
IN(unknown028);
IN(unknown032);
IN(unknown036);
IN(unknown040);
IN(unknown044);
IN(unknown048);
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzExpeditionInviteResponse)
{
DECODE_LENGTH_EXACT(structs::ExpeditionInviteResponse_Struct);
SETUP_DIRECT_DECODE(ExpeditionInviteResponse_Struct, structs::ExpeditionInviteResponse_Struct);
IN(dz_zone_id);
IN(dz_instance_id);
IN(accepted);
IN(swapping);
strn0cpy(emu->swap_name, eq->swap_name, sizeof(emu->swap_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzMakeLeader)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzRemovePlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommand_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommand_Struct, structs::ExpeditionCommand_Struct);
strn0cpy(emu->name, eq->name, sizeof(emu->name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_DzSwapPlayer)
{
DECODE_LENGTH_EXACT(structs::ExpeditionCommandSwap_Struct);
SETUP_DIRECT_DECODE(ExpeditionCommandSwap_Struct, structs::ExpeditionCommandSwap_Struct);
strn0cpy(emu->add_player_name, eq->add_player_name, sizeof(emu->add_player_name));
strn0cpy(emu->rem_player_name, eq->rem_player_name, sizeof(emu->rem_player_name));
FINISH_DIRECT_DECODE();
}
DECODE(OP_Emote)
{
unsigned char *__eq_buffer = __packet->pBuffer;
+12 -3
View File
@@ -38,13 +38,16 @@ E(OP_Damage)
E(OP_DeleteCharge)
E(OP_DeleteItem)
E(OP_DisciplineUpdate)
E(OP_DzChooseZone)
E(OP_DzCompass)
E(OP_DzExpeditionEndsWarning)
E(OP_DzExpeditionInfo)
E(OP_DzExpeditionList)
E(OP_DzJoinExpeditionConfirm)
E(OP_DzLeaderStatus)
E(OP_DzExpeditionInvite)
E(OP_DzExpeditionLockoutTimers)
E(OP_DzMemberList)
E(OP_DzMemberListName)
E(OP_DzMemberListStatus)
E(OP_DzSetLeaderName)
E(OP_Emote)
E(OP_ExpansionInfo)
E(OP_FormattedMessage)
@@ -120,6 +123,12 @@ D(OP_ConsiderCorpse)
D(OP_Consume)
D(OP_Damage)
D(OP_DeleteItem)
D(OP_DzAddPlayer)
D(OP_DzChooseZoneReply)
D(OP_DzExpeditionInviteResponse)
D(OP_DzMakeLeader)
D(OP_DzRemovePlayer)
D(OP_DzSwapPlayer)
D(OP_Emote)
D(OP_EnvDamage)
D(OP_FaceChange)
+135 -27
View File
@@ -4250,52 +4250,160 @@ struct VeteranReward
/*012*/ VeteranRewardItem items[8];
};
struct ExpeditionEntryHeader_Struct
struct ExpeditionInvite_Struct
{
/*000*/ uint32 client_id; // unique character id
/*004*/ uint32 unknown004;
/*008*/ char inviter_name[64];
/*072*/ char expedition_name[128];
/*200*/ uint8 swapping; // 0: adding 1: swapping
/*201*/ char swap_name[64]; // if swapping, swap name being removed
/*265*/ uint8 padding[3];
/*268*/ uint16 dz_zone_id; // dz_id zone/instance pair, sent back in reply
/*270*/ uint16 dz_instance_id;
};
struct ExpeditionInviteResponse_Struct
{
/*000*/ uint32 unknown000;
/*000*/ uint32 number_of_entries;
};
struct ExpeditionJoinPrompt_Struct
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ char player_name[64];
/*072*/ char expedition_name[64];
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 clientid;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
/*008*/ uint16 dz_zone_id; // dz_id pair sent in invite
/*010*/ uint16 dz_instance_id;
/*012*/ uint8 accepted; // 0: declined 1: accepted
/*013*/ uint8 swapping; // 0: adding 1: swapping (sent in invite)
/*014*/ char swap_name[64]; // swap name sent in invite
/*078*/ uint8 unknown078; // padding garbage?
/*079*/ uint8 unknown079; // padding garbage?
};
struct ExpeditionInfo_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 unknown008;
/*008*/ uint32 assigned; // padded bool
/*012*/ uint32 max_players;
/*016*/ char expedition_name[128];
/*142*/ char leader_name[64];
/*016*/ char expedition_name[128];
/*144*/ char leader_name[64];
};
struct ExpeditionCompassEntry_Struct
struct ExpeditionMemberEntry_Struct
{
/*000*/ float unknown000; //seen *((uint32*)) = 1584791871
/*004*/ uint32 enabled; //guess
/*008*/ uint32 unknown008; //seen 1019
/*000*/ char name[1]; // variable length, null terminated, max 0x40 (64)
/*000*/ uint8 status; // 0: unknown 1: Online, 2: Offline, 3: In Dynamic Zone, 4: Link Dead
};
struct ExpeditionMemberList_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count; // number of players in window
/*008*/ ExpeditionMemberEntry_Struct members[0]; // variable length
};
struct ExpeditionMemberListName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 add_name; // padded bool, 0: remove name, 1: add name with unknown status
/*012*/ char name[64];
};
struct ExpeditionLockoutTimerEntry_Struct
{
/*000*/ char expedition_name[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ uint32 seconds_remaining;
/*000*/ uint32 event_type; // seen -1 (0xffffffff) for replay timers and 1 for event timers
/*000*/ char event_name[1]; // variable length, null terminated, max 0x100 (256)
};
struct ExpeditionLockoutTimers_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionLockoutTimerEntry_Struct timers[0];
};
struct ExpeditionSetLeaderName_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ char leader_name[64];
};
struct ExpeditionCommand_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char name[64];
};
struct ExpeditionCommandSwap_Struct
{
/*000*/ uint32 unknown000;
/*004*/ uint32 unknown004;
/*008*/ char add_player_name[64]; // swap to (player must confirm)
/*072*/ char rem_player_name[64]; // swap from
};
struct ExpeditionExpireWarning
{
/*000*/ uint32 client_id;
/*004*/ uint32 unknown004;
/*008*/ uint32 minutes_remaining;
};
struct DynamicZoneCompassEntry_Struct
{
/*000*/ uint16 dz_zone_id; // target dz id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 dz_type; // 1: Expedition, 2: Tutorial (purple), 3: Task, 4: Mission, 5: Quest (green)
/*008*/ uint32 unknown008;
/*012*/ float y;
/*016*/ float x;
/*020*/ float z;
};
struct ExpeditionCompass_Struct
struct DynamicZoneCompass_Struct
{
/*000*/ uint32 clientid;
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ ExpeditionCompassEntry_Struct entries[0];
/*008*/ DynamicZoneCompassEntry_Struct entries[0];
};
struct DynamicZoneChooseZoneEntry_Struct
{
/*000*/ uint16 dz_zone_id; // dz_id pair
/*002*/ uint16 dz_instance_id;
/*004*/ uint32 unknown_id1; // sent back in reply
/*008*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest -- sent back in reply
/*012*/ uint32 unknown_id2; // possibly an id based on dz type, for expeditions this was same as dz_id (zone|instance) but task dz was different
/*016*/ char description[1]; // variable length, null terminated, max 0x80 (128)
/*000*/ char leader_name[1]; // variable length, null terminated, max 0x40 (64)
};
struct DynamicZoneChooseZone_Struct
{
/*000*/ uint32 client_id;
/*004*/ uint32 count;
/*008*/ DynamicZoneChooseZoneEntry_Struct choices[0];
};
struct DynamicZoneChooseZoneReply_Struct
{
/*000*/ uint32 unknown000; // ff ff ff ff
/*004*/ uint32 unknown004; // seen 69 00 00 00
/*008*/ uint32 unknown008; // ff ff ff ff
/*012*/ uint32 unknown_id1; // from choose zone entry message
/*016*/ uint16 dz_zone_id; // dz_id pair
/*018*/ uint16 dz_instance_id;
/*020*/ uint32 dz_type; // 1: Expedition, 2: Tutorial, 3: Task, 4: Mission, 5: Quest
/*024*/ uint32 unknown_id2; // from choose zone entry message
/*028*/ uint32 unknown028; // 00 00 00 00
/*032*/ uint32 unknown032; // always same as unknown044
/*036*/ uint32 unknown036;
/*040*/ uint32 unknown040;
/*044*/ uint32 unknown044; // always same as unknown032
/*048*/ uint32 unknown048; // seen 01 00 00 00 and 02 00 00 00
};
struct AltCurrencySelectItem_Struct {