コード例 #1
0
        internal static Landblock GetNewEphemeralLandblock(uint landcell, Player owner, List <ACE.Entity.Models.Realm> realmTemplates)
        {
            EphemeralRealm ephemeralRealm;

            lock (realmsLock)
                ephemeralRealm = EphemeralRealm.Initialize(owner, realmTemplates);
            var iid       = LandblockManager.GetFreeInstanceID(true, ephemeralRealm.RulesetTemplate.Realm.Id, (ushort)(landcell >> 16));
            var longcell  = ((ulong)iid << 32) | landcell;
            var landblock = LandblockManager.GetLandblock(longcell, false, false, ephemeralRealm);

            log.Info($"GetNewEphemeralLandblock created for player {owner.Name}, realm ruleset {ephemeralRealm.RulesetTemplate.Realm.Id}, longcell {longcell}.");
            return(landblock);
        }