2025-09-04 02:00:57 +08:00
|
|
|
|
package fight
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-11-19 16:11:02 +08:00
|
|
|
|
"blazing/logic/service/common"
|
2025-11-26 15:25:10 +08:00
|
|
|
|
_ "blazing/logic/service/fight/boss"
|
2025-09-14 01:35:16 +08:00
|
|
|
|
_ "blazing/logic/service/fight/effect"
|
2025-09-04 02:00:57 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// 野怪对战包
|
|
|
|
|
|
type FightNpcMonsterInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2408" struc:"skip"`
|
2025-09-04 02:00:57 +08:00
|
|
|
|
// Number 地图刷新怪物结构体对应的序号(1-9的位置序号)
|
2025-09-21 08:07:17 +00:00
|
|
|
|
|
2025-09-04 02:00:57 +08:00
|
|
|
|
Number uint32 `fieldDesc:"地图刷新怪物结构体对应的序号 1 - 9 的位置序号" `
|
|
|
|
|
|
}
|
2025-09-19 00:29:55 +08:00
|
|
|
|
type ChallengeBossInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2411" struc:"skip"`
|
2025-09-19 00:29:55 +08:00
|
|
|
|
BossId uint32 `json:"bossId"`
|
|
|
|
|
|
}
|
2025-09-04 02:00:57 +08:00
|
|
|
|
type NullOutboundInfo struct {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-01 05:32:56 +08:00
|
|
|
|
type S2C_ChoiceLevelRequestInfo struct {
|
|
|
|
|
|
CurFightLevel uint32 `json:"curFightLevel"` // 当前战斗层数
|
|
|
|
|
|
BossLen uint32 `struc:"sizeof=BossID"`
|
|
|
|
|
|
BossID []uint32 `json:"bossId"` // 下一层的精灵id数组
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-04 02:00:57 +08:00
|
|
|
|
// 准备战斗包
|
|
|
|
|
|
type ReadyToFightInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2404" struc:"skip"`
|
2025-09-04 02:00:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 战斗逃跑
|
|
|
|
|
|
type EscapeFightInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2410" struc:"skip"`
|
2025-09-04 02:00:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-14 23:09:16 +08:00
|
|
|
|
// 精灵王
|
|
|
|
|
|
type StartPetWarInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2431" struc:"skip"`
|
2025-11-14 23:09:16 +08:00
|
|
|
|
}
|
2026-01-01 05:32:56 +08:00
|
|
|
|
type StartTwarInboundInfo struct {
|
2026-01-02 04:11:37 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2429|2415|2425" struc:"skip"`
|
2026-01-01 05:32:56 +08:00
|
|
|
|
}
|
2025-11-15 19:11:23 +08:00
|
|
|
|
type ARENA_SET_OWENR struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2417" struc:"skip"`
|
2025-11-15 19:11:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
type ARENA_FIGHT_OWENR struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2418" struc:"skip"`
|
2025-11-15 19:11:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ARENA_GET_INFO struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2419" struc:"skip"`
|
2025-11-15 19:11:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ARENA_UPFIGHT struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2420" struc:"skip"`
|
2025-11-15 19:11:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
type ARENA_OWENR_ACCE struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2422" struc:"skip"`
|
2025-11-15 19:11:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-15 15:22:58 +08:00
|
|
|
|
// 表示"宠物王加入"的入站消息数据
|
|
|
|
|
|
type PetKingJoinInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2413" struc:"skip"`
|
2025-11-15 15:22:58 +08:00
|
|
|
|
Type uint32 // 战斗类型:5=单精灵,6=多精灵,11=精灵大师赛 (对应Java的@UInt long type)
|
|
|
|
|
|
FightType uint32 // 仅当Type为11时有效 (对应Java的@UInt long fightType)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-04 02:00:57 +08:00
|
|
|
|
// HandleFightInviteInboundInfo 处理战斗邀请的入站消息
|
2025-09-21 08:07:17 +00:00
|
|
|
|
|
2025-09-04 02:00:57 +08:00
|
|
|
|
type HandleFightInviteInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2403" struc:"skip"`
|
2025-11-19 16:11:02 +08:00
|
|
|
|
UserID uint32 `json:"userId" codec:"userId,uint"` // 邀请我对战人的userid
|
|
|
|
|
|
Flag uint32 `json:"flag" codec:"flag,uint"` // 1为同意对战 0为取消对战
|
|
|
|
|
|
Mode uint32 `json:"mode" codec:"mode,uint"` // 战斗类型 1 = 1v1 2 = 6v6
|
2025-09-04 02:00:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-20 00:17:29 +08:00
|
|
|
|
type InviteToFightInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2401" struc:"skip"`
|
2025-09-21 08:07:17 +00:00
|
|
|
|
|
2025-11-18 23:41:31 +00:00
|
|
|
|
UserID uint32
|
2025-09-20 00:17:29 +08:00
|
|
|
|
|
|
|
|
|
|
// Mode 战斗类型 1 = 1v1 2 = 6v6
|
2025-11-19 16:11:02 +08:00
|
|
|
|
Mode uint32
|
2025-09-20 00:17:29 +08:00
|
|
|
|
}
|
2025-10-31 00:53:22 +08:00
|
|
|
|
type InviteFightCancelInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2402" struc:"skip"`
|
2025-10-31 00:53:22 +08:00
|
|
|
|
}
|
2025-09-20 00:17:29 +08:00
|
|
|
|
|
2025-09-04 02:00:57 +08:00
|
|
|
|
// 2502的回复包 PVP邀请消息
|
|
|
|
|
|
type NoteHandleFightInviteOutboundInfo struct {
|
|
|
|
|
|
UserID uint32
|
|
|
|
|
|
Nickname string `struc:"[16]byte"` // 固定长度16字节
|
|
|
|
|
|
Result uint32 // 0=拒绝 1=同意 2=在线超6小时 3=无出战精灵 4=不在线
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 14:51:11 +00:00
|
|
|
|
type UseSkillInInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2405" struc:"skip"`
|
2025-09-04 02:00:57 +08:00
|
|
|
|
// 技能id,
|
|
|
|
|
|
SkillId uint32
|
|
|
|
|
|
}
|
2025-09-07 00:23:28 +08:00
|
|
|
|
type ChangePetInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2407" struc:"skip"`
|
2025-09-07 00:23:28 +08:00
|
|
|
|
// CatchTime 捕捉时间
|
|
|
|
|
|
CatchTime uint32 `json:"catchTime"`
|
|
|
|
|
|
}
|
2025-09-11 02:44:21 +08:00
|
|
|
|
type CatchMonsterInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2409" struc:"skip"`
|
2025-09-11 02:44:21 +08:00
|
|
|
|
// CapsuleId 胶囊id
|
2025-09-21 08:07:17 +00:00
|
|
|
|
|
2025-09-11 02:44:21 +08:00
|
|
|
|
CapsuleId uint32 `json:"capsuleId" fieldDescription:"胶囊id" uint:"true"`
|
|
|
|
|
|
}
|
2025-09-25 14:51:11 +00:00
|
|
|
|
|
|
|
|
|
|
type LoadPercentInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2441" struc:"skip"`
|
2025-09-25 14:51:11 +00:00
|
|
|
|
Percent uint32 `fieldDescription:"加载百分比"`
|
|
|
|
|
|
}
|
2025-11-08 01:30:53 +08:00
|
|
|
|
|
|
|
|
|
|
// UsePetItemInboundInfo 对应Java的UsePetItemInboundInfo,实现InboundMessage接口
|
|
|
|
|
|
type UsePetItemInboundInfo struct {
|
2025-11-24 11:56:20 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2406" struc:"skip"`
|
2025-11-08 01:30:53 +08:00
|
|
|
|
// 字段首字母大写以导出(对应Java的可访问性,配合@Data的getter/setter)
|
|
|
|
|
|
CatchTime uint32 `description:"精灵捕获时间" codec:"catchTime"` // @UInt long 对应Go的uint32(无符号64位)
|
|
|
|
|
|
ItemId uint32 `description:"使用的物品ID" codec:"itemId"` // 结构体标签模拟@FieldDescription和@AutoCodec注解
|
|
|
|
|
|
Reversed1 uint32 `description:"填充字段 0" codec:"reversed1"` // reversed1对应原Java的填充字段
|
|
|
|
|
|
}
|
2025-11-25 16:36:55 +08:00
|
|
|
|
type ChatInfo struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"50002" struc:"skip"`
|
|
|
|
|
|
Reserve uint32 `json:"reserve" fieldDescription:"填充 默认值为0" uint:"true"` // @UInt long reserve,无符号长整数
|
|
|
|
|
|
MessageLen uint32 `struc:"sizeof=Message"`
|
|
|
|
|
|
Message string `json:"message" fieldDescription:"消息内容, 结束符为utf-8的数字0"` // 消息内容,包含utf-8空字符('\x00')作为结束符
|
|
|
|
|
|
}
|
2025-12-13 21:47:07 +08:00
|
|
|
|
type C2S_FRESH_CHOICE_FIGHT_LEVEL struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"2428|2414" struc:"skip"`
|
2026-03-03 19:28:59 +08:00
|
|
|
|
|
2025-12-13 21:47:07 +08:00
|
|
|
|
Level uint `json:"level"` // 若使用JSON序列化,添加tag;若用protobuf可替换为对应的tag
|
|
|
|
|
|
}
|
2026-01-02 04:11:37 +08:00
|
|
|
|
type C2S_OPEN_DARKPORTAL struct {
|
|
|
|
|
|
Head common.TomeeHeader `cmd:"2424" struc:"skip"`
|
|
|
|
|
|
|
|
|
|
|
|
Level uint32 `json:"level"` // 若使用JSON序列化,添加tag;若用protobuf可替换为对应的tag
|
|
|
|
|
|
}
|
|
|
|
|
|
type S2C_OPEN_DARKPORTAL struct {
|
|
|
|
|
|
CurBossID uint32 `json:"curBossID"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-13 21:47:07 +08:00
|
|
|
|
type S2C_FreshChoiceLevelRequestInfo struct {
|
|
|
|
|
|
// CurFightLevel 当前战斗层数(对应前端 curFightLevel 字段)
|
2026-01-02 04:11:37 +08:00
|
|
|
|
CurFightLevel uint32 `json:"curFightLevel"` // JSON序列化tag,保证字段名与前端一致
|
2025-12-13 21:47:07 +08:00
|
|
|
|
BossIdLen uint32 `struc:"sizeof=BossId"`
|
|
|
|
|
|
// BossId 当前层数的精灵ID数组(对应前端 bossId 字段,C# List<uint> 对应Go []uint切片)
|
|
|
|
|
|
BossId []uint32 `json:"bossId"`
|
|
|
|
|
|
}
|
|
|
|
|
|
type FRESH_LEAVE_FIGHT_LEVEL struct {
|
2026-01-02 04:11:37 +08:00
|
|
|
|
Head common.TomeeHeader `cmd:"2430|2416|2426" struc:"skip"`
|
2025-12-13 21:47:07 +08:00
|
|
|
|
}
|