From fd2a9566fe386477f52f754a2612fe2e2bc1cd6a Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 17 Aug 2025 08:46:05 -0400 Subject: [PATCH] Disabled/Removed DumpPacket, Logging, Type-casting cleanup --- source/WorldServer/Items/Items.cpp | 12 +++--------- source/WorldServer/client.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/source/WorldServer/Items/Items.cpp b/source/WorldServer/Items/Items.cpp index 98c4d36..9f35245 100644 --- a/source/WorldServer/Items/Items.cpp +++ b/source/WorldServer/Items/Items.cpp @@ -3621,9 +3621,6 @@ bool PlayerItemList::MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8 } } - LogWrite(PLAYER__ERROR, 0, "MoveItem", - "--Item: %u is locked %u", item_to ? item_to->details.unique_id : 0, item_to ? item_to->IsItemLocked() : 0 - ); if(item_to && item_to->IsItemLocked()) { MPlayerItems.releasewritelock(__FUNCTION__, __LINE__); return false; @@ -3712,10 +3709,7 @@ bool PlayerItemList::MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8 canMove = false; MPlayerItems.releasewritelock(__FUNCTION__, __LINE__); - - LogWrite(PLAYER__ERROR, 0, "MoveItem", - "--Item#2: %u is locked %u", item_to ? item_to->details.unique_id : 0, item_to ? item_to->IsItemLocked() : 0 - ); + if (item_to && canMove) MoveItem(item_to, item_from->details.inv_slot_id, item_from->details.slot_id, BASE_EQUIPMENT, true); @@ -5202,7 +5196,7 @@ bool Item::TryLockItem(LockReason reason) { // 1) No lock held? allow any first‐lock if (cur == LockReason::LockReason_None) { - details.lock_flags = static_cast(reason); + details.lock_flags = static_cast(reason); details.item_locked = true; return true; } @@ -5210,7 +5204,7 @@ bool Item::TryLockItem(LockReason reason) { // 2) Only House‐lock held, and we're adding Shop‐lock? allow if ((cur == LockReason::LockReason_House && reason == LockReason::LockReason_Shop) || (cur == LockReason::LockReason_Shop && reason == LockReason::LockReason_House)) { - details.lock_flags = static_cast(cur | reason); + details.lock_flags = static_cast(cur | reason); // item_locked already true return true; } diff --git a/source/WorldServer/client.cpp b/source/WorldServer/client.cpp index 29d1a0f..e963e74 100644 --- a/source/WorldServer/client.cpp +++ b/source/WorldServer/client.cpp @@ -2175,7 +2175,7 @@ bool Client::HandlePacket(EQApplicationPacket* app) { EQ2_CommandString remote(app->pBuffer, app->size); LogWrite(PACKET__DEBUG, 1, "Packet", "RemoteCmdMsg Packet dump:"); - DumpPacket(app); + //DumpPacket(app); commands.Process(remote.handler, &remote.command, this); } else //bad client, disconnect @@ -3472,7 +3472,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) { } else { LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#0: Unknown Item ID = %u", id); - DumpPacket(app); + //DumpPacket(app); } } else if (type == 1) { @@ -3513,7 +3513,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) { } else { LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#1: Unknown Item ID = %u", id); - DumpPacket(app); + //DumpPacket(app); } } else if (type == 2) { @@ -3554,7 +3554,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) { } else { LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#2: Unknown Item ID = %u", id); - DumpPacket(app); + //DumpPacket(app); } } else if (type == 4) { //spell effect @@ -3680,7 +3680,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) { } else { LogWrite(CCLIENT__ERROR, 0, "World", "Client::HandleExamineInfoRequest from %s: Unknown examine request: %i", GetPlayer()->GetName(), (int)type); - DumpPacket(app); + //DumpPacket(app); } safe_delete(request);