|
|
@@ -154,7 +154,7 @@ func (this *RoleManager) UpdateWithTimeWheel(ms uint64) {
|
|
|
this.tw.Update(ms)
|
|
|
}
|
|
|
|
|
|
-//task tick
|
|
|
+// task tick
|
|
|
func (this *RoleManager) UpdateWithTimeTimeWheelTask(twTask *util.TWTask, ms uint64) {
|
|
|
chRole, ok := this.uuidRoleList[twTask.Uid]
|
|
|
if !ok {
|
|
|
@@ -171,7 +171,7 @@ func (this *RoleManager) UpdateWithTimeTimeWheelTask(twTask *util.TWTask, ms uin
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//bool表示给定的cid是否已经存在role, bool是否已经存在
|
|
|
+// bool表示给定的cid是否已经存在role, bool是否已经存在
|
|
|
func (this *RoleManager) AddRole(cid model.ClientID, openId string, selectZone int32) (RoleOuter, bool, bool) {
|
|
|
role, ok := this.channelRoleList[cid.SessID]
|
|
|
if ok {
|
|
|
@@ -225,7 +225,7 @@ func (this *RoleManager) RemoveRoleObjByOpenId(openId string) {
|
|
|
delete(this.openRoleList, openId)
|
|
|
}
|
|
|
|
|
|
-//添加到uuid角色列表中
|
|
|
+// 添加到uuid角色列表中
|
|
|
func (this *RoleManager) Resolve(role *Role) {
|
|
|
if role.GetUUid() == 0 {
|
|
|
util.InfoF("AddRoleObj uid=0")
|
|
|
@@ -377,8 +377,8 @@ func (this *RoleManager) GetFIFOList(idx, num int32, role *Role, exceptUidList m
|
|
|
return true, retUidList
|
|
|
}
|
|
|
|
|
|
-//[sessionId]clientuse channelid
|
|
|
-//[serviceID] 所在的网关节点
|
|
|
+// [sessionId]clientuse channelid
|
|
|
+// [serviceID] 所在的网关节点
|
|
|
func (this *RoleManager) KickFromGate(sessionId uint64, serviceID string) {
|
|
|
if tmpRole, ok := this.channelRoleList[sessionId]; ok {
|
|
|
if tmpRole.CliID().SessID == sessionId && tmpRole.GetState() == ROLE_STATE_ONLINE {
|
|
|
@@ -457,7 +457,7 @@ func (this *RoleManager) ServerMaintain(state int32) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//gate端口后,game上对应role的处理
|
|
|
+// gate端口后,game上对应role的处理
|
|
|
func (this *RoleManager) GateCloseKickRole(serviceId string) {
|
|
|
for _, chRole := range this.channelRoleList {
|
|
|
if chRole.GetState() == ROLE_STATE_ONLINE && chRole.CliID().ServiceID == serviceId {
|
|
|
@@ -467,11 +467,12 @@ func (this *RoleManager) GateCloseKickRole(serviceId string) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//social通知game当前在线的玩家数量
|
|
|
+// social通知game当前在线的玩家数量
|
|
|
func (this *RoleManager) PlayerOnlineNumFromSocial(onlineNum int32) {
|
|
|
this.allGameOnlineNum = onlineNum
|
|
|
}
|
|
|
func (this *RoleManager) IsGameOnlineNumLimit() bool {
|
|
|
+ util.ErrorF("online num :%v", this.allGameOnlineNum)
|
|
|
if this.allGameOnlineNum >= 6000 {
|
|
|
return true
|
|
|
}
|
|
|
@@ -510,7 +511,7 @@ func (this *RoleManager) GuildBattleBeginNtf(inBattle bool) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//文件热加载通知操作(调用该方法时文件已经重新加载,转换部分需要这边重新处理)
|
|
|
+// 文件热加载通知操作(调用该方法时文件已经重新加载,转换部分需要这边重新处理)
|
|
|
func (this *RoleManager) ServerReloadConfigNtf(cfgList []string) {
|
|
|
//转换
|
|
|
for _, cfgData := range cfgList {
|