Going to work on op mapping; we're making it past add player at least.

This commit is contained in:
KimLS 2024-11-16 17:08:24 -08:00
parent 29066cf847
commit 018308bfca
2 changed files with 60 additions and 37 deletions

View File

@ -489,42 +489,42 @@ namespace Larion
FINISH_ENCODE(); FINISH_ENCODE();
} }
ENCODE(OP_SpawnAppearance) //ENCODE(OP_SpawnAppearance)
{ //{
EQApplicationPacket* in = *p; // EQApplicationPacket* in = *p;
*p = nullptr; // *p = nullptr;
//
unsigned char* emu_buffer = in->pBuffer; // unsigned char* emu_buffer = in->pBuffer;
//
SpawnAppearance_Struct* sas = (SpawnAppearance_Struct*)emu_buffer; // SpawnAppearance_Struct* sas = (SpawnAppearance_Struct*)emu_buffer;
//
if (sas->type != AppearanceType::Size) // if (sas->type != AppearanceType::Size)
{ // {
//larion struct is different than rof2's but the idea is the same // //larion struct is different than rof2's but the idea is the same
auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(structs::SpawnAppearance_Struct)); // auto outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(structs::SpawnAppearance_Struct));
structs::SpawnAppearance_Struct *eq = (structs::SpawnAppearance_Struct*)outapp->pBuffer; // structs::SpawnAppearance_Struct *eq = (structs::SpawnAppearance_Struct*)outapp->pBuffer;
//
eq->spawn_id = sas->spawn_id; // eq->spawn_id = sas->spawn_id;
eq->type = sas->type; // eq->type = sas->type;
eq->parameter = sas->parameter; // eq->parameter = sas->parameter;
//
dest->FastQueuePacket(&outapp, ack_req); // dest->FastQueuePacket(&outapp, ack_req);
delete in; // delete in;
return; // return;
} // }
//
auto outapp = new EQApplicationPacket(OP_ChangeSize, sizeof(ChangeSize_Struct)); // auto outapp = new EQApplicationPacket(OP_ChangeSize, sizeof(ChangeSize_Struct));
//
ChangeSize_Struct* css = (ChangeSize_Struct*)outapp->pBuffer; // ChangeSize_Struct* css = (ChangeSize_Struct*)outapp->pBuffer;
//
css->EntityID = sas->spawn_id; // css->EntityID = sas->spawn_id;
css->Size = (float)sas->parameter; // css->Size = (float)sas->parameter;
css->Unknown08 = 0; // css->Unknown08 = 0;
css->Unknown12 = 1.0f; // css->Unknown12 = 1.0f;
//
dest->FastQueuePacket(&outapp, ack_req); // dest->FastQueuePacket(&outapp, ack_req);
delete in; // delete in;
} //}
ENCODE(OP_PlayerProfile) { ENCODE(OP_PlayerProfile) {
EQApplicationPacket* in = *p; EQApplicationPacket* in = *p;
@ -2248,6 +2248,27 @@ namespace Larion
delete in; delete in;
} }
ENCODE(OP_SpawnAppearance)
{
EQApplicationPacket* in = *p;
*p = nullptr;
delete in;
}
ENCODE(OP_SpawnDoor)
{
EQApplicationPacket* in = *p;
*p = nullptr;
delete in;
}
ENCODE(OP_GroundSpawn)
{
EQApplicationPacket* in = *p;
*p = nullptr;
delete in;
}
// DECODE methods // DECODE methods
DECODE(OP_ZoneEntry) DECODE(OP_ZoneEntry)

View File

@ -6,13 +6,15 @@ E(OP_SendMembershipDetails)
E(OP_SendMaxCharacters) E(OP_SendMaxCharacters)
E(OP_SendCharInfo) E(OP_SendCharInfo)
E(OP_ExpansionInfo) E(OP_ExpansionInfo)
E(OP_SpawnAppearance)
//E(OP_SendAATable) //E(OP_SendAATable)
E(OP_PlayerProfile) E(OP_PlayerProfile)
E(OP_ZoneEntry) E(OP_ZoneEntry)
E(OP_ZoneSpawns) E(OP_ZoneSpawns)
E(OP_CharInventory) E(OP_CharInventory)
E(OP_NewZone) E(OP_NewZone)
E(OP_SpawnAppearance)
E(OP_SpawnDoor)
E(OP_GroundSpawn)
//list of packets we need to decode on the way in: //list of packets we need to decode on the way in:
D(OP_ZoneEntry) D(OP_ZoneEntry)