feat(item_buy): 优化购买逻辑并添加库存限制功能 - 将变量名 is 改为 ok,提高代码可读性 - 移除未使用的变量 addSuccess - 重构购买成功逻辑,确保物品添加成功后才扣减金币 - 在 talk.go 中修改判断条件,使用 Limit 字段而非 Type 字段 - 在 user_talk.go 中添加 Limit 字段用于限制数量配置 ```
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *TalkService) Cheak(mapid uint32, flag int) (int, bool) {
|
||||
if c == nil {
|
||||
return 0, false //没在地图
|
||||
}
|
||||
switch c.Type {
|
||||
switch c.Limit {
|
||||
case 0:
|
||||
if !utils.IsToday(talks.LastResetTime) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user