idz: Remove profile ext id

Turns out (while researching team creation) the profile ext id
is just the aime id. After creating a team a profile discovery
request is immediately issued with the "profile id" in the field
that holds the aime id during initial profile load.
This commit is contained in:
Tau
2019-11-06 17:28:30 -05:00
parent 7c96253160
commit c2b0bcabc4
70 changed files with 238 additions and 341 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
import { RequestCode } from "./_defs";
import { ExtId, RouteNo } from "../model/base";
import { Profile } from "../model/profile";
import { Team } from "../model/team";
import {
LoadTopTenRequest,
LoadTopTenRequestSelector,
} from "../request/loadTopTen";
import { AimeId } from "../../model";
loadTopTen1.msgCode = 0x00b5 as RequestCode;
loadTopTen1.msgLen = 0x00e0;
@@ -30,7 +30,7 @@ export function loadTopTen1(buf: Buffer): LoadTopTenRequest {
field_C4: buf.readUInt8(0x00c4), // Boolean, true if profile ID is set
field_C5: buf.readUInt8(0x00c5), // Always zero
field_C6: buf.readUInt16LE(0x00c6),
profileId: profileId !== 0 ? (profileId as ExtId<Profile>) : undefined,
aimeId: profileId !== 0 ? (profileId as AimeId) : undefined,
teamId: teamId !== 0xffffffff ? (teamId as ExtId<Team>) : undefined,
};
}