mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-15 09:04:10 +00:00
fix(wire): write SetStatusImmunity flags in the client's order
WIRE FIX. The 1.10.64 client writes and reads the immunity flags in alphabetical order after the u32 state (GameMessage::SetStatusImmunity:: Serialize @ 0x00d8f140; the field offsets are named by the Flash export at 0x00d8f410): BasicAttack, DOT, ImaginationGain, ImaginationLoss, Interrupt, Knockback, PullToPoint, QuickbuildInterrupt, Speed. DLU wrote them in declaration order, so e.g. a knockback immunity reached the client as an imagination-gain immunity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -273,29 +273,30 @@ namespace GameMessages {
|
||||
}
|
||||
|
||||
void SetStatusImmunity::Serialize(RakNet::BitStream& bitStream) const {
|
||||
// The client's order (0x00d8f140): alphabetical.
|
||||
bitStream.Write(StateChangeType);
|
||||
bitStream.Write(bImmuneToBasicAttack);
|
||||
bitStream.Write(bImmuneToDOT);
|
||||
bitStream.Write(bImmuneToKnockback);
|
||||
bitStream.Write(bImmuneToInterrupt);
|
||||
bitStream.Write(bImmuneToSpeed);
|
||||
bitStream.Write(bImmuneToImaginationGain);
|
||||
bitStream.Write(bImmuneToImaginationLoss);
|
||||
bitStream.Write(bImmuneToQuickbuildInterrupt);
|
||||
bitStream.Write(bImmuneToInterrupt);
|
||||
bitStream.Write(bImmuneToKnockback);
|
||||
bitStream.Write(bImmuneToPullToPoint);
|
||||
bitStream.Write(bImmuneToQuickbuildInterrupt);
|
||||
bitStream.Write(bImmuneToSpeed);
|
||||
}
|
||||
|
||||
bool SetStatusImmunity::Deserialize(RakNet::BitStream& bitStream) {
|
||||
VALIDATE_READ(bitStream.Read(StateChangeType));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToBasicAttack));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToDOT));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToKnockback));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToInterrupt));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToSpeed));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToImaginationGain));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToImaginationLoss));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToQuickbuildInterrupt));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToInterrupt));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToKnockback));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToPullToPoint));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToQuickbuildInterrupt));
|
||||
VALIDATE_READ(bitStream.Read(bImmuneToSpeed));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user