Core/Logger: Add basic account-info to addon-scans to make them a little bit more useful (@Aokromes, you can stop asking for this now...)
This commit is contained in:
1 parent
be9294dc09
commit
e040c56d45
2 files changed
+10
-10
No files matched your search
@@ -951,7 +951,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
|
||||
if (size > 0xFFFFF)
|
||||
{
|
||||
TC_LOG_ERROR("misc", "WorldSession::ReadAddonsInfo addon info too big, size %u", size);
|
||||
TC_LOG_DEBUG("addon", "WorldSession::ReadAddonsInfo: AddOnInfo too big, size %u", size);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
|
||||
addonInfo >> enabled >> crc >> unk1;
|
||||
|
||||
TC_LOG_DEBUG("misc", "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
|
||||
TC_LOG_DEBUG("addon", "AddOn: %s (CRC: 0x%x) - enabled: 0x%x - Unknown2: 0x%x", addonName.c_str(), crc, enabled, unk1);
|
||||
|
||||
AddonInfo addon(addonName, enabled, crc, 2, true);
|
||||
|
||||
@@ -989,15 +989,14 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
if (savedAddon)
|
||||
{
|
||||
if (addon.CRC != savedAddon->CRC)
|
||||
TC_LOG_ERROR("misc", "ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
|
||||
TC_LOG_WARN("addon", " Addon: %s: modified (CRC: 0x%x) - accountID %d)", addon.Name.c_str(), savedAddon->CRC, GetAccountId());
|
||||
else
|
||||
TC_LOG_DEBUG("misc", "ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
|
||||
TC_LOG_DEBUG("addon", "Addon: %s: validated (CRC: 0x%x) - accountID %d", addon.Name.c_str(), savedAddon->CRC, GetAccountId());
|
||||
}
|
||||
else
|
||||
{
|
||||
AddonMgr::SaveAddon(addon);
|
||||
|
||||
TC_LOG_DEBUG("misc", "ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
|
||||
TC_LOG_WARN("addon", "Addon: %s: unknown (CRC: 0x%x) - accountId %d (storing addon name and checksum to database)", addon.Name.c_str(), addon.CRC, GetAccountId());
|
||||
}
|
||||
|
||||
/// @todo Find out when to not use CRC/pubkey, and other possible states.
|
||||
@@ -1006,10 +1005,10 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
|
||||
|
||||
uint32 currentTime;
|
||||
addonInfo >> currentTime;
|
||||
TC_LOG_DEBUG("network", "ADDON: CurrentTime: %u", currentTime);
|
||||
TC_LOG_DEBUG("addon", "AddOn: CurrentTime: %u", currentTime);
|
||||
}
|
||||
else
|
||||
TC_LOG_ERROR("misc", "Addon packet uncompress error!");
|
||||
TC_LOG_DEBUG("addon", "AddOn: Addon packet uncompress error!");
|
||||
}
|
||||
|
||||
void WorldSession::SendAddonsInfo()
|
||||
@@ -1048,8 +1047,8 @@ void WorldSession::SendAddonsInfo()
|
||||
data << uint8(usepk);
|
||||
if (usepk) // if CRC is wrong, add public key (client need it)
|
||||
{
|
||||
TC_LOG_DEBUG("misc", "ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
|
||||
itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC);
|
||||
TC_LOG_DEBUG("addon", "AddOn: %s: CRC checksum mismatch: got 0x%x - expected 0x%x - sending pubkey to accountID %d",
|
||||
itr->Name.c_str(), itr->CRC, STANDARD_ADDON_CRC, GetAccountId());
|
||||
|
||||
data.append(addonPublicKey, sizeof(addonPublicKey));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user