RealmGateAddressHelper.cs 423 B

1234567891011121314151617
  1. using System.Collections.Generic;
  2. namespace ET.Server
  3. {
  4. public static partial class RealmGateAddressHelper
  5. {
  6. public static StartSceneConfig GetGate(int zone, string account)
  7. {
  8. ulong hash = (ulong)account.GetLongHashCode();
  9. List<StartSceneConfig> zoneGates = StartSceneConfigCategory.Instance.GetBySceneType(zone, SceneType.Gate);
  10. return zoneGates[(int)(hash % (ulong)zoneGates.Count)];
  11. }
  12. }
  13. }