You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
Merge pull request #103 from simoleo89/fix/userprofile-totalbadges
fix(communication): read trailing totalBadges int in UserProfileParser
This commit is contained in:
@@ -89,6 +89,7 @@ export class UserProfileParser implements IMessageParser
|
||||
// block 2: card background (1 int)
|
||||
// block 3: nick icon (1 string)
|
||||
// block 4: prefix decoration set (6 strings)
|
||||
// block 5: total badge count (1 int)
|
||||
// Each tier early-returns to keep the parser tolerant of older
|
||||
// servers that don't ship the later blocks. Defaults set by flush().
|
||||
if(!wrapper.bytesAvailable) return true;
|
||||
@@ -114,6 +115,10 @@ export class UserProfileParser implements IMessageParser
|
||||
this._prefixFont = wrapper.readString();
|
||||
this._displayOrder = wrapper.readString();
|
||||
|
||||
if(!wrapper.bytesAvailable) return true;
|
||||
|
||||
this._totalBadges = wrapper.readInt();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user