Disabled/Removed DumpPacket, Logging, Type-casting cleanup

This commit is contained in:
Emagi 2025-08-17 08:46:05 -04:00
parent 879a00676c
commit fd2a9566fe
2 changed files with 8 additions and 14 deletions

View File

@ -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()) { if(item_to && item_to->IsItemLocked()) {
MPlayerItems.releasewritelock(__FUNCTION__, __LINE__); MPlayerItems.releasewritelock(__FUNCTION__, __LINE__);
return false; return false;
@ -3713,9 +3710,6 @@ bool PlayerItemList::MoveItem(sint32 to_bag_id, int16 from_index, sint8 to, int8
MPlayerItems.releasewritelock(__FUNCTION__, __LINE__); 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) if (item_to && canMove)
MoveItem(item_to, item_from->details.inv_slot_id, item_from->details.slot_id, BASE_EQUIPMENT, true); 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 firstlock // 1) No lock held? allow any firstlock
if (cur == LockReason::LockReason_None) { if (cur == LockReason::LockReason_None) {
details.lock_flags = static_cast<uint32_t>(reason); details.lock_flags = static_cast<uint32>(reason);
details.item_locked = true; details.item_locked = true;
return true; return true;
} }
@ -5210,7 +5204,7 @@ bool Item::TryLockItem(LockReason reason) {
// 2) Only Houselock held, and we're adding Shoplock? allow // 2) Only Houselock held, and we're adding Shoplock? allow
if ((cur == LockReason::LockReason_House && reason == LockReason::LockReason_Shop) || if ((cur == LockReason::LockReason_House && reason == LockReason::LockReason_Shop) ||
(cur == LockReason::LockReason_Shop && reason == LockReason::LockReason_House)) { (cur == LockReason::LockReason_Shop && reason == LockReason::LockReason_House)) {
details.lock_flags = static_cast<uint32_t>(cur | reason); details.lock_flags = static_cast<uint32>(cur | reason);
// item_locked already true // item_locked already true
return true; return true;
} }

View File

@ -2175,7 +2175,7 @@ bool Client::HandlePacket(EQApplicationPacket* app) {
EQ2_CommandString remote(app->pBuffer, app->size); EQ2_CommandString remote(app->pBuffer, app->size);
LogWrite(PACKET__DEBUG, 1, "Packet", "RemoteCmdMsg Packet dump:"); LogWrite(PACKET__DEBUG, 1, "Packet", "RemoteCmdMsg Packet dump:");
DumpPacket(app); //DumpPacket(app);
commands.Process(remote.handler, &remote.command, this); commands.Process(remote.handler, &remote.command, this);
} }
else //bad client, disconnect else //bad client, disconnect
@ -3472,7 +3472,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) {
} }
else { else {
LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#0: Unknown Item ID = %u", id); LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#0: Unknown Item ID = %u", id);
DumpPacket(app); //DumpPacket(app);
} }
} }
else if (type == 1) { else if (type == 1) {
@ -3513,7 +3513,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) {
} }
else { else {
LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#1: Unknown Item ID = %u", id); LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#1: Unknown Item ID = %u", id);
DumpPacket(app); //DumpPacket(app);
} }
} }
else if (type == 2) { else if (type == 2) {
@ -3554,7 +3554,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) {
} }
else { else {
LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#2: Unknown Item ID = %u", id); LogWrite(WORLD__ERROR, 0, "World", "HandleExamineInfoRequest#2: Unknown Item ID = %u", id);
DumpPacket(app); //DumpPacket(app);
} }
} }
else if (type == 4) { //spell effect else if (type == 4) { //spell effect
@ -3680,7 +3680,7 @@ void Client::HandleExamineInfoRequest(EQApplicationPacket* app) {
} }
else { else {
LogWrite(CCLIENT__ERROR, 0, "World", "Client::HandleExamineInfoRequest from %s: Unknown examine request: %i", GetPlayer()->GetName(), (int)type); LogWrite(CCLIENT__ERROR, 0, "World", "Client::HandleExamineInfoRequest from %s: Unknown examine request: %i", GetPlayer()->GetName(), (int)type);
DumpPacket(app); //DumpPacket(app);
} }
safe_delete(request); safe_delete(request);