From 45db09303f5f3d48588f354de67f3451ce3f7fa9 Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 24 Dec 2024 14:29:51 -0800 Subject: [PATCH] Add a few opcodes Add onlevelmessage encode --- common/patches/laurion.cpp | 26 ++++++++++++++++++++++++++ common/patches/laurion_ops.h | 1 + utils/patches/patch_Laurion.conf | 20 ++++++++++---------- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/common/patches/laurion.cpp b/common/patches/laurion.cpp index b519b8f13..660ea9fa0 100644 --- a/common/patches/laurion.cpp +++ b/common/patches/laurion.cpp @@ -3269,6 +3269,32 @@ namespace Laurion FINISH_ENCODE(); } + ENCODE(OP_OnLevelMessage) + { + EQApplicationPacket* in = *p; + *p = nullptr; + OnLevelMessage_Struct* emu = (OnLevelMessage_Struct*)in->pBuffer; + SerializeBuffer buffer; + + buffer.WriteLengthString(emu->Title); + buffer.WriteLengthString(emu->Text); + buffer.WriteLengthString(emu->ButtonName0); + buffer.WriteLengthString(emu->ButtonName1); + buffer.WriteUInt8(emu->Buttons); + buffer.WriteUInt8(emu->SoundControls); + buffer.WriteUInt32(emu->Duration); + buffer.WriteUInt32(emu->PopupID); + buffer.WriteUInt32(emu->NegativeID); + buffer.WriteUInt32(0); //seen -1 & 0 + buffer.WriteUInt32(0); //seen 0 + + auto outapp = new EQApplicationPacket(OP_OnLevelMessage, buffer.size()); + outapp->WriteData(buffer.buffer(), buffer.size()); + dest->FastQueuePacket(&outapp, ack_req); + + delete in; + } + // DECODE methods DECODE(OP_EnterWorld) diff --git a/common/patches/laurion_ops.h b/common/patches/laurion_ops.h index 4bd23d500..e2a86e651 100644 --- a/common/patches/laurion_ops.h +++ b/common/patches/laurion_ops.h @@ -49,6 +49,7 @@ E(OP_RemoveBlockedBuffs) E(OP_ZonePlayerToBind) E(OP_Illusion) E(OP_MoneyOnCorpse) +E(OP_OnLevelMessage) //list of packets we need to decode on the way in: D(OP_EnterWorld) D(OP_ZoneEntry) diff --git a/utils/patches/patch_Laurion.conf b/utils/patches/patch_Laurion.conf index 6c9d8c577..b47132ca7 100644 --- a/utils/patches/patch_Laurion.conf +++ b/utils/patches/patch_Laurion.conf @@ -313,14 +313,14 @@ OP_Stun=0x0000 OP_SendFindableNPCs=0x0000 OP_FindPersonRequest=0x0000 OP_FindPersonReply=0x0000 -OP_Sound=0x0000 -OP_CashReward=0x0000 +OP_Sound=0x2fa8 +OP_CashReward=0x5e23 OP_PetBuffWindow=0x0000 -OP_LevelAppearance=0x0000 -OP_Translocate=0x0000 -OP_Sacrifice=0x0000 -OP_PopupResponse=0x0000 -OP_OnLevelMessage=0x0000 +OP_LevelAppearance=0x5d24 +OP_Translocate=0x2772 +OP_Sacrifice=0x2cbf +OP_PopupResponse=0x6be9 +OP_OnLevelMessage=0x2a41 OP_AugmentInfo=0x0000 OP_Petition=0x0000 OP_SomeItemPacketMaybe=0x0000 @@ -420,10 +420,10 @@ OP_MercenarySuspendResponse=0x0000 OP_MercenaryUnsuspendResponse=0x0000 # Looting -OP_LootRequest=0x0000 -OP_EndLootRequest=0x0000 +OP_LootRequest=0x60e5 +OP_EndLootRequest=0x35f6 OP_LootItem=0x0000 -OP_LootComplete=0x0000 +OP_LootComplete=0x1f5e # bazaar trader stuff: OP_BazaarSearch=0x0000