DNF90 服务端与启动器完整源码(含 GM 工具功能增强)
服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
This commit is contained in:
commit
645b64fe21
4388 files changed
+1405457
No files matched your search
@@ -0,0 +1,77 @@
|
||||
package dnfbridge
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"longheng.io/server/internal/modules/dnf/dnfenum"
|
||||
"longheng.io/server/internal/modules/dnf/raid"
|
||||
)
|
||||
|
||||
// sendCurrentRaidAvailabilityOnce sends the current client's fixed three-row
|
||||
// team-raid availability table after character selection. The client defaults
|
||||
// each row's limit to zero when this notification is absent, which is the
|
||||
// direct source of the "today is not a team-mode development day" message.
|
||||
func (s *Service) sendCurrentRaidAvailabilityOnce(session *gameSession, source string) error {
|
||||
if session == nil || session.raidAvailabilitySent {
|
||||
return nil
|
||||
}
|
||||
body := raid.BuildNativeRaidAvailabilityBody()
|
||||
if err := s.sendGameUpperRawClass(session, raid.RaidAvailabilityMsgID, body, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
session.raidAvailabilitySent = true
|
||||
s.logGameEvent(session, "game-current-raid-availability-sent",
|
||||
"msg_id", raid.RaidAvailabilityMsgID,
|
||||
"classification", 0,
|
||||
"row_count", raid.RaidAvailabilityRowCount,
|
||||
"body_len", len(body),
|
||||
"body_hex", fmt.Sprintf("%X", body),
|
||||
"source", source,
|
||||
"body_source", "current_exe_sub_017B71B0_three_rows_key_field_used_limit_field")
|
||||
return nil
|
||||
}
|
||||
|
||||
func isCurrentRaidDirectoryChannel(session *gameSession) bool {
|
||||
if session == nil {
|
||||
return false
|
||||
}
|
||||
return isCurrentTeamChannelType(session.channel.Type)
|
||||
}
|
||||
|
||||
func isCurrentTeamChannelType(channelType uint8) bool {
|
||||
switch channelType {
|
||||
case dnfenum.RaidChannelType, dnfenum.HiddenRaidType, 42:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// sendCurrentRaidDirectoryReadyOnce initializes the current client's raid
|
||||
// directory cooldown. In team-channel states, sub_17B18B0 keeps owner 0x74
|
||||
// closed while the manager timestamp is -1. The current EXE registers
|
||||
// sub_34463B0 for op1228 at sub_344AAD8; that handler first consumes one
|
||||
// reserved byte, then records the timestamp through sub_17B1890. After its
|
||||
// native three-second delay the system-menu owner can open and issue C2S 831
|
||||
// for the public raid page.
|
||||
func (s *Service) sendCurrentRaidDirectoryReadyOnce(session *gameSession, source string) error {
|
||||
if session == nil ||
|
||||
session.raidDirectoryReadySent ||
|
||||
!isCurrentRaidDirectoryChannel(session) ||
|
||||
session.sceneBootstrapTailDeferred ||
|
||||
!session.sceneBootstrapTailSent {
|
||||
return nil
|
||||
}
|
||||
body := raid.BuildRaidDirectoryReadyBody()
|
||||
if err := s.sendGameUpperRawClass(session, raid.RaidDirectoryReadyMsgID, body, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
session.raidDirectoryReadySent = true
|
||||
s.logGameEvent(session, "game-current-raid-directory-ready-sent",
|
||||
"msg_id", raid.RaidDirectoryReadyMsgID,
|
||||
"classification", 0,
|
||||
"body_len", len(body),
|
||||
"source", source,
|
||||
"body_source", "current_exe_sub_34463B0_sets_sub_17B18B0_ready_timestamp")
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user