baltica 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/client.js +5 -6
- package/package.json +1 -1
package/dist/client/client.js
CHANGED
|
@@ -186,7 +186,7 @@ class Client extends utils_1.Emitter {
|
|
|
186
186
|
utils_2.Logger.info(`Please login at ${r.verificationUri}?otc=${r.userCode}`);
|
|
187
187
|
});
|
|
188
188
|
auth.on("login", async (result) => {
|
|
189
|
-
|
|
189
|
+
utils_2.Logger.info(`Logged in as §a${result.profile.username}§r`);
|
|
190
190
|
this.applyAuthResult(result);
|
|
191
191
|
resolve();
|
|
192
192
|
});
|
|
@@ -195,11 +195,10 @@ class Client extends utils_1.Emitter {
|
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
197
|
async applyAuthResult(result) {
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
this.profile = { name: gamertag, uuid, xuid };
|
|
198
|
+
const gamertag = result.profile.username || this.options.username;
|
|
199
|
+
const xuid = result.profile.xuid || "";
|
|
200
|
+
const uuid = result.profile.uuid || types_1.LoginData.nextUUID(gamertag);
|
|
201
|
+
this.profile = { name: result.profile.username, uuid, xuid };
|
|
203
202
|
this.loginData.payload = (0, types_1.createDefaultPayload)(this.options, this.profile);
|
|
204
203
|
if (this.options.skinData) {
|
|
205
204
|
Object.assign(this.loginData.payload, this.options.skinData);
|