mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 12:18:27 +00:00
Move Netcode logging to LogNetcode
This commit is contained in:
+15
-15
@@ -85,7 +85,7 @@ namespace RoF2
|
||||
//TODO: figure out how to support shared memory with multiple patches...
|
||||
opcodes = new RegularOpcodeManager();
|
||||
if (!opcodes->LoadOpcodes(opfile.c_str())) {
|
||||
Log(Logs::General, Logs::Netcode, "[OPCODES] Error loading opcodes file %s. Not registering patch %s.", opfile.c_str(), name);
|
||||
LogNetcode("[OPCODES] Error loading opcodes file [{}]. Not registering patch [{}]", opfile.c_str(), name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ namespace RoF2
|
||||
|
||||
|
||||
|
||||
Log(Logs::General, Logs::Netcode, "[IDENTIFY] Registered patch %s", name);
|
||||
LogNetcode("[StreamIdentify] Registered patch [{}]", name);
|
||||
}
|
||||
|
||||
void Reload()
|
||||
@@ -128,10 +128,10 @@ namespace RoF2
|
||||
opfile += name;
|
||||
opfile += ".conf";
|
||||
if (!opcodes->ReloadOpcodes(opfile.c_str())) {
|
||||
Log(Logs::General, Logs::Netcode, "[OPCODES] Error reloading opcodes file %s for patch %s.", opfile.c_str(), name);
|
||||
LogNetcode("[OPCODES] Error reloading opcodes file [{}] for patch [{}]", opfile.c_str(), name);
|
||||
return;
|
||||
}
|
||||
Log(Logs::General, Logs::Netcode, "[OPCODES] Reloaded opcodes for patch %s", name);
|
||||
LogNetcode("[OPCODES] Reloaded opcodes for patch [{}]", name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ namespace RoF2
|
||||
|
||||
if (EntryCount == 0 || (in->size % sizeof(BazaarSearchResults_Struct)) != 0)
|
||||
{
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(BazaarSearchResults_Struct));
|
||||
LogNetcode("[STRUCTS] Wrong size on outbound [{}]: Got [{}], expected multiple of [{}]", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(BazaarSearchResults_Struct));
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
@@ -657,7 +657,7 @@ namespace RoF2
|
||||
for (int index = 0; index < item_count; ++index, ++eq) {
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)eq->inst, eq->slot_id, 0, ItemPacketCharInventory);
|
||||
if (ob.tellp() == last_pos)
|
||||
Log(Logs::General, Logs::Netcode, "RoF2::ENCODE(OP_CharInventory) Serialization failed on item slot %d during OP_CharInventory. Item skipped.", eq->slot_id);
|
||||
LogNetcode("RoF2::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
last_pos = ob.tellp();
|
||||
}
|
||||
@@ -1589,7 +1589,7 @@ namespace RoF2
|
||||
|
||||
SerializeItem(ob, (const EQEmu::ItemInstance*)int_struct->inst, int_struct->slot_id, 0, old_item_pkt->PacketType);
|
||||
if (ob.tellp() == last_pos) {
|
||||
Log(Logs::General, Logs::Netcode, "RoF2::ENCODE(OP_ItemPacket) Serialization failed on item slot %d.", int_struct->slot_id);
|
||||
LogNetcode("RoF2::ENCODE(OP_ItemPacket) Serialization failed on item slot [{}]", int_struct->slot_id);
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
@@ -2688,7 +2688,7 @@ namespace RoF2
|
||||
// Think we need 1 byte of padding at the end
|
||||
outapp->WriteUInt8(0); // Unknown
|
||||
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Player Profile Packet is %i bytes", outapp->GetWritePosition());
|
||||
LogNetcode("[STRUCTS] Player Profile Packet is [{}] bytes", outapp->GetWritePosition());
|
||||
|
||||
auto NewBuffer = new unsigned char[outapp->GetWritePosition()];
|
||||
memcpy(NewBuffer, outapp->pBuffer, outapp->GetWritePosition());
|
||||
@@ -3520,7 +3520,7 @@ namespace RoF2
|
||||
|
||||
if (EntryCount == 0 || ((in->size % sizeof(Track_Struct))) != 0)
|
||||
{
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(Track_Struct));
|
||||
LogNetcode("[STRUCTS] Wrong size on outbound [{}]: Got [{}], expected multiple of [{}]", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(Track_Struct));
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
@@ -3946,7 +3946,7 @@ namespace RoF2
|
||||
//determine and verify length
|
||||
int entrycount = in->size / sizeof(Spawn_Struct);
|
||||
if (entrycount == 0 || (in->size % sizeof(Spawn_Struct)) != 0) {
|
||||
Log(Logs::General, Logs::Netcode, "[STRUCTS] Wrong size on outbound %s: Got %d, expected multiple of %d", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(Spawn_Struct));
|
||||
LogNetcode("[STRUCTS] Wrong size on outbound [{}]: Got [{}], expected multiple of [{}]", opcodes->EmuToName(in->GetOpcode()), in->size, sizeof(Spawn_Struct));
|
||||
delete in;
|
||||
return;
|
||||
}
|
||||
@@ -4278,7 +4278,7 @@ namespace RoF2
|
||||
Buffer += 29;
|
||||
if (Buffer != (BufferStart + PacketSize))
|
||||
{
|
||||
Log(Logs::General, Logs::Netcode, "[ERROR] SPAWN ENCODE LOGIC PROBLEM: Buffer pointer is now %i from end", Buffer - (BufferStart + PacketSize));
|
||||
LogNetcode("[ERROR] SPAWN ENCODE LOGIC PROBLEM: Buffer pointer is now [{}] from end", Buffer - (BufferStart + PacketSize));
|
||||
}
|
||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Sending zone spawn for %s packet is %i bytes", emu->name, outapp->size);
|
||||
//Log.Hex(Logs::Netcode, outapp->pBuffer, outapp->size);
|
||||
@@ -4859,7 +4859,7 @@ namespace RoF2
|
||||
return;
|
||||
}
|
||||
default:
|
||||
Log(Logs::Detail, Logs::Netcode, "Unhandled OP_GuildBank action");
|
||||
LogNetcode("Unhandled OP_GuildBank action");
|
||||
__packet->SetOpcode(OP_Unknown); /* invalidate the packet */
|
||||
return;
|
||||
}
|
||||
@@ -5012,7 +5012,7 @@ namespace RoF2
|
||||
emu->to_slot = RoF2ToServerSlot(eq->to_slot);
|
||||
IN(number_in_stack);
|
||||
|
||||
//Log(Logs::General, Logs::Netcode, "[RoF2] MoveItem Slot from %u to %u, Number %u", emu->from_slot, emu->to_slot, emu->number_in_stack);
|
||||
//LogNetcode("[RoF2] MoveItem Slot from [{}] to [{}], Number [{}]", emu->from_slot, emu->to_slot, emu->number_in_stack);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
}
|
||||
@@ -5966,7 +5966,7 @@ namespace RoF2
|
||||
RoF2Slot = server_corpse_slot;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Netcode, "Convert Server Corpse Slot %i to RoF2 Corpse Main Slot %i", server_corpse_slot, RoF2Slot);
|
||||
LogNetcode("Convert Server Corpse Slot [{}] to RoF2 Corpse Main Slot [{}]", server_corpse_slot, RoF2Slot);
|
||||
|
||||
return RoF2Slot;
|
||||
}
|
||||
@@ -6149,7 +6149,7 @@ namespace RoF2
|
||||
ServerSlot = rof2_corpse_slot;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Netcode, "Convert RoF2 Corpse Main Slot %i to Server Corpse Slot %i", rof2_corpse_slot, ServerSlot);
|
||||
LogNetcode("Convert RoF2 Corpse Main Slot [{}] to Server Corpse Slot [{}]", rof2_corpse_slot, ServerSlot);
|
||||
|
||||
return ServerSlot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user