-Basic move item support.

-Update some Laurion limits to better support new item slots.
-Camping on Laurion will now work like it does on live.
-Fixed a few of the Laurion exp messages (this will need some work).  Packet calc is still all fked up.
This commit is contained in:
KimLS
2024-12-02 22:41:20 -08:00
parent 392998325b
commit af8f85cfd9
7 changed files with 89 additions and 15 deletions
+29 -1
View File
@@ -1178,7 +1178,7 @@ namespace Laurion
//u32 claim_count;
out.WriteUInt32(0);
//Claim claims[claim_count];
//Claim claims[claim_count];
//Tribute tribute;
/*
@@ -2657,6 +2657,20 @@ namespace Laurion
FINISH_ENCODE();
}
ENCODE(OP_MoveItem)
{
ENCODE_LENGTH_EXACT(MoveItem_Struct);
SETUP_DIRECT_ENCODE(MoveItem_Struct, structs::MoveItem_Struct);
Log(Logs::Detail, Logs::Netcode, "Laurion::ENCODE(OP_MoveItem)");
eq->from_slot = ServerToLaurionSlot(emu->from_slot);
eq->to_slot = ServerToLaurionSlot(emu->to_slot);
OUT(number_in_stack);
FINISH_ENCODE();
}
// DECODE methods
DECODE(OP_EnterWorld)
@@ -2831,6 +2845,20 @@ namespace Laurion
FINISH_DIRECT_DECODE();
}
DECODE(OP_MoveItem)
{
DECODE_LENGTH_EXACT(structs::MoveItem_Struct);
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
Log(Logs::Detail, Logs::Netcode, "Laurion::DECODE(OP_MoveItem)");
emu->from_slot = LaurionToServerSlot(eq->from_slot);
emu->to_slot = LaurionToServerSlot(eq->to_slot);
IN(number_in_stack);
FINISH_DIRECT_DECODE();
}
//Naive version but should work well enough for now
int ExtractIDFile(const std::string& input) {
std::string number;