diff --git a/common/patches/laurion.cpp b/common/patches/laurion.cpp index 3bdc4b78b..94bd8f74d 100644 --- a/common/patches/laurion.cpp +++ b/common/patches/laurion.cpp @@ -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; diff --git a/common/patches/laurion_limits.h b/common/patches/laurion_limits.h index f5035c06c..ab4eba11e 100644 --- a/common/patches/laurion_limits.h +++ b/common/patches/laurion_limits.h @@ -170,6 +170,8 @@ namespace Laurion slotGeneral8, slotGeneral9, slotGeneral10, + slotGeneral11, + slotGeneral12, slotCursor }; @@ -188,6 +190,7 @@ namespace Laurion const int16 EQUIPMENT_END = slotAmmo; const int16 EQUIPMENT_COUNT = (EQUIPMENT_END - EQUIPMENT_BEGIN) + 1; + //We support more if enabled but for now lets leave it at the 10 slots const int16 GENERAL_BEGIN = slotGeneral1; const int16 GENERAL_END = slotGeneral10; const int16 GENERAL_COUNT = (GENERAL_END - GENERAL_BEGIN) + 1; @@ -200,10 +203,10 @@ namespace Laurion const int16 CORPSE_END = invslot::slotGeneral1 + invslot::slotCursor; const uint64 EQUIPMENT_BITMASK = 0x00000000007FFFFF; - const uint64 GENERAL_BITMASK = 0x00000001FF800000; - const uint64 CURSOR_BITMASK = 0x0000000200000000; - const uint64 POSSESSIONS_BITMASK = (EQUIPMENT_BITMASK | GENERAL_BITMASK | CURSOR_BITMASK); // based on 34-slot count (RoF+) - const uint64 CORPSE_BITMASK = (GENERAL_BITMASK | CURSOR_BITMASK | (EQUIPMENT_BITMASK << 34)); // based on 34-slot count (RoF+) + const uint64 GENERAL_BITMASK = 0x00000007FF800000; + const uint64 CURSOR_BITMASK = 0x0000000800000000; + const uint64 POSSESSIONS_BITMASK = (EQUIPMENT_BITMASK | GENERAL_BITMASK | CURSOR_BITMASK); // based on 36-slot count (Laurion+) + const uint64 CORPSE_BITMASK = (GENERAL_BITMASK | CURSOR_BITMASK | (EQUIPMENT_BITMASK << 36)); // based on 36-slot count (Laurion+) const char* GetInvPossessionsSlotName(int16 inv_slot); diff --git a/common/patches/laurion_ops.h b/common/patches/laurion_ops.h index 177b7bcf6..b1950bc7f 100644 --- a/common/patches/laurion_ops.h +++ b/common/patches/laurion_ops.h @@ -30,6 +30,7 @@ E(OP_HPUpdate) E(OP_Damage) E(OP_Animation) E(OP_Death) +E(OP_MoveItem) //list of packets we need to decode on the way in: D(OP_EnterWorld) D(OP_ZoneEntry) @@ -42,6 +43,7 @@ D(OP_Consider) D(OP_ConsiderCorpse) D(OP_ClickDoor) D(OP_SpawnAppearance) +D(OP_MoveItem) #undef E #undef D diff --git a/common/patches/laurion_structs.h b/common/patches/laurion_structs.h index 0d3eeb4bf..acc9ea78e 100644 --- a/common/patches/laurion_structs.h +++ b/common/patches/laurion_structs.h @@ -587,6 +587,22 @@ namespace Laurion { /*040*/ }; + struct DeleteItem_Struct + { + /*0000*/ InventorySlot_Struct from_slot; + /*0012*/ InventorySlot_Struct to_slot; + /*0024*/ uint32 number_in_stack; + /*0028*/ + }; + + struct MoveItem_Struct + { + /*0000*/ InventorySlot_Struct from_slot; + /*0012*/ InventorySlot_Struct to_slot; + /*0024*/ uint32 number_in_stack; + /*0028*/ + }; + #pragma pack() }; //end namespace structs diff --git a/utils/patches/patch_Laurion.conf b/utils/patches/patch_Laurion.conf index e5e7042ea..83d02608a 100644 --- a/utils/patches/patch_Laurion.conf +++ b/utils/patches/patch_Laurion.conf @@ -228,7 +228,7 @@ OP_WhoAllRequest=0x0000 OP_WhoAllResponse=0x0000 OP_FriendsWho=0x0000 OP_ConfirmDelete=0x0000 -OP_Logout=0x0000 +OP_Logout=0x771d OP_Rewind=0x0000 OP_TargetCommand=0x3b18 OP_Hide=0x0000 diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index dbd438295..fa6244829 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4317,13 +4317,23 @@ void Client::Handle_OP_Camp(const EQApplicationPacket *app) if (IsLFP()) worldserver.StopLFP(CharacterID()); - if (GetGM()) - { - OnDisconnect(true); - return; + if (ClientVersion() >= EQ::versions::ClientVersion::Laurion) { + if (!GetGM()) { + camp_timer.Start(29000, true); + } + + auto outapp = new EQApplicationPacket(OP_Camp, 1); + FastQueuePacket(&outapp); + } + else { + if (GetGM()) + { + OnDisconnect(true); + return; + } + + camp_timer.Start(29000, true); } - camp_timer.Start(29000, true); - return; } void Client::Handle_OP_CancelTask(const EQApplicationPacket *app) diff --git a/zone/exp.cpp b/zone/exp.cpp index be6b8af2b..3fe8094db 100644 --- a/zone/exp.cpp +++ b/zone/exp.cpp @@ -657,7 +657,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool } else if (zone->IsHotzone()) { Message(Chat::Experience, "You gain party experience (with a bonus)!"); } else { - MessageString(Chat::Experience, GAIN_GROUPXP); + if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) { + MessageString(Chat::Experience, GAIN_GROUPXP, exp_percent_message.c_str()); + } + else { + MessageString(Chat::Experience, GAIN_GROUPXP); + } } } else if (IsRaidGrouped()) { if (RuleI(Character, ShowExpValues) > 0) { @@ -665,7 +670,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool } else if (zone->IsHotzone()) { Message(Chat::Experience, "You gained raid experience (with a bonus)!"); } else { - MessageString(Chat::Experience, GAIN_RAIDEXP); + if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) { + MessageString(Chat::Experience, GAIN_RAIDEXP, exp_percent_message.c_str()); + } + else { + MessageString(Chat::Experience, GAIN_RAIDEXP); + } } } else { if (RuleI(Character, ShowExpValues) > 0) { @@ -673,7 +683,12 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool } else if (zone->IsHotzone()) { Message(Chat::Experience, "You gain experience (with a bonus)!"); } else { - MessageString(Chat::Experience, GAIN_XP); + if (m_ClientVersion >= EQ::versions::ClientVersion::Laurion) { + MessageString(Chat::Experience, GAIN_XP, exp_percent_message.c_str()); + } + else { + MessageString(Chat::Experience, GAIN_XP); + } } } }