From 8eb20efabbe4b9251c5ddd717d1cea369a949510 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 3 Jan 2025 22:19:15 -0800 Subject: [PATCH] -Stun -Player Trading -Item Recast -CancelSneakHide -Item Verification --- common/patches/laurion.cpp | 23 +++++++++++++++++ common/patches/laurion_ops.h | 2 ++ common/patches/laurion_structs.h | 22 +++++++++++++++++ utils/patches/patch_Laurion.conf | 42 ++++++++++++++++---------------- 4 files changed, 68 insertions(+), 21 deletions(-) diff --git a/common/patches/laurion.cpp b/common/patches/laurion.cpp index e2b0911ea..8c45ac303 100644 --- a/common/patches/laurion.cpp +++ b/common/patches/laurion.cpp @@ -335,6 +335,17 @@ namespace Laurion FINISH_ENCODE(); } + ENCODE(OP_CancelTrade) + { + ENCODE_LENGTH_EXACT(CancelTrade_Struct); + SETUP_DIRECT_ENCODE(CancelTrade_Struct, structs::CancelTrade_Struct); + + OUT(fromid); + OUT(action); + + FINISH_ENCODE(); + } + ENCODE(OP_CastSpell) { ENCODE_LENGTH_EXACT(CastSpell_Struct); @@ -2918,6 +2929,18 @@ namespace Laurion FINISH_ENCODE(); } + ENCODE(OP_Stun) + { + ENCODE_LENGTH_EXACT(Stun_Struct); + SETUP_DIRECT_ENCODE(Stun_Struct, structs::Stun_Struct); + + OUT(duration); + eq->unknown005 = 163; + eq->unknown006 = 67; + + FINISH_ENCODE(); + } + ENCODE(OP_WearChange) { ENCODE_LENGTH_EXACT(WearChange_Struct); diff --git a/common/patches/laurion_ops.h b/common/patches/laurion_ops.h index 0fc174a11..64e5de501 100644 --- a/common/patches/laurion_ops.h +++ b/common/patches/laurion_ops.h @@ -8,6 +8,7 @@ E(OP_BeginCast) E(OP_BlockedBuffs) E(OP_Buff) E(OP_BuffCreate) +E(OP_CancelTrade) E(OP_CastSpell) E(OP_ChannelMessage) E(OP_CharInventory) @@ -55,6 +56,7 @@ E(OP_SkillUpdate) E(OP_SpecialMesg) E(OP_SpawnAppearance) E(OP_SpawnDoor) +E(OP_Stun) E(OP_WearChange) E(OP_ZoneChange) E(OP_ZoneEntry) diff --git a/common/patches/laurion_structs.h b/common/patches/laurion_structs.h index 637c6ff69..e5eac187d 100644 --- a/common/patches/laurion_structs.h +++ b/common/patches/laurion_structs.h @@ -989,6 +989,28 @@ namespace Laurion { /*020*/ uint32 unknown020; /*024*/ }; + + /* + ** Cancel Trade struct + ** Sent when a player cancels a trade + ** Size: 8 bytes + ** Used In: OP_CancelTrade + ** + */ + struct CancelTrade_Struct { + /*00*/ uint32 fromid; + /*04*/ uint32 action; + /*08*/ + }; + + struct Stun_Struct { // 8 bytes total + /*000*/ uint32 duration; // Duration of stun + /*004*/ uint8 unknown004; // seen 0 + /*005*/ uint8 unknown005; // seen 163 + /*006*/ uint8 unknown006; // seen 67 + /*007*/ uint8 unknown007; // seen 0 + /*008*/ + }; #pragma pack() }; //end namespace structs diff --git a/utils/patches/patch_Laurion.conf b/utils/patches/patch_Laurion.conf index 1e81cbd27..1b93b689c 100644 --- a/utils/patches/patch_Laurion.conf +++ b/utils/patches/patch_Laurion.conf @@ -78,11 +78,6 @@ OP_PreLogoutReply=0x0000 # Required to fully log in OP_SpawnAppearance=0x4eb0 OP_ChangeSize=0x2fdc -OP_TributeUpdate=0x0000 -OP_TributeTimer=0x0000 -OP_SendTributes=0x0000 -OP_RequestGuildTributes=0x0000 -OP_TributeInfo=0x0000 OP_Weather=0x6fe6 OP_ReqClientSpawn=0x6732 OP_SpawnDoor=0x4273 @@ -309,7 +304,7 @@ OP_ClearNPCMarks=0x0000 OP_DelegateAbility=0x0000 OP_SetGroupTarget=0x0000 OP_Charm=0x66bb -OP_Stun=0x0000 +OP_Stun=0x34be OP_SendFindableNPCs=0x0000 OP_FindPersonRequest=0x0000 OP_FindPersonReply=0x0000 @@ -364,11 +359,11 @@ OP_IncreaseStats=0x0000 OP_Weblink=0x0000 OP_OpenContainer=0x0000 OP_Marquee=0x0000 -OP_ItemRecastDelay=0x0000 +OP_ItemRecastDelay=0x547a #OP_OpenInventory=0x0000 # Likely does not exist in RoF -U OP_ResetAA=0x53c0 OP_Fling=0x3731 -OP_CancelSneakHide=0x0000 +OP_CancelSneakHide=0x7452 OP_AggroMeterLockTarget=0x0000 OP_AggroMeterTargetInfo=0x0000 OP_AggroMeterUpdate=0x0000 @@ -441,24 +436,24 @@ OP_Bazaar=0x0000 OP_TraderItemUpdate=0x0000 # pc/npc trading -OP_TradeRequest=0x0000 -OP_TradeAcceptClick=0x0000 -OP_TradeRequestAck=0x0000 -OP_TradeCoins=0x0000 -OP_FinishTrade=0x0000 -OP_CancelTrade=0x0000 -OP_TradeMoneyUpdate=0x0000 -OP_MoneyUpdate=0x0000 -OP_TradeBusy=0x0000 +OP_TradeRequest=0x7066 +OP_TradeAcceptClick=0x34ad +OP_TradeRequestAck=0x1c6b +OP_TradeCoins=0x44fe +OP_FinishTrade=0x0ec6 +OP_CancelTrade=0x5839 +OP_TradeMoneyUpdate=0x5fb3 +OP_MoneyUpdate=0x70bb +OP_TradeBusy=0x109f # Sent after canceling trade or after closing tradeskill object -OP_FinishWindow=0x0000 -OP_FinishWindow2=0x0000 +OP_FinishWindow=0x50d4 +OP_FinishWindow2=0x6b03 # Sent on Live for what seems to be item existance verification # Ex. Before Right Click Effect happens from items -OP_ItemVerifyRequest=0x0000 -OP_ItemVerifyReply=0x0000 +OP_ItemVerifyRequest=0x2003 +OP_ItemVerifyReply=0x43d0 OP_ItemAdvancedLoreText=0x0000 @@ -486,6 +481,11 @@ OP_RecipeAutoCombine=0x5dba OP_TradeSkillCombine=0x4ed8 # Tribute Packets: +OP_TributeUpdate=0x0000 +OP_TributeTimer=0x0000 +OP_SendTributes=0x0000 +OP_RequestGuildTributes=0x0000 +OP_TributeInfo=0x0000 OP_OpenTributeMaster=0x0000 OP_SelectTribute=0x0000 OP_TributeItem=0x0000