Refresh user/world players in instance count 1

This commit is contained in:
Natsumi
2021-06-02 07:18:34 +12:00
parent ad85eb8c55
commit 12b299da20

View File

@@ -5507,7 +5507,6 @@ speechSynthesis.getVoices();
}
var ctx = this.friends.get(userId);
if ((typeof ctx.ref !== 'undefined') &&
(ctx.ref.location !== 'private') &&
(ctx.state === 'online')) {
if (ctx.isVIP) {
removeFromArray(this.friendsGroupA_, ctx);
@@ -8287,15 +8286,21 @@ speechSynthesis.getVoices();
}
users.sort(compareByLocationAt);
D.users = users;
if (!L.worldId) {
return;
}
if (this.lastLocation.location === L.tag) {
if ((L.worldId) &&
(this.lastLocation.location === D.ref.location)) {
D.instance = {
id: L.tag,
id: D.ref.location,
occupants: this.lastLocation.playerList.length
};
}
if ((L.isOffline) ||
(L.isPrivate) ||
(L.worldId === '')) {
D.instance = {
id: D.ref.location,
occupants: 0
};
}
};
$app.methods.setUserDialogWorlds = function (userId) {
@@ -8828,16 +8833,13 @@ speechSynthesis.getVoices();
}
var lastLocation$ = API.parseLocation(this.lastLocation.location);
var playersInInstance = this.lastLocation.playerList;
if ((lastLocation$.worldId === D.id) && (playersInInstance.length > 0)) {
var instance = instances[lastLocation$.instanceId];
if (typeof instance === 'undefined') {
instance = {
id: lastLocation$.instanceId,
occupants: playersInInstance.length,
users: []
};
instances[instance.id] = instance;
}
if (lastLocation$.worldId === D.id) {
instance = {
id: lastLocation$.instanceId,
occupants: playersInInstance.length,
users: []
};
instances[instance.id] = instance;
var ref = API.cachedUsers.get(API.currentUser.id);
if (typeof ref === 'undefined') {
ref = API.currentUser;