fix(fight_boss): 调整Boss捕捉逻辑位置以确保正确执行
将Boss捕捉率获取逻辑从循环外移至循环内,确保在处理Boss宠物信息之后再进行捕捉率赋值。 feat(pet): 新增协议结构体定义用于学习力相关操作 新增C2S_9756与S2C_9756结构体,支持学习力相关的客户端请求与服务端响应处理。
This commit is contained in:
@@ -71,9 +71,7 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
|
||||
if bc.TaskID != nil {
|
||||
taskid = *bc.TaskID
|
||||
}
|
||||
if bc.BossCatchable == 1 {
|
||||
cancpet = xmlres.PetMAP[int(mo.ID)].CatchRate
|
||||
}
|
||||
|
||||
for _, bm := range bc.BossMon {
|
||||
|
||||
mo = c.GenPetInfo(
|
||||
@@ -88,6 +86,9 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
|
||||
moinfo.PetList = append(moinfo.PetList, *mo)
|
||||
|
||||
}
|
||||
if bc.BossCatchable == 1 {
|
||||
cancpet = xmlres.PetMAP[int(mo.ID)].CatchRate
|
||||
}
|
||||
moinfo.Nick = xmlres.PetMAP[int(mo.ID)].DefName
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user