服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
136 lines
5.3 KiB
Go
136 lines
5.3 KiB
Go
// Package dnfenum 集中维护 DNF 协议和频道目录枚举。
|
|
package dnfenum
|
|
|
|
// ChannelMsg 是频道服协议的消息号。
|
|
type ChannelMsg uint8
|
|
|
|
const (
|
|
MsgCSAskChannelInfo ChannelMsg = 1
|
|
MsgCSUpdateChannelInfo ChannelMsg = 2
|
|
MsgSCAskChannelInfo ChannelMsg = 3
|
|
MsgCSNoticeChannel ChannelMsg = 4
|
|
MsgCSCheckScript ChannelMsg = 5
|
|
MsgSCCheckScript ChannelMsg = 6
|
|
MsgCSAskChannelScript ChannelMsg = 7
|
|
MsgSCAskChannelScript ChannelMsg = 8
|
|
MsgCSGetScript ChannelMsg = 9
|
|
MsgSCGetScript ChannelMsg = 10
|
|
MsgCSConnect ChannelMsg = 11
|
|
MsgSCConnect ChannelMsg = 12
|
|
MsgCSGetGCInfo ChannelMsg = 13
|
|
MsgSCGetGCInfo ChannelMsg = 14
|
|
MsgCBGetChannelInfo ChannelMsg = 15
|
|
MsgBCGetChannelInfo ChannelMsg = 16
|
|
MsgCSAskChannelInfoNew ChannelMsg = 17
|
|
MsgSCAskChannelInfoNew ChannelMsg = 18
|
|
)
|
|
|
|
// LegacyChannelMsg 是 NoPack/DOF 登录阶段仍在使用的旧式频道消息号。
|
|
type LegacyChannelMsg uint16
|
|
|
|
const (
|
|
LegacyMsgDofLoginPreface LegacyChannelMsg = 11019
|
|
LegacyMsgDofGetScript LegacyChannelMsg = 2825
|
|
LegacyMsgDofChannelProbe LegacyChannelMsg = LegacyMsgDofGetScript
|
|
LegacyMsgDofScript LegacyChannelMsg = 2826
|
|
LegacyMsgDofLoginAck LegacyChannelMsg = 12044
|
|
LegacyMsgAskChannelInfo LegacyChannelMsg = 8977
|
|
LegacyMsgChannelInfo LegacyChannelMsg = 28434
|
|
)
|
|
|
|
// GameCmd 是最新 game 业务包的 cmd 分类。
|
|
type GameCmd byte
|
|
|
|
const (
|
|
GameCmdNotice GameCmd = 0
|
|
GameCmdCommand GameCmd = 1
|
|
)
|
|
|
|
// GameType 是当前 dnfbridge 已确认的最新 game 业务包 type。
|
|
// 它和 NoPack.exe 的 CmdPacket 运行时名表分开维护,避免把未验证的名字表
|
|
// 直接改成服务端行为分发。
|
|
type GameType uint16
|
|
|
|
const (
|
|
GameTypeLogin GameType = 1
|
|
GameTypeCharacterList GameType = 2
|
|
GameTypeSelectCharacter GameType = GameType(CmdPacketSelectCharacter)
|
|
GameTypeCreateCharacter GameType = 5
|
|
GameTypeGetUserInfo GameType = 8
|
|
GameTypeEnterSelectDungeon GameType = GameType(CmdPacketEnterSelectDungeon)
|
|
GameTypeSelectDungeon GameType = GameType(CmdPacketSelectDungeon)
|
|
GameTypeFinishLoading GameType = 37
|
|
GameTypeMercenaryCompetition GameType = GameType(CmdPacketMercenaryCompetition)
|
|
GameTypeDailyChallenge GameType = 646
|
|
GameTypeStaticsRuntimeTing GameType = GameType(CmdPacketStaticsRuntimeTing)
|
|
GameTypeClientCheck GameType = GameTypeStaticsRuntimeTing
|
|
GameTypeContentsPlayInfo GameType = GameType(CmdPacketContentsPlayInfo)
|
|
GameTypeCheckName GameType = GameType(CmdPacketCheckDoubleCharacterName)
|
|
)
|
|
|
|
// UpperMsg 是 game 连接上 raw upper 包的消息号。
|
|
type UpperMsg uint16
|
|
|
|
const (
|
|
UpperMsgGameEndpoint UpperMsg = 1
|
|
UpperMsgCharacterRoster UpperMsg = 2
|
|
UpperMsgSetUDPIPPort UpperMsg = UpperMsg(CmdPacketSetUDPIPPort)
|
|
UpperMsgSelectCharacter UpperMsg = UpperMsg(CmdPacketSelectCharacter)
|
|
UpperMsgInit UpperMsg = UpperMsgSelectCharacter
|
|
UpperMsgCreateCharacter UpperMsg = 5
|
|
UpperMsgSelectAck UpperMsg = 7
|
|
UpperMsgGetUserInfo UpperMsg = UpperMsg(CmdPacketGetUserinfo)
|
|
UpperMsgSelectStart UpperMsg = 15
|
|
UpperMsgSelectEnter UpperMsg = 16
|
|
UpperMsgFollowUpStatus UpperMsg = 63
|
|
UpperMsgFollowUpReady UpperMsg = 120
|
|
UpperMsgLoadExtendCharacs UpperMsg = UpperMsg(CmdPacketLoadExtendCharacs)
|
|
UpperMsgCharacterPage UpperMsg = UpperMsgLoadExtendCharacs
|
|
UpperMsgCreatePostState UpperMsg = 689
|
|
UpperMsgStaticsRuntimeTing UpperMsg = UpperMsg(CmdPacketStaticsRuntimeTing)
|
|
UpperMsgClientCheck UpperMsg = UpperMsgStaticsRuntimeTing
|
|
UpperMsgLetsPickPresent UpperMsg = UpperMsg(CmdPacketLetsPickPresent)
|
|
UpperMsgInformNotice UpperMsg = UpperMsg(CmdPacketInformNotice)
|
|
UpperMsgRebirthHardcoreCharac UpperMsg = UpperMsg(CmdPacketRebirthHardcoreCharac)
|
|
UpperMsgCheckDoubleCharName UpperMsg = UpperMsg(CmdPacketCheckDoubleCharacterName)
|
|
UpperMsgCheckCharacterGate UpperMsg = 693
|
|
UpperMsgMercenaryInfo UpperMsg = UpperMsg(CmdPacketMercenaryInfo)
|
|
UpperMsgMercenaryCompetition UpperMsg = UpperMsg(CmdPacketMercenaryCompetition)
|
|
UpperMsgCharacViewHiddenInfo UpperMsg = UpperMsg(CmdPacketCharacViewHiddenCharacInfo)
|
|
UpperMsgCharacSlotExtendEffect UpperMsg = UpperMsg(CmdPacketCharacSlotExtendEffect)
|
|
UpperMsgCheckUserConnection UpperMsg = UpperMsg(CmdPacketCheckUserConnection)
|
|
UpperMsgAntibot UpperMsg = UpperMsg(CmdPacketAntibot)
|
|
UpperMsgDprotoCallback UpperMsg = UpperMsg(CmdPacketDprotoCallback)
|
|
UpperMsgGuardControl UpperMsg = 889 // 0x0379
|
|
)
|
|
|
|
const (
|
|
ChannelPacketClass = 124
|
|
LoginChannelServerIndex = 1
|
|
DefaultGameChannelID = 11
|
|
BootstrapChannelID = 19
|
|
DefaultAutoChannelID = 38
|
|
DefaultAutoChannelType = 3
|
|
GamePortBase = 10000
|
|
ChannelNamePrefix = "ch."
|
|
DefaultChannelMaxUsers = 500
|
|
DefaultChannelCurrentUsers = 0
|
|
)
|
|
|
|
const (
|
|
GroupCain = "cain"
|
|
GroupTrade = "trade"
|
|
GroupDeathTower = "deathtower"
|
|
GroupCrack = "crack"
|
|
GroupRaid = "raid"
|
|
GroupAttackRaid = "attackraid"
|
|
)
|
|
|
|
const (
|
|
TradeChannelType = 3
|
|
DeathTowerChannelType = 11
|
|
RaidChannelType = 23
|
|
HiddenRaidType = 32
|
|
FiendWarRaidChannelType = 42
|
|
)
|