```
feat(vscode): 添加调试参数配置 为launch.json添加-debug=1参数,便于调试模式启动 docs(README): 补充zellij终端复用工具使用说明 添加x-cmd安装和zellij会话管理相关命令示例 refactor(config): 注释掉GamePort配置项 暂时注释GamePort配置项以解决配置冲突问题 refactor(xmlres): 移除未使用的gf框架依赖并注释文件监控逻辑 移除未使用的gctx、gfile、gfsnotify、glog导入包 注释init函数中的文件监控逻辑,避免不必要的文件监听 ```
This commit is contained in:
@@ -17,6 +17,24 @@ import (
|
||||
"github.com/jinzhu/copier"
|
||||
)
|
||||
|
||||
func (h Controller) FreshOPEN(data *fight.C2S_OPEN_DARKPORTAL, c *player.Player) (result *fight.S2C_OPEN_DARKPORTAL, err errorcode.ErrorCode) {
|
||||
|
||||
result = &fight.S2C_OPEN_DARKPORTAL{}
|
||||
c.Info.CurrentFreshStage = utils.Max(c.Info.CurrentFreshStage, 1)
|
||||
c.Info.CurrentStage = utils.Max(c.Info.CurrentStage, 1)
|
||||
boss := service.NewTower110Service().Boss(uint32(data.Level))
|
||||
result = &fight.S2C_OPEN_DARKPORTAL{}
|
||||
for _, v := range boss.BossIds {
|
||||
r := configservice.NewBossService().Get(v)
|
||||
result.CurBossID = uint32(r.MonID)
|
||||
|
||||
}
|
||||
|
||||
c.CurDark = uint32(data.Level)
|
||||
defer c.GetSpace().LeaveMap(c)
|
||||
return result, 0
|
||||
}
|
||||
|
||||
// FreshChoiceFightLevel 处理玩家选择挑战模式(试炼之塔或勇者之塔)
|
||||
// 根据不同的CMD值设置玩家的挑战状态和地图信息,并返回当前挑战层级信息
|
||||
// 参数:
|
||||
@@ -33,6 +51,13 @@ func (h Controller) FreshChoiceFightLevel(data *fight.C2S_FRESH_CHOICE_FIGHT_LEV
|
||||
result = &fight.S2C_FreshChoiceLevelRequestInfo{}
|
||||
c.Info.CurrentFreshStage = utils.Max(c.Info.CurrentFreshStage, 1)
|
||||
c.Info.CurrentStage = utils.Max(c.Info.CurrentStage, 1)
|
||||
|
||||
if data.Head.CMD == 2424 {
|
||||
c.SendPackCmd(data.Head.CMD, &fight.S2C_OPEN_DARKPORTAL{
|
||||
CurBossID: 10,
|
||||
})
|
||||
return nil, -1
|
||||
}
|
||||
if data.Level > 0 {
|
||||
switch data.Head.CMD {
|
||||
case 2428: //试炼之塔
|
||||
@@ -41,18 +66,20 @@ func (h Controller) FreshChoiceFightLevel(data *fight.C2S_FRESH_CHOICE_FIGHT_LEV
|
||||
case 2414: //勇者之塔
|
||||
|
||||
c.Info.CurrentStage = uint32((data.Level-1)*10) + 1
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
var boss *configmodel.BaseTowerConfig
|
||||
switch data.Head.CMD {
|
||||
case 2428: //试炼之塔
|
||||
|
||||
result.CurFightLevel = uint(c.Info.CurrentFreshStage)
|
||||
result.CurFightLevel = uint32(c.Info.CurrentFreshStage)
|
||||
boss = service.NewTower600Service().Boss(c.Info.CurrentFreshStage)
|
||||
|
||||
case 2414: //勇者之塔
|
||||
|
||||
result.CurFightLevel = uint(c.Info.CurrentStage)
|
||||
result.CurFightLevel = uint32(c.Info.CurrentStage)
|
||||
boss = service.NewTower500Service().Boss(c.Info.CurrentStage)
|
||||
//next := service.NewTower600Service().Boss(c.Info.CurrentFreshStage + 1)
|
||||
|
||||
@@ -104,7 +131,8 @@ func (h Controller) PetTawor(data *fight.StartTwarInboundInfo, c *player.Player)
|
||||
next = service.NewTower500Service().Boss(c.Info.CurrentStage + 1)
|
||||
|
||||
result.CurFightLevel = uint32(c.Info.CurrentStage)
|
||||
|
||||
case 2425:
|
||||
boss = service.NewTower110Service().Boss(c.CurDark)
|
||||
}
|
||||
if next != nil {
|
||||
for _, v := range next.BossIds {
|
||||
@@ -182,6 +210,10 @@ func (h Controller) PetTawor(data *fight.StartTwarInboundInfo, c *player.Player)
|
||||
if c.Info.CurrentStage >= c.Info.MaxStage {
|
||||
c.Info.MaxStage = c.Info.CurrentStage
|
||||
}
|
||||
case 2425:
|
||||
for _, v := range boss.TaskIds {
|
||||
c.CompletedTask(int(v), 110)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user