修复pubg定时器小问题
This commit is contained in:
1 parent
3d8c2903be
commit
148187ba59
5 files changed
+9
-3
No files matched your search
@@ -7,7 +7,7 @@ forward_mode_enable = false # 是否开启网关到机器人的转发功能
|
||||
version = "300,310,315,320" # 支持的客户端协议版本号 三位数字 多个以逗号分隔 如300,310,315,320
|
||||
gate_tcp_mq_addr = "127.0.0.1" # 访问网关tcp直连消息队列的地址 填网关的内网地址
|
||||
gate_tcp_mq_port = 33333 # tcp消息队列端口号
|
||||
login_sdk_url = "http://127.0.0.1:8080" # 网关登录验证token的sdk服务器地址 目前填dispatch的内网地址
|
||||
login_sdk_url = "http://127.0.0.1:8080/gate/token/verify" # 网关登录验证token的sdk服务器地址 目前填dispatch的内网地址
|
||||
login_sdk_account_key = "" # sdk服务器账号验证的签名密钥
|
||||
|
||||
[logger]
|
||||
|
||||
+1
-1
@@ -478,7 +478,7 @@ func (k *KcpConnManager) doGateLogin(req *proto.GetPlayerTokenReq, session *Sess
|
||||
signData := signHash.Sum(nil)
|
||||
sign := hex.EncodeToString(signData)
|
||||
tokenVerifyRsp, err := httpclient.PostJson[controller.TokenVerifyRsp](
|
||||
config.GetConfig().Hk4e.LoginSdkUrl+"/gate/token/verify",
|
||||
config.GetConfig().Hk4e.LoginSdkUrl,
|
||||
&controller.TokenVerifyReq{
|
||||
AppID: 1,
|
||||
ChannelID: 1,
|
||||
|
||||
@@ -138,6 +138,9 @@ const (
|
||||
PluginGlobalTick10Second
|
||||
PluginGlobalTickMinute
|
||||
PluginGlobalTickHour
|
||||
PluginGlobalTickHourChange
|
||||
PluginGlobalTickDayChange
|
||||
PluginGlobalTickMonthChange
|
||||
)
|
||||
|
||||
// PluginUserTimerFunc 用户timer处理函数
|
||||
|
||||
@@ -75,7 +75,7 @@ func (p *PluginPubg) OnEnable() {
|
||||
p.ListenEvent(PluginEventIdPostEnterScene, PluginEventPriorityNormal, p.EventPostEnterScene)
|
||||
// 添加全局定时器
|
||||
p.AddGlobalTick(PluginGlobalTickSecond, p.GlobalTickPubg)
|
||||
p.AddGlobalTick(PluginGlobalTickHour, p.GlobalTickHourStart)
|
||||
p.AddGlobalTick(PluginGlobalTickHourChange, p.GlobalTickHourStart)
|
||||
// 注册命令
|
||||
p.RegCommandController(p.NewPubgCommandController())
|
||||
}
|
||||
|
||||
@@ -215,12 +215,15 @@ func (t *TickManager) OnGameServerTick() {
|
||||
}
|
||||
if tm.Hour() != t.tm.Hour() {
|
||||
t.onHourChange(now)
|
||||
PLUGIN_MANAGER.HandleGlobalTick(PluginGlobalTickHourChange)
|
||||
}
|
||||
if tm.Day() != t.tm.Day() {
|
||||
t.onDayChange(now)
|
||||
PLUGIN_MANAGER.HandleGlobalTick(PluginGlobalTickDayChange)
|
||||
}
|
||||
if tm.Month() != t.tm.Month() {
|
||||
t.onMonthChange(now)
|
||||
PLUGIN_MANAGER.HandleGlobalTick(PluginGlobalTickMonthChange)
|
||||
}
|
||||
t.tm = tm
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user