Esempio n. 1
0
        public static Position GetDuelingAreaDrop(WorldRealm realm)
        {
            var pos = new Position(RealmConstants.DuelStagingAreaDrop);

            pos.Instance = realm.StandardRules.GetDefaultInstanceID();
            return(pos);
        }
        private static EphemeralRealm Initialize(Player owner, WorldRealm baseRealm, List <Realm> appliedRealms)
        {
            string          key          = baseRealm.Realm.Id.ToString();
            RulesetTemplate template     = null;
            RulesetTemplate prevTemplate = baseRealm.RulesetTemplate;

            for (int i = 0; i < appliedRealms.Count; i++)
            {
                var appliedRealm = appliedRealms[i];
                key     += $".{appliedRealm.Id}";
                template = RealmManager.GetEphemeralRealmRulesetTemplate(key);
                if (template == null)
                {
                    template = RulesetTemplate.MakeRuleset(prevTemplate, appliedRealm);
                    RealmManager.CacheEphemeralRealmTemplate(key, template);
                }
                prevTemplate = template;
            }

            if (template == null)
            {
                template = prevTemplate;
            }
            return(new EphemeralRealm(owner, template));
        }