From 004b0e1176352af04cffe73fcae2246f82695a34 Mon Sep 17 00:00:00 2001 From: KimLS Date: Sun, 17 Nov 2024 17:10:41 -0800 Subject: [PATCH] Ground spawn for larion --- common/patches/larion.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/common/patches/larion.cpp b/common/patches/larion.cpp index ade76eca1..d78256ce1 100644 --- a/common/patches/larion.cpp +++ b/common/patches/larion.cpp @@ -2297,6 +2297,28 @@ namespace Larion { EQApplicationPacket* in = *p; *p = nullptr; + Object_Struct* emu = (Object_Struct*)in->pBuffer; + + SerializeBuffer buffer; + buffer.WriteUInt32(emu->drop_id); + buffer.WriteString(emu->object_name); + buffer.WriteUInt16(emu->zone_id); + buffer.WriteUInt16(emu->zone_instance); + buffer.WriteUInt32(emu->drop_id); //this is some other sub but it's okay to duplicate + buffer.WriteUInt32(0); //expires + buffer.WriteFloat(emu->heading); + buffer.WriteFloat(emu->tilt_x); + buffer.WriteFloat(emu->tilt_y); + buffer.WriteFloat(emu->size != 0 && (float)emu->size < 5000.f ? (float)((float)emu->size / 100.0f) : 1.f); //size, with weird peq hack + buffer.WriteFloat(emu->y); + buffer.WriteFloat(emu->x); + buffer.WriteFloat(emu->z); + buffer.WriteFloat(emu->object_type); //weight + + auto outapp = new EQApplicationPacket(OP_GroundSpawn, buffer.size()); + outapp->WriteData(buffer.buffer(), buffer.size()); + dest->FastQueuePacket(&outapp, ack_req); + delete in; }