HomeServer/lualib-src/Server-main/Common/GameCmd.lua
2024-11-20 15:41:37 +08:00

118 lines
4.2 KiB
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local skynet = require "skynet"
local GameCmd ={}
GameCmd.Center = 1 --中心服
GameCmd.Route = 2 --路由服
GameCmd.Gate = 3 --大厅服
GameCmd.Login = 4 --登陆服
GameCmd.Game = 5 --游戏服
GameCmd.Sdk = 6 --SDK服
GameCmd.Multi = 7 --多功能服
GameCmd.WebCallBack = 8 --回调接口
GameCmd.Pay = 9 --回调接口
--中心服命令
GameCmd[ "ServerManage" ] = GameCmd.Center --服务器管理命令
GameCmd[ "QueryClusterInfo" ] = GameCmd.Center --查询所有服务器信息
GameCmd[ "SetServerConfig" ] = GameCmd.Center --设置服务器配置
GameCmd[ "metrics" ] = GameCmd.Center --获取指标
GameCmd[ "DeleteServerReg" ] = GameCmd.Center --删除服务器注册信息
GameCmd[ "WebMsg" ] = GameCmd.Center --后台消息
--路由服命令
GameCmd[ "GetGateUrl" ] = GameCmd.Route --获取网关地址
GameCmd[ "health" ] = GameCmd.Route --健康管理
--多功能服务器命令
GameCmd[ "GetMailList" ] = GameCmd.Multi --获取邮件列表
GameCmd[ "QueryRedeemList" ] = GameCmd.Multi --查询兑换码列表
GameCmd[ "RedeemManage" ] = GameCmd.Multi --兑换管理
GameCmd[ "MailTemplate" ] = GameCmd.Multi --邮件模板
GameCmd[ "MailManage" ] = GameCmd.Multi --邮件管理
--充值服命令
GameCmd[ "AddPayInfo" ] = GameCmd.Pay --新增充值信息
--[[
发布公告
MailManage
{
opType 操作 1-新建 2-修改 3-删除
isAllUser 是否全员发送 true是 false不是。在userList填要发送的玩家
userList 发送用户列表
language 语言
title 标题
content 内容
tag 标签
startTime 开始时间
endTime 结束时间
type 邮件类型
subType 邮件子类型
platform 平台
bonus 奖励
{
id 物品ID
count 物品数量
}
}
response
{
returnCode 0-成功 1-失败
data op为3返回
}
]]
----------------------------------------------------------------------中心服 Start---------------------------------------------------------------
--[[
查询所有服务器信息
query_all_server_info
{
}
response
{
returnCode 0-成功 1-失败
returnServerInfo
}
服务器管理命令
server_manage_cmd
{
cmd 命令(必填)
serverId 服务器ID不填争对所有服务器
userId 玩家ID部份命令必带 ,比如加入黑名单)
}
response
{
returnCode 0-成功 1-失败
returnServerInfo
}
----------------------------------------------------------------------中心服 End---------------------------------------------------------------
----------------------------------------------------------------------路由服 Start---------------------------------------------------------------
获取登陆地址
GetGateUrl
{
platform 1-直接登录 2-微信登陆
account 直接登陆传用户名 ,微信登陆直接传 openid
}
response
{
returnCode 0-成功 非0-失败
loginIP 大厅服务器IP地址
loginPort 大厅服务器IP端口
gateToken 大厅服务器需要的Token
}
设置令版桶信息
SetTokenBucket
{
addCount 新增数量
maxCount 最大数量
}
response
{
returnCode 0-成功 非0-失败
}
----------------------------------------------------------------------路由服 End---------------------------------------------------------------
]]
return GameCmd