```
fix(fight_boss): 修复NPC战斗中宠物ID和闪光属性处理逻辑 - 在NPC战斗中,当refPet.Ext不为0时,正确设置refPet.Id - 当refPet.Ext不为0且满足随机条件时,为怪物添加随机闪光属性 - 修正了宠物信息生成时的ID使用逻辑 fix(monster): 修正注释说明稀有精灵概率计算 - 更新注释说明,明确单个ID固定刷出时的概率变尼尔尼奥不是稀有精灵 refactor(player): 重构宠物闪光属性随机生成逻辑 - 简化OgrePetInfo.RandSHiny方法的条件判断逻辑 - 统一闪光属性随机生成的处理方式 fix(task): 修复任务奖励物品信息返回 - 修正任务奖励
This commit is contained in:
@@ -191,6 +191,7 @@ func (h Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundI
|
||||
}
|
||||
if refPet.Ext != 0 {
|
||||
refPet.Id = refPet.Ext
|
||||
|
||||
}
|
||||
monster := model.GenPetInfo(
|
||||
int(refPet.Id), -1,
|
||||
@@ -199,6 +200,11 @@ func (h Controller) OnPlayerFightNpcMonster(data1 *fight.FightNpcMonsterInboundI
|
||||
|
||||
int(refPet.Lv),
|
||||
refPet.ShinyInfo)
|
||||
if refPet.Ext != 0 {
|
||||
if grand.Meet(3, 100) {
|
||||
monster.RandShiny()
|
||||
}
|
||||
}
|
||||
|
||||
monsterInfo := &model.PlayerInfo{}
|
||||
monsterInfo.Nick = xmlres.PetMAP[int(monster.ID)].DefName
|
||||
|
||||
Reference in New Issue
Block a user