fix(fight_boss): 修复 boss 战斗中索引为 0 的异常处理逻辑
当 effect 索引为 0 时,跳过无效处理以避免潜在错误。 feat(task): 更新任务奖励与注册参数配置 - 移除任务 37 中的注释项并保留有效奖励 - 修改任务 91 注册参数为 246 - 清空任务 300 的物品奖励列表,并设置类型为 30 refactor(fight_input): 优化 meetpet 初始化条件判断 将多个判断条件拆分为独立 if 判断语句,提高代码可读性。 refactor(effect_service): 移除 Scan 错误检查冗余逻辑 简化数据库查询后的错误处理流程,提升
This commit is contained in:
@@ -17,10 +17,8 @@ func (s *EffectService) Args(id uint32) (int, []int) {
|
||||
|
||||
m := cool.DBM(s.Model).Where("se_idx", id)
|
||||
var tt model.PlayerPetSpecialEffect
|
||||
err := m.Scan(&tt)
|
||||
if err != nil {
|
||||
return 0, nil
|
||||
}
|
||||
m.Scan(&tt)
|
||||
|
||||
return tt, nil
|
||||
}, 0)
|
||||
tt := ret.Interface().(model.PlayerPetSpecialEffect)
|
||||
|
||||
Reference in New Issue
Block a user