```
refactor(controller): 重构控制器代码结构并优化战斗状态检查 - 添加包级注释说明controller包的功能和架构设计 - 重命名Controller结构体注释,使其更清晰明了 - 添加ParseCmd函数的
This commit is contained in:
@@ -46,7 +46,7 @@ func processMonID(bm string) string {
|
||||
return selected
|
||||
}
|
||||
|
||||
// 挑战地图boss
|
||||
// PlayerFightBoss 挑战地图boss
|
||||
func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
if !c.CanFight() {
|
||||
return nil, errorcode.ErrorCodes.ErrSystemError
|
||||
@@ -152,7 +152,7 @@ func (h Controller) PlayerFightBoss(data *fight.ChallengeBossInboundInfo, c *pla
|
||||
return nil, -1
|
||||
}
|
||||
|
||||
// 战斗野怪
|
||||
// OnPlayerFightNpcMonster 战斗野怪
|
||||
func (h Controller) OnPlayerFightNpcMonster(data *fight.FightNpcMonsterInboundInfo, c *player.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
if !c.CanFight() {
|
||||
return nil, errorcode.ErrorCodes.ErrSystemError
|
||||
|
||||
Reference in New Issue
Block a user