This commit is contained in:
Natsumi
2025-09-26 05:27:18 +12:00
parent 001a79b83c
commit b0517237ed
8 changed files with 46 additions and 95 deletions

View File

@@ -1020,7 +1020,7 @@ export const useUserStore = defineStore('User', () => {
});
}
D.$location = L;
L.user = null;
L.user = {};
if (L.userId) {
ref = cachedUsers.get(L.userId);
if (typeof ref === 'undefined') {
@@ -1103,9 +1103,10 @@ export const useUserStore = defineStore('User', () => {
}
D.users = users;
if (
L.worldId &&
currentLocation === L.tag &&
playersInInstance.size > 0
(L.worldId &&
currentLocation === L.tag &&
playersInInstance.size > 0) ||
!L.isRealInstance
) {
D.instance = {
id: L.instanceId,
@@ -1117,17 +1118,6 @@ export const useUserStore = defineStore('User', () => {
ref: {}
};
}
if (!L.isRealInstance) {
D.instance = {
id: L.instanceId,
tag: L.tag,
$location: L,
friendCount: 0,
users: [],
shortName: '',
ref: {}
};
}
const instanceRef = instanceStore.cachedInstances.get(L.tag);
if (typeof instanceRef !== 'undefined') {
D.instance.ref = instanceRef;