feat(fight): 新增试炼之塔和勇者之塔地图切换功能,优化战斗效果处理逻辑
This commit is contained in:
@@ -15,16 +15,30 @@ func (h Controller) FRESH_CHOICE_FIGHT_LEVEL(data *fight.C2S_FRESH_CHOICE_FIGHT_
|
||||
switch data.Head.CMD {
|
||||
case 2428: //试炼之塔
|
||||
c.Info.CurrentFreshStage = utils.Max(c.Info.CurrentFreshStage, 1)
|
||||
c.Info.MapID = 500
|
||||
result.CurFightLevel = uint(c.Info.CurrentFreshStage)
|
||||
case 2414: //勇者之塔
|
||||
c.Info.CurrentStage = utils.Max(c.Info.CurrentStage, 1)
|
||||
c.Info.MapID = 600
|
||||
result.CurFightLevel = uint(c.Info.CurrentStage)
|
||||
}
|
||||
result.BossId = []uint32{10}
|
||||
atomic.StoreUint32(&c.Canmon, 0)
|
||||
defer c.GetSpace().EnterMap(c)
|
||||
return result, 0
|
||||
}
|
||||
func (h Controller) FRESH_LEAVE_FIGHT_LEVEL(data *fight.FRESH_LEAVE_FIGHT_LEVEL, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
switch data.Head.CMD {
|
||||
case 2430: //试炼之塔
|
||||
|
||||
c.Info.MapID = 101
|
||||
|
||||
case 2416: //勇者之塔
|
||||
|
||||
c.Info.MapID = 108
|
||||
|
||||
}
|
||||
defer c.GetSpace().LeaveMap(c) //玩家离开地图
|
||||
|
||||
return result, 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user