```
feat(cache): 添加复合键缓存操作支持 添加了基于 uint32+string 组合键的缓存操作方法,包括 GetByCompoundKey、SetByCompoundKey、DelByCompoundKey 和 ContainsByCompoundKey 方法,用于处理用户ID和会话ID的组合缓存场景 fix(vscode): 添加 cSpell 配置支持 struc 词汇 refactor(session): 移除过时的会话管理方法 移除了基于单一字符串键的会话管理方法,因为已迁移到使用 复合键的缓存操作方式 ```
This commit is contained in:
@@ -2,7 +2,7 @@ package controller
|
||||
|
||||
import (
|
||||
"blazing/common/socket/errorcode"
|
||||
"blazing/modules/blazing/model"
|
||||
"blazing/modules/player/model"
|
||||
|
||||
"blazing/logic/service/pet"
|
||||
"blazing/logic/service/player"
|
||||
@@ -55,10 +55,19 @@ func (h Controller) GetAllFurniture(data *room.FitmentAllInboundEmpty, c *player
|
||||
result = &room.FitmentAllOutboundInfo{}
|
||||
result.Fitments = make([]room.FitmentItemInfo, 0)
|
||||
|
||||
items := c.Service.Item.Get(500000, 600000)
|
||||
roomData := c.Service.Room.Get(c.Info.UserID)
|
||||
for itemID, count := range roomData.OwnedItems {
|
||||
result.Fitments = append(result.Fitments, room.FitmentItemInfo{Id: itemID, AllCount: count, UsedCount: roomData.UserItems[itemID]})
|
||||
for _, item := range items {
|
||||
var itemInfo room.FitmentItemInfo
|
||||
itemInfo.Id = item.ItemId
|
||||
itemInfo.AllCount = item.ItemCnt
|
||||
i, ok := roomData.UsedItems[item.ItemId]
|
||||
if ok {
|
||||
itemInfo.UsedCount = i
|
||||
}
|
||||
result.Fitments = append(result.Fitments, itemInfo)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user