refactor(fight): 重构战斗相关代码
- 移除未使用的战斗模式枚举和相关代码 - 更新 BurnEffect 结构,增加生命周期管理 - 删除多余的 Skill 结构和 Effect 相关代码 - 调整 NoteReadyToFightInfo 结构的位置
This commit is contained in:
@@ -5,18 +5,19 @@ import (
|
||||
"blazing/common/socket/errorcode"
|
||||
"blazing/common/socket/handler"
|
||||
"blazing/logic/service/fight"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/modules/blazing/model"
|
||||
)
|
||||
|
||||
func (h Controller) OnPlayerFightNpcMonster(data *fight.FightNpcMonsterInboundInfo, c *entity.Player) (result *fight.NullOutboundInfo, err errorcode.ErrorCode) {
|
||||
c.IsFighting = true
|
||||
t1 := handler.NewTomeeHeader(2503, c.UserID)
|
||||
ttt := fight.NoteReadyToFightInfo{
|
||||
ttt := info.NoteReadyToFightInfo{
|
||||
FightId: 3,
|
||||
}
|
||||
ttt.OurInfo = fight.FightUserInfo{UserID: c.UserID}
|
||||
ttt.OurInfo = info.FightUserInfo{UserID: c.UserID}
|
||||
|
||||
ttt.OurPetList = []fight.ReadyFightPetInfo{{ID: 300,
|
||||
ttt.OurPetList = []info.ReadyFightPetInfo{{ID: 300,
|
||||
Level: 100,
|
||||
MaxHp: 100,
|
||||
|
||||
@@ -27,8 +28,8 @@ func (h Controller) OnPlayerFightNpcMonster(data *fight.FightNpcMonsterInboundIn
|
||||
for i := 0; i < 4; i++ {
|
||||
ttt.OurPetList[0].SkillList[i] = model.SkillInfo{ID: 10001, Pp: 1}
|
||||
}
|
||||
ttt.OpponentInfo = fight.FightUserInfo{UserID: 0}
|
||||
ttt.OpponentPetList = []fight.ReadyFightPetInfo{{ID: 1,
|
||||
ttt.OpponentInfo = info.FightUserInfo{UserID: 0}
|
||||
ttt.OpponentPetList = []info.ReadyFightPetInfo{{ID: 1,
|
||||
Level: 100,
|
||||
MaxHp: 100,
|
||||
SkillListLen: 4,
|
||||
|
||||
Reference in New Issue
Block a user