69 lines
3.0 KiB
Go
69 lines
3.0 KiB
Go
package routers
|
||||
|
|
|
|||
|
|
import (
|
|||
|
|
"context"
|
|||
|
|
"sync"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
var _ = sync.Mutex{}
|
|||
|
|
var _ = context.Background
|
|||
|
|
|
|||
|
|
//
|
|||
|
|
// Admin/config weapon grant: push SyncArmoryAddWeapon for account-catalog weapons.
|
|||
|
|
// Instance ids are deterministic (accountInstanceByTemplate), so the existing
|
|||
|
|
// AskLoadWeaponToSlot wheel flow picks the granted weapon up with no further
|
|||
|
|
// server work — equip happens in-game via the armory/weapon wheel.
|
|||
|
|
//
|
|||
|
|
func GameRouter_WeaponGrant_GrantWeaponAsync(ctx context.Context, session *GameSession, templateId uint32) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_GrantWeaponAsync
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//
|
|||
|
|
// Bulk unlock: push SyncArmoryAddWeapon for every account-catalog weapon so the whole
|
|||
|
|
// catalog lands in the player's armory/backpack. Pushes are idempotent (deterministic
|
|||
|
|
// instance ids) and are batched with a short delay so the client UI can digest ~600
|
|||
|
|
// updates without a single burst.
|
|||
|
|
//
|
|||
|
|
func GameRouter_WeaponGrant_GrantAllWeaponsAsync(ctx context.Context, session *GameSession) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_GrantAllWeaponsAsync
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//
|
|||
|
|
// 挂起感知的发放入口 —— 自动发放(unlockAll)和 GM 面板手动点都必须走这里。
|
|||
|
|
// 手动点按钮时玩家一定在浏览器里 ⇒ 客户端处于 hangup ⇒ 此刻往 socket 灌 671 个包
|
|||
|
|
// 与 2026-09-23 的断线风暴是同一形态。所以统一在这里先错峰、再等 hangup 解除。
|
|||
|
|
//
|
|||
|
|
func GameRouter_WeaponGrant_GrantAllWeaponsWhenReadyAsync(ctx context.Context, session *GameSession, startupDelayMs int32, hangupWaitMs int32) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_GrantAllWeaponsWhenReadyAsync
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//
|
|||
|
|
// 等到客户端退出 hangup(切后台 / 失焦)再往下走,最多等 。
|
|||
|
|
// 挂起中的客户端不消费网络消息 —— 往里灌批量包会把 TCP 缓冲填满,
|
|||
|
|
// 回到前台时判定「与服务器的网络连接已断开」⇒ Reconnect Module 12 秒超时
|
|||
|
|
// (2026-09-23 断线重连风暴的原始形态)。道具/武器发放都先过这一关。
|
|||
|
|
//
|
|||
|
|
func GameRouter_WeaponGrant_WaitForClientInteractiveAsync(ctx context.Context, session *GameSession, hangupWaitMs int32) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_WaitForClientInteractiveAsync
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func GameRouter_WeaponGrant_PublishAllAccountWeaponsIfEnabled(ctx context.Context, rpcCtx *RpcContext) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_PublishAllAccountWeaponsIfEnabled
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Reset the unlockAll one-shot guard so the next scene load replays the catalog.
|
|||
|
|
func GameRouter_WeaponGrant_ResetAllWeaponsSentFlag(ctx context.Context, session *GameSession) any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_ResetAllWeaponsSentFlag
|
|||
|
|
var zero any; return zero
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func GameRouter_WeaponGrant_WeaponCatalog(ctx context.Context, ) []any {
|
|||
|
|
// Router implementation for GameRouter_WeaponGrant_WeaponCatalog
|
|||
|
|
return nil
|
|||
|
|
}
|
|||
|
|
|