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:
@@ -130,10 +130,20 @@ var meetpet = make(map[int]model.PetInfo)
|
||||
func initmeetpet() {
|
||||
meetpet = make(map[int]model.PetInfo)
|
||||
for i, v := range xmlres.PetMAP {
|
||||
if v.EvolvesTo == 0 && v.EvolvFlag == 0 && v.ID < 2000 {
|
||||
r := model.GenPetInfo(int(v.ID), 24, -1, -1, -1, 100)
|
||||
meetpet[i] = *r
|
||||
|
||||
if v.EvolvesTo != 0 {
|
||||
continue
|
||||
}
|
||||
if v.EvolvFlag != 0 {
|
||||
continue
|
||||
}
|
||||
if v.ID > 2000 {
|
||||
continue
|
||||
}
|
||||
|
||||
r := model.GenPetInfo(int(v.ID), 24, -1, -1, -1, 100)
|
||||
|
||||
meetpet[i] = *r
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user