This commit is contained in:
1
2025-11-16 20:30:17 +00:00
parent 2e3b52b3de
commit 5dbff2411c
70 changed files with 653 additions and 373 deletions

View File

@@ -17,7 +17,7 @@ func (h Controller) UserItemList(data *item.ItemListInboundInfo, c *player.Playe
result = &item.ItemListOutboundInfo{}
result.ItemList = make([]model.SingleItemInfo, 0)
item := c.Service.Item(data.Param1, data.Param2)
item := c.Service.Item.Get(data.Param1, data.Param2)
for _, v := range item {
var vv model.SingleItemInfo
vv.ItemId = v.ItemId
@@ -87,7 +87,7 @@ func (h Controller) ChangePlayerCloth(data *item.ChangePlayerClothInboundInfo, c
}
func (h Controller) Talk(data *item.TalkCountInboundInfo, c *player.Player) (result *item.TalkCountOutboundInfo, err errorcode.ErrorCode) {
result = &item.TalkCountOutboundInfo{}
c.Service.Talk(func(t map[uint32]uint32) bool {
c.Service.Talk.Exec(func(t map[uint32]uint32) bool {
tt, ok := t[data.ID]
if ok {
@@ -122,7 +122,7 @@ func (h Controller) TalkCate(data *item.TalkCateInboundInfo, c *player.Player) (
// 2. 生成 1-10 的随机数rand.Intn(10) → 0-9+1 后范围变为 1-10
randomNum := rand.Intn(10) + 1
c.Service.Talk(func(t map[uint32]uint32) bool {
c.Service.Talk.Exec(func(t map[uint32]uint32) bool {
if t == nil {
t = make(map[uint32]uint32)