Inheritance: World
Exemple #1
0
        static RealmManager()
        {
            Worlds[World.TUT_ID] = new Tutorial(false);
            Worlds[World.NEXUS_ID] = Worlds[0] = new Nexus();
            Worlds[World.NEXUS_LIMBO] = new NexusLimbo();
            Worlds[World.VAULT_ID] = new Vault(true);
            Worlds[World.TEST_ID] = new Test();
            Worlds[World.RAND_REALM] = new RandomRealm();
            Worlds[World.GAUNTLET] = new GauntletMap();
            Worlds[World.WC] = new WineCellarMap();
            Worlds[World.ARENA] = new ArenaMap();
            Worlds[World.SHOP] = new ShopMap("Default");
            Worlds[World.MARKET] = new MarketMap();

            Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);

            //AddWorld(GameWorld.AutoName(1, true));

            Mines.Add(0, Worlds[World.NEXUS_ID] as Mine);

            MerchantLists.GetKeys();
            MerchantLists.AddPetShop();
            MerchantLists.AddCustomShops();
            foreach (var i in MerchantLists.shopLists)
            {
                ShopWorlds.TryAdd(i.Key, AddWorld(new ShopMap(i.Key)));
            }
        }
 public RealmPortalMonitor(Nexus nexus)
 {
     this.nexus = nexus;
     lock (worldLock)
         foreach (var i in RealmManager.Worlds)
         {
             if (i.Value is GameWorld)
                 WorldAdded(i.Value);
         }
 }
 public RealmPortalMonitor(RealmManager manager)
 {
     this.nexus = manager.Worlds[World.NEXUS_ID] as Nexus;
     lock (worldLock)
         foreach (var i in manager.Worlds)
         {
             if (i.Value is GameWorld)
                 WorldAdded(i.Value);
         }
 }
 public RealmPortalMonitor(RealmManager manager)
 {
     log.Info("Initalizing Portal Monitor...");
     this.manager = manager;
     nexus = manager.Worlds[World.NEXUS_ID] as Nexus;
     lock (worldLock)
         foreach (var i in manager.Worlds)
         {
             if (i.Value is GameWorld)
                 WorldAdded(i.Value);
         }
     log.Info("Portal Monitor initialized.");
 }
Exemple #5
0
        public RealmManager()
        {
            AddWorld(World.TUT_ID, new Tutorial(true));
            AddWorld(World.NEXUS_ID, Worlds[0] = new Nexus());
            AddWorld(World.NEXUS_LIMBO, new NexusLimbo());
            AddWorld(World.VAULT_ID, new Vault(true));
            AddWorld(World.TEST_ID, new Test());
            AddWorld(World.RAND_REALM, new RandomRealm());
            AddWorld(World.GAUNTLET, new GauntletMap());

            Monitor = new RealmPortalMonitor(this);

            //AddWorld(new GameWorld(1, "Medusa", true));
        }
        static RealmManager()
        {
            Worlds[World.TUT_ID] = new Tutorial(true);
            Worlds[World.NEXUS_ID] = Worlds[0] = new Nexus();
            Worlds[World.NEXUS_LIMBO] = new NexusLimbo();
            Worlds[World.VAULT_ID] = new Vault(true);
            Worlds[World.TEST_ID] = new Test();
            Worlds[World.RAND_REALM] = new RandomRealm();
            Worlds[World.GAUNTLET] = new GauntletMap();

            Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);

            AddWorld(new GameWorld(1, "Medusa", true));
        }
        static RealmManager()
        {
            pendings = new ConcurrentQueue<Action<RealmTime>>[5];
            for (int i = 0; i < 5; i++)
                pendings[i] = new ConcurrentQueue<Action<RealmTime>>();

            Worlds[World.TUT_ID] = new Tutorial(true);
            Worlds[World.NEXUS_ID] = Worlds[0] = new Nexus();
            Worlds[World.NEXUS_LIMBO] = new NexusLimbo();
            Worlds[World.VAULT_ID] = new Vault(true);
            Worlds[World.TEST_ID] = new Test();
            Worlds[World.RAND_REALM] = new RandomRealm();
            Worlds[World.BANANA_ID] = new Banana();

            Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);

            AddWorld(new GameWorld(1, "Medusa", true));
        }
        static RealmManager()
        {
            Worlds[World.TUT_ID] = new Tutorial(true);
            Worlds[World.NEXUS_ID] = Worlds[0] = new Nexus();
            Worlds[World.NEXUS_LIMBO] = new NexusLimbo();
            Worlds[World.VAULT_ID] = new Vault(true);
            Worlds[World.TEST_ID] = new Test();
            Worlds[World.RAND_REALM] = new RandomRealm();
            Worlds[World.GAUNTLET] = new GauntletMap();
            Worlds[World.WC] = new WineCellarMap();
            Worlds[World.ARENA] = new ArenaMap();
            Worlds[World.SHOP] = new ShopMap("Default");
            Worlds[World.MARKET] = new MarketMap();
            Worlds[World.ARENA_FREE] = new BattleArenaMap2();
            Worlds[World.ARENA_PAID] = new BattleArenaMap();
            Worlds[World.OCEAN] = new OceanTrench();
            Worlds[World.TOMBANCIENTS] = new TombMap();
            Worlds[World.SPRITEWORLD] = new SpriteWorld();
            Worlds[World.ZOMBIEARENA] = new ZombieMap();
            Worlds[World.UNDEADLAIR] = new UndeadLair();
            Worlds[World.KITCHEN] = new Kitchen();
            Worlds[World.ISLAND] = new Island();
            Worlds[World.PIRATECAVE] = new PirateCave();
            Worlds[World.VOIDWORLD] = new VoidWorld();
            Worlds[World.BEACHZONE] = new BeachZone();
            Worlds[World.SNAKEPIT] = new SnakePit();
            Worlds[World.MANOR] = new Manor();
            Worlds[World.SPIDERDEN] = new SpiderDen();
            Worlds[World.DAVYJ] = new Davy();
            Worlds[World.DRAGONLORDS] = new Dragonlord();
            Worlds[World.DOOMCRYSTAL] = new DoomCrystal();
            Worlds[World.DOOMCELLAR] = new Dcellar();
            Worlds[World.FJUNGLE] = new Jungle();
            Worlds[World.DRACONIS] = new Draconis();
            Worlds[World.OCASTLE] = new OryxsCastle();
            Worlds[World.OCHAMBER] = new OryxsChamber();
            Worlds[World.CHOCHAMBER] = new ChristmasOryxsChamber();
            Worlds[World.ELDERPCAVE] = new ElderPirateCave();
            Worlds[World.ELDERSDEN] = new ElderSpiderDen();
            Worlds[World.ELDERSPIT] = new ElderSnakePit();
            Worlds[World.ELDERSPRITE] = new ElderSpriteWorld();
            Worlds[World.ELDERUNDEAD] = new ElderUndeadL();
            Worlds[World.ELDERABYSS] = new ElderAbyss();
            Worlds[World.ELDERDRACONIS] = new ElderDraconis();
            Worlds[World.ELDERTOMB] = new ElderTombMap();
            Worlds[World.NEXUSDEF] = new NexusDefense();
            //        Worlds[World.SHATTERS] = new Shatters();
            Worlds[World.EC] = new EC();
            Worlds[World.ADM_ID] = new Admin();

            Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);

            AddWorld(GameWorld.AutoName(1, true));

            MerchantLists.GetKeys();
            MerchantLists.AddPetShop();
            MerchantLists.AddCustomShops();
            foreach (var i in MerchantLists.shopLists)
            {
                ShopWorlds.TryAdd(i.Key, AddWorld(new ShopMap(i.Key)));
            }
        }
        static RealmManager()
        {
            Worlds[World.TUT_ID] = new Tutorial(true);
            Worlds[World.NEXUS_ID] = Worlds[0] = new Nexus();
            Worlds[World.NEXUS_LIMBO] = new NexusLimbo();
            Worlds[World.VAULT_ID] = new Vault(true);
            Worlds[World.TEST_ID] = new Test();
            Worlds[World.RAND_REALM] = new RandomRealm();

            Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);

            AddWorld(GameWorld.AutoName(1, true));

            MerchantLists.GetKeys();
            MerchantLists.AddPetShop();
            MerchantLists.AddCustomShops();
            foreach (var i in MerchantLists.shopLists)
                ShopWorlds.TryAdd(i.Key, AddWorld(new ShopMap(i.Key)));
        }
        //public List<Player> GuildMembersOf(string guild)
        //{
        //    return (from i in Worlds where i.Key != 0 from e in i.Value.Players where String.Equals(e.Value.Guild, guild, StringComparison.CurrentCultureIgnoreCase) select e.Value).ToList();
        //}

        public void Initialize()
        {
            log.Info("Initializing Realm Manager...");

            GameData = new XmlData();
            Behaviors = new BehaviorDb(this);
            GeneratorCache.Init();
            MerchantLists.InitMerchatLists(GameData);

            AddWorld(World.NEXUS_ID, Worlds[0] = new Nexus());
            AddWorld(World.MARKET, new ClothBazaar());
            AddWorld(World.TEST_ID, new Test());
            AddWorld(World.TUT_ID, new Tutorial(true));
            AddWorld(World.DAILY_QUEST_ID, new DailyQuestRoom());
            Monitor = new RealmPortalMonitor(this);

            Task.Factory.StartNew(() => GameWorld.AutoName(1, true)).ContinueWith(_ => AddWorld(_.Result), TaskScheduler.Default);

            Chat = new ChatManager(this);
            Commands = new CommandManager(this);

            log.Info("Realm Manager initialized.");
        }
Exemple #11
0
        public void Initialize()
        {
            log.Info("Initializing Realm Manager...");

            this.GameData = new XmlData();
            this.Behaviors = new BehaviorDb(this);

            AddWorld(World.NEXUS_ID, Worlds[0] = new Nexus());
            Monitor = new RealmPortalMonitor(this);

            AddWorld(World.TUT_ID, new Tutorial(true));
            AddWorld(World.NEXUS_LIMBO, new NexusLimbo());
            AddWorld(World.VAULT_ID, new Vault(true));
            AddWorld(World.TEST_ID, new Test());
            AddWorld(World.RAND_REALM, new RandomRealm());
            AddWorld(World.GAUNTLET, new GauntletMap());

            //AddWorld(new GameWorld(1, "Medusa", true));

            Chat = new ChatManager(this);
            Commands = new CommandManager(this);

            log.Info("Realm Manager initialized.");
        }
        public void Initialize()
        {
            log.Info("Initializing Realm Manager...");

            GameData = new XmlData();
            Behaviors = new BehaviorDb(this);

            MerchantLists.InitMerchantLists(GameData);

            AddWorld(World.NEXUS_ID, Worlds[0] = new Nexus());
            Monitor = new RealmPortalMonitor(this);

            AddWorld(World.TUT_ID, new Tutorial(true));
            AddWorld(World.NEXUS_LIMBO, new NexusLimbo());
            AddWorld(World.VAULT_ID, new Vault(true));
            AddWorld(World.TEST_ID, new Test());
            AddWorld(World.RAND_REALM, new RandomRealm());
            AddWorld(World.PVP, new PVPArena());
            AddWorld(World.SHOP_ID, new Shop());

            if (Program.Settings.GetValue<bool>("hasRealm"))
                AddWorld(GameWorld.AutoName(1, true));

            Chat = new ChatManager(this);
            Commands = new CommandManager();

            UnusualEffects.Init();

            log.Info("Realm Manager initialized.");
        }