mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 15:57:13 +00:00
fix(character): the character data packet sends txfring=true, as live
LWOInventoryComponent_Client::LoadConfigData (0x00cde200) reads txfring from the character data; without it the client runs its inventory-full tips (msgPlayerReady 0x00bde5e0) on every world load. Of 226 captured live character data packets, 222 had the key, all true; the server never wrote it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -250,6 +250,7 @@ namespace ClientPackets {
|
||||
ldfData.Insert<int32_t>(u"chatmode", chatMode);
|
||||
ldfData.Insert<int64_t>(u"reputation", reputation);
|
||||
ldfData.Insert<int32_t>(u"propertycloneid", propertyCloneID);
|
||||
if (txfring) ldfData.Insert<bool>(u"txfring", true);
|
||||
|
||||
data.Write<uint32_t>(ldfData.values.size());
|
||||
for (const auto& toSerialize : ldfData | std::views::values) toSerialize->WriteToPacket(data);
|
||||
@@ -307,6 +308,7 @@ namespace ClientPackets {
|
||||
if (decompressedSize != static_cast<int32_t>(uncompressedSize)) return false;
|
||||
|
||||
RakNet::BitStream data(uncompressed.data(), uncompressed.size(), false);
|
||||
txfring = false; // the client's value without the key
|
||||
uint32_t count{};
|
||||
VALIDATE_READ(data.Read(count));
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
@@ -343,6 +345,12 @@ namespace ClientPackets {
|
||||
if (key == u"xmlData") xmlData = value;
|
||||
break;
|
||||
}
|
||||
case LDF_TYPE_BOOLEAN: {
|
||||
uint8_t value{};
|
||||
VALIDATE_READ(data.Read(value));
|
||||
if (key == u"txfring") txfring = value != 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false; // CreateCharacter never uses other types
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user