feat(game): 添加蛋类游戏道具检查和闪光配置删除保护

- 在蛋类游戏玩法中添加道具数量检查,确保玩家拥有足够的道具
- 防止道具不足时的游戏错误
- 为闪光配置服务添加删除方法的保护,避免意外删除操作
```
This commit is contained in:
2025-12-31 00:29:38 +08:00
parent f770ccc06f
commit 2dcf80f694
2 changed files with 8 additions and 0 deletions

View File

@@ -35,6 +35,9 @@ func NewShinyService() *ShinyService {
func (s *ShinyService) ModifyBefore(ctx context.Context, method string, param g.MapStrAny) (err error) {
var t data.GlowFilter
if method == "Delete" {
return nil
}
r := json.Unmarshal([]byte(gconv.String(param["color"])), &t)
if r != nil {
return r