public static string GetUserIdByRoleId(int rid, int serverId) { RoleMiniInfo roleMiniInfo = GetRoleMiniInfo(rid, serverId); if (null != roleMiniInfo) { return(roleMiniInfo.userId); } return(""); }
public static int GetZoneIdByRoleId(long rid, int serverId) { RoleMiniInfo roleMiniInfo = GetRoleMiniInfo(rid, serverId); if (null != roleMiniInfo) { return(roleMiniInfo.zoneId); } return(0); }
public static string GetUserIdByRoleId(int rid, int serverId) { RoleMiniInfo roleMiniInfo = CacheManager.GetRoleMiniInfo((long)rid, serverId); string result; if (null != roleMiniInfo) { result = roleMiniInfo.userId; } else { result = ""; } return(result); }
public static int GetZoneIdByRoleId(long rid, int serverId) { RoleMiniInfo roleMiniInfo = CacheManager.GetRoleMiniInfo(rid, serverId); int result; if (null != roleMiniInfo) { result = roleMiniInfo.zoneId; } else { result = 0; } return(result); }
public static void OnInitGame(GameClient client) { lock (roleMiniInfoDict) { RoleMiniInfo roleMiniInfo; if (!roleMiniInfoDict.TryGetValue(client.ClientData.RoleID, out roleMiniInfo)) { roleMiniInfo = new RoleMiniInfo() { roleId = client.ClientData.RoleID, zoneId = client.ClientData.ZoneID, userId = client.strUserID, }; } } }
public static void OnInitGame(GameClient client) { lock (CacheManager.roleMiniInfoDict) { RoleMiniInfo roleMiniInfo; if (!CacheManager.roleMiniInfoDict.TryGetValue((long)client.ClientData.RoleID, out roleMiniInfo)) { roleMiniInfo = new RoleMiniInfo { roleId = (long)client.ClientData.RoleID, zoneId = client.ClientData.ZoneID, userId = client.strUserID }; } } }