The inventory's product list (test.showInventory) gets the community products the person has: local packs, and hub products in their library. Hiding one is answered by the proxy (and removes a hub product from the library). When the library changes, the client is told to load its inventory again, with the server event IMVU sends after a purchase. A product whose revision or info changes gets a new local ID, since the client keeps product info for good; names lose characters the client's pages could take as HTML. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c281fb572c
commit
ca7a86ce89
8 files changed
+225
-5
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -157,8 +158,9 @@ func (s *state) saveLocked() error {
|
||||
func (s *state) productID(local int64) (string, bool) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
for id, l := range s.data.IDs {
|
||||
for key, l := range s.data.IDs {
|
||||
if l == local {
|
||||
id, _, _ := strings.Cut(key, "@") // keys are "<product>@<version>" (versionKey)
|
||||
return id, true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user