fix(fight): 修复战斗中属性变化与暴击判定逻辑
- 调整能力提升计算时机,确保命中后再恢复原始属性 - 暴击判断前置,仅在命中时计算暴击翻倍及破防逻辑 - 优化回合结束效果清除逻辑,增加状态存活判断 refactor(controller): 重构擂台相关接口返回结构体类型 - 将 ARENA_SET_OWENR、ARENA_FIGHT_OWENR 等函数的返回值统一改为 NullOutboundInfo,并移除冗余字段返回 - 广播逻辑调整,统一使用 Broadcast
This commit is contained in:
@@ -13,12 +13,12 @@ func (h *Controller) NonoFollowOrHome(data *nono.NonoFollowOrHomeInInfo, c *play
|
||||
c.Info.NONO.Flag = data.Flag
|
||||
result = &nono.NonoFollowOutInfo{
|
||||
|
||||
UserID: data.Head.UserID,
|
||||
UserID: data.Head.UserID,
|
||||
SuperStage: data.Flag,
|
||||
Flag: data.Flag,
|
||||
Nick: "",
|
||||
Color: 0,
|
||||
Power: 0,
|
||||
Flag: data.Flag,
|
||||
Nick: "",
|
||||
Color: 0,
|
||||
Power: 0,
|
||||
}
|
||||
|
||||
return
|
||||
@@ -44,14 +44,17 @@ func (h *Controller) SwitchFlying(data *nono.SwitchFlyingInboundInfo, c *player.
|
||||
|
||||
result = &nono.SwitchFlyingOutboundInfo{
|
||||
UserId: data.Head.UserID,
|
||||
Type: data.Type,
|
||||
Type: data.Type,
|
||||
}
|
||||
|
||||
c.GetSpace().Broadcast(c, data.Head.CMD, result)
|
||||
return
|
||||
}
|
||||
|
||||
func (h *Controller) PlayerPetCure(data *nono.PetCureInboundInfo, c *player.Player) (result *nono.PetCureOutboundEmpty, err errorcode.ErrorCode) { //这个时候player应该是空的
|
||||
|
||||
if c.GetSpace().Owner.UserID == c.Info.UserID {
|
||||
return result, errorcode.ErrorCodes.ErrChampionCannotHeal
|
||||
}
|
||||
for i := 0; i < len(c.Info.PetList); i++ {
|
||||
c.Info.PetList[i].Cure()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user