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

View File

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