File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,11 @@ type RankUpdate struct {
417417 WinCount int
418418}
419419
420+ // SteamID64 converts SteamID32 from the 32-bit SteamID to a 64-bit variant
421+ func (ru RankUpdate ) SteamID64 () uint64 {
422+ return common .ConvertSteamID32To64 (uint32 (ru .SteamID32 ))
423+ }
424+
420425// ItemEquip signals an item was equipped.
421426// This event is not available in all demos.
422427type ItemEquip struct {
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ func TestBombEvents(t *testing.T) {
4343 }
4444}
4545
46+ func TestRankUpdate_SteamID64 (t * testing.T ) {
47+ event := RankUpdate {SteamID32 : 52686539 }
48+
49+ assert .Equal (t , uint64 (76561198012952267 ), event .SteamID64 ())
50+ }
51+
4652type demoInfoProviderMock struct {
4753}
4854
You can’t perform that action at this time.
0 commit comments