```
feat(fight): 添加 BOSS 战斗逻辑与地图交互功能 - 在 fight_boss.go 中增加对 BOSS 血量是否为 0 的判断,避免无效赋值 - 在 map.go 中移除旧的测试代码,并将 Canmon 状态设置移至 MapList 方法中 - 新增 Attack_Boss 接口方法用于处理玩家攻击 BOSS 请求 - 修改 MapBossInfo 结构体字段类型
This commit is contained in:
@@ -34,10 +34,10 @@ type MapBossSInfo struct {
|
||||
INFO []MapBossInfo
|
||||
}
|
||||
type MapBossInfo struct {
|
||||
Id uint32 `json:"id" protobuf:"1,req,name=id"` // 需要刷新的BOSS精灵ID
|
||||
Region uint32 `json:"region" protobuf:"2,req,name=region"` // 刷新区域(蘑菇怪为0)
|
||||
Hp uint32 `json:"hp" protobuf:"3,req,name=hp"` // HP值(蘑菇怪为A,其他BOSS暂未明确用途,可能无实际作用)
|
||||
Pos uint32 `json:"pos" protobuf:"4,req,name=pos"` // 刷新坐标(类似野怪的位置ID,蘑菇怪初始为2;战斗退出后该值会变化)
|
||||
Id uint32 `json:"id" protobuf:"1,req,name=id"` // 需要刷新的BOSS精灵ID
|
||||
Region uint32 `json:"region" protobuf:"2,req,name=region"` // 刷新区域(蘑菇怪为0)
|
||||
Hp int32 `struc:"uint32" json:"hp" protobuf:"3,req,name=hp"` // HP值(蘑菇怪为A,其他BOSS暂未明确用途,可能无实际作用)
|
||||
Pos int `struc:"uint32" json:"pos" protobuf:"4,req,name=pos"` // 刷新坐标(类似野怪的位置ID,蘑菇怪初始为2;战斗退出后该值会变化)
|
||||
}
|
||||
|
||||
// 这里存储星球的map
|
||||
@@ -167,3 +167,7 @@ type LeaveMapOutboundInfo struct {
|
||||
// 米米号
|
||||
UserID uint32 `struc:"uint32" fieldDesc:"米米号" json:"user_id"`
|
||||
}
|
||||
type S2C_50004 struct {
|
||||
Id uint32 `json:"id" protobuf:"1,req,name=id"` // 天气0没有,1是雨.2是雪
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user