fix: fix avatar sandbox load user overwriting cache
This commit is contained in:
parent
431ef7ee73
commit
3b0f079a2f
1 changed files with 15 additions and 13 deletions
|
|
@ -384,6 +384,7 @@ async function LoadUser(id) {
|
|||
Avatar.items = [];
|
||||
|
||||
data.assets.forEach((item) => {
|
||||
if (ItemCache[item.id] === undefined) {
|
||||
ItemCache[item.id] = {
|
||||
type: item.type,
|
||||
name: item.name,
|
||||
|
|
@ -393,12 +394,13 @@ async function LoadUser(id) {
|
|||
asset: item.path
|
||||
}
|
||||
|
||||
if (item.type === 'hat' || item.type === 'tool') {
|
||||
if (item.type === 'hat' || item.type === 'tool' || item.type === 'torso') {
|
||||
ItemCache[item.id].creator = {
|
||||
id: 1,
|
||||
name: "Polytoria"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.type === 'hat') {
|
||||
ItemCache[item.id].accessoryType = item.accessoryType
|
||||
|
|
|
|||
Reference in a new issue