1234567891011121314151617181920212223242526 |
- using System.Collections.Generic;
- namespace ET.Server
- {
- public static class RealmGameAddressHelper
- {
- public static StartSceneConfig GetGame(int zone)
- {
- List<StartSceneConfig> zoneGames = StartSceneConfigCategory.Instance.Games[zone];
-
- int n = RandomGenerator.RandomNumber(0, zoneGames.Count);
- return zoneGames[n];
- }
-
- public static StartSceneConfig GetGame(int zone, long accountId)
- {
- List<StartSceneConfig> zoneGames = StartSceneConfigCategory.Instance.Games[zone];
-
- int n = accountId.GetHashCode() % zoneGames.Count;
- return zoneGames[n];
- }
- }
- }
|