diff --git a/common/patches/laurion.cpp b/common/patches/laurion.cpp index bfc0d3d25..9fa50a63c 100644 --- a/common/patches/laurion.cpp +++ b/common/patches/laurion.cpp @@ -527,6 +527,25 @@ namespace Laurion FINISH_ENCODE(); } + ENCODE(OP_DeleteCharge) + { + Log(Logs::Detail, Logs::Netcode, "Laurion::ENCODE(OP_DeleteCharge)"); + + ENCODE_FORWARD(OP_MoveItem); + } + + ENCODE(OP_DeleteItem) + { + ENCODE_LENGTH_EXACT(DeleteItem_Struct); + SETUP_DIRECT_ENCODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + eq->from_slot = ServerToLaurionSlot(emu->from_slot); + eq->to_slot = ServerToLaurionSlot(emu->to_slot); + OUT(number_in_stack); + + FINISH_ENCODE(); + } + ENCODE(OP_DeleteSpawn) { ENCODE_LENGTH_EXACT(DeleteSpawn_Struct); @@ -3546,6 +3565,18 @@ namespace Laurion DECODE(OP_ConsiderCorpse) { DECODE_FORWARD(OP_Consider); } + DECODE(OP_DeleteItem) + { + DECODE_LENGTH_EXACT(structs::DeleteItem_Struct); + SETUP_DIRECT_DECODE(DeleteItem_Struct, structs::DeleteItem_Struct); + + emu->from_slot = LaurionToServerSlot(eq->from_slot); + emu->to_slot = LaurionToServerSlot(eq->to_slot); + IN(number_in_stack); + + FINISH_DIRECT_DECODE(); + } + DECODE(OP_EnterWorld) { DECODE_LENGTH_EXACT(structs::EnterWorld_Struct); @@ -3656,8 +3687,8 @@ namespace Laurion DECODE_LENGTH_EXACT(structs::NewCombine_Struct); SETUP_DIRECT_DECODE(NewCombine_Struct, structs::NewCombine_Struct); - emu->container_slot = RoF2ToServerSlot(eq->container_slot); - emu->guildtribute_slot = RoF2ToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented + emu->container_slot = LaurionToServerSlot(eq->container_slot); + emu->guildtribute_slot = LaurionToServerSlot(eq->guildtribute_slot); // this should only return INVALID_INDEX until implemented FINISH_DIRECT_DECODE(); } diff --git a/common/patches/laurion_ops.h b/common/patches/laurion_ops.h index 30ad3c6b1..c4d7be633 100644 --- a/common/patches/laurion_ops.h +++ b/common/patches/laurion_ops.h @@ -16,6 +16,8 @@ E(OP_ClientUpdate) E(OP_Consider) E(OP_Damage) E(OP_Death) +E(OP_DeleteCharge) +E(OP_DeleteItem) E(OP_DeleteSpawn) E(OP_ExpansionInfo) E(OP_ExpUpdate) @@ -68,6 +70,7 @@ D(OP_ClientUpdate) D(OP_ClickDoor) D(OP_Consider) D(OP_ConsiderCorpse) +D(OP_DeleteItem) D(OP_EnterWorld) D(OP_GMTraining) D(OP_GroupDisband)