public static void Initialize()
        {
            if (Program.properties != null)
            {
                stopSpawns     = Program.properties.StopNPCSpawning;
                SpawnsOverride = Program.properties.NPCSpawnsOverride;
            }

            NPC.ClearNames();
            NPC.SetNames();

            //foreach (var buff in new int[] { 20, 24, 31, 39 })
            //    pvpBuff[buff] = true;

            foreach (var buff in new int[] { 20, 21, 22, 23, 24, 25, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 })
            {
                debuff[buff] = true;
            }

            foreach (var i in new int[] { 3, 4, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 24, 26, 27, 28, 29,
                                          31, 33, 34, 35, 36, 42, 50, 55, 61, 71, 72, 73, 74, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89,
                                          90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 110, 113, 114, 125, 126,
                                          128, 129, 132, 133, 134, 135, 136, 137, 138, 139, 141, 142, 143, 144, 149 })
            {
                tileFrameImportant[i] = true;
            }

            foreach (var i in new int[] { 63, 64, 65, 66, 67, 68, 130, 131 })
            {
                tileStone[i] = true;
            }

            foreach (var i in new int[] { 0, 1, 2, 6, 7, 8, 9, 10, 22, 23, 25, 30, 32, 37, 38, 39, 40, 41, 43, 44, 45,
                                          46, 47, 48, 52, 53, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 70, 75, 76, 107, 108, 109, 111, 112,
                                          115, 116, 117, 118, 119, 120, 121, 122, 123, 130, 131, 137, 138, 140, 145, 146, 147, 148 })
            {
                tileBlockLight[i] = true;
            }

            foreach (var i in new int[] { 0, 1, 2, 6, 7, 8, 9, 10, 19, 22, 23, 25, 30, 37, 38, 39, 40, 41, 43, 44, 45, 46,
                                          47, 48, 53, 54, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 70, 75, 76, 107, 108, 109, 111, 112, 116, 117,
                                          118, 119, 120, 121, 122, 123, 127, 130, 137, 138, 140, 145, 146, 147, 148 })
            {
                tileSolid[i] = true;
            }

            foreach (var i in new int[] { 1, 6, 7, 8, 9, 22, 25, 30, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 53, 56, 107,
                                          108, 111, 112, 116, 117, 118, 119, 120, 121, 122, 123, 140, 145, 146, 147, 148 })
            {
                tileMergeDirt[i] = true;
            }

            foreach (var i in new int[] { 3, 24, 28, 32, 51, 52, 61, 62, 69, 71, 73, 74, 82, 83, 84, 110, 113, 115 })
            {
                tileCut[i] = true;
            }

            foreach (var i in new int[] { 3, 4, 24, 32, 50, 61, 69, 73, 74, 82, 83, 84, 110, 113 })
            {
                tileNoFail[i] = true;
            }

            foreach (var i in new int[] { 1, 4, 5, 6, 10, 11, 12, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31 })
            {
                wallHouse[i] = true;
            }

            foreach (var i in new int[] { 82, 83, 84 })
            {
                tileAlch[i] = true;
            }

            foreach (var i in new int[] { 3, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29, 32, 33, 34, 35, 36,
                                          42, 49, 50, 52, 55, 61, 62, 69, 71, 72, 73, 74, 79, 80, 81, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98,
                                          99, 100, 101, 102, 103, 104, 106, 110, 113, 115, 125, 126 })
            {
                tileLavaDeath[i] = true;
            }

            foreach (var i in new int[] { 3, 4, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 50, 86, 87, 88, 89, 90, 91, 92,
                                          93, 94, 95, 96, 97, 98, 99, 101, 102, 110, 114 })
            {
                tileNoAttach[i] = true;
            }

            foreach (var i in new int[] { 41, 43, 44 })
            {
                tileDungeon[i] = true;
            }

            foreach (var i in new int[] { 14, 18, 19, 87, 88, 101, 114 })
            {
                tileTable[i] = true;
            }

            foreach (var i in new int[] { 4, 51, 93, 98 })
            {
                tileWaterDeath[i] = true;
            }


            foreach (var i in new int[] { 8, 12 })
            {
                tileShine[i] = 1000;
            }
            foreach (var i in new int[] { 9 })
            {
                tileShine[i] = 1050;
            }
            foreach (var i in new int[] { 7 })
            {
                tileShine[i] = 1100;
            }
            foreach (var i in new int[] { 6, 22 })
            {
                tileShine[i] = 1150;
            }
            foreach (var i in new int[] { 21 })
            {
                tileShine[i] = 1200;
            }
            foreach (var i in new int[] { 122 })
            {
                tileShine[i] = 1800;
            }
            foreach (var i in new int[] { 121 })
            {
                tileShine[i] = 1850;
            }
            foreach (var i in new int[] { 45 })
            {
                tileShine[i] = 1900;
            }
            foreach (var i in new int[] { 46 })
            {
                tileShine[i] = 2000;
            }
            foreach (var i in new int[] { 47 })
            {
                tileShine[i] = 2100;
            }
            foreach (var i in new int[] { 63, 64, 65, 66, 67, 68, 108 })
            {
                tileShine[i] = 900;
            }
            foreach (var i in new int[] { 111 })
            {
                tileShine[i] = 850;
            }
            foreach (var i in new int[] { 107 })
            {
                tileShine[i] = 950;
            }
            foreach (var i in new int[] { 129 })
            {
                tileShine[i] = 300;
            }
            foreach (var i in new int[] { 109, 110, 117, 116 })
            {
                tileShine[i] = 9000;
            }
            foreach (var i in new int[] { 118 })
            {
                tileShine[i] = 8000;
            }
            foreach (var i in new int[] { 125 })
            {
                tileShine[i] = 600;
            }


            foreach (var i in new int[] { 14, 16, 18, 19, 87, 88, 101, 114 })
            {
                tileSolidTop[i] = true;
            }


            for (int l = 0; l < Item.MAX_ITEMS + 1; l++)
            {
                item[l] = new Item();
            }
            for (int m = 0; m < NPC.MAX_NPCS + 1; m++)
            {
                npcs[m]        = new NPC();
                npcs[m].whoAmI = m;
            }
            for (int i = 0; i < MAX_PLAYERS + 1; i++)
            {
                players[i] = new Player();
            }
            for (int num2 = 0; num2 < 1001; num2++)
            {
                projectile[num2] = new Projectile();
            }
            for (int num10 = 0; num10 < Liquid.resLiquid; num10++)
            {
                liquid[num10] = new Liquid();
            }
            for (int num11 = 0; num11 < 10000; num11++)
            {
                liquidBuffer[num11] = new LiquidBuffer();
            }

            teamColor[0] = new Color(255, 255, 255);
            teamColor[1] = new Color(230, 40, 20);
            teamColor[2] = new Color(20, 200, 30);
            teamColor[3] = new Color(75, 90, 255);
            teamColor[4] = new Color(200, 180, 0);

            NetPlay.Init();
        }
Esempio n. 2
0
        public static void Initialize()
        {
            //if (Main.webProtect)
            //{
            //    getAuth();
            //    while (!Main.webAuth)
            //    {
            //        Statics.IsActive = false;
            //    }
            //}

            Main.stopSpawns = Program.properties.StopNPCSpawning;

            Main.tileShine[6]  = 1150;
            Main.tileShine[7]  = 1100;
            Main.tileShine[8]  = 1000;
            Main.tileShine[9]  = 1050;
            Main.tileShine[12] = 1000;
            Main.tileShine[21] = 1000;
            Main.tileShine[22] = 1150;
            Main.tileShine[45] = 1900;
            Main.tileShine[46] = 2000;
            Main.tileShine[47] = 2100;
            Main.tileShine[63] = 900;
            Main.tileShine[64] = 900;
            Main.tileShine[65] = 900;
            Main.tileShine[66] = 900;
            Main.tileShine[67] = 900;
            Main.tileShine[68] = 900;

            foreach (int i in new int[] { 20, 21, 22, 23, 24, 25 })
            {
                Main.debuff[i] = true;
            }

            foreach (int i in new int[] { 3, 24, 28, 32, 51, 52, 61, 62, 69, 71, 73, 74, 82, 83, 84 })
            {
                Main.tileCut[i] = true;
            }

            foreach (int i in new int[] { 82, 83, 84 })
            {
                Main.tileAlch[i] = true;
            }

            foreach (int i in new int[] { 3, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 24, 26, 27, 28, 29,
                                          31, 33, 34, 35, 36, 42, 50, 55, 61, 71, 72, 73, 74, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88,
                                          89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 })
            {
                Main.tileFrameImportant[i] = true;
            }

            foreach (int i in new int[] { 3, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 28, 29, 32, 33,
                                          34, 35, 36, 42, 49, 50, 52, 55, 61, 62, 69, 71, 72, 73, 74, 79, 80, 81, 86, 87, 88, 89, 91, 92,
                                          93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106 })
            {
                Main.tileLavaDeath[i] = true;
            }

            foreach (int i in new int[] { 0, 1, 2, 6, 7, 8, 9, 10, 22, 23, 25, 30, 32, 37, 38, 39, 40, 41, 43, 44,
                                          45, 46, 47, 48, 51, 52, 53, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 70, 75, 76 })
            {
                Main.tileBlockLight[i] = true;
            }

            foreach (int i in new int[] { 14, 16, 18, 19, 87, 88, 101 })
            {
                Main.tileSolidTop[i] = true;
            }

            foreach (int i in new int[] { 3, 4, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 27, 50, 86, 87, 88, 89,
                                          90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102 })
            {
                Main.tileNoAttach[i] = true;
            }

            foreach (int i in new int[] { 14, 18, 19, 87, 88, 101 })
            {
                Main.tileTable[i] = true;
            }

            foreach (int i in new int[] { 4, 51, 93, 98 })
            {
                Main.tileWaterDeath[i] = true;
            }

            foreach (int i in new int[] { 1, 4, 5, 6, 10, 11, 12, 16, 17, 18, 19, 20 })
            {
                Main.wallHouse[i] = true;
            }

            foreach (int i in new int[] { 3, 4, 24, 32, 50, 61, 69, 73, 74, 82, 83, 84 })
            {
                Main.tileNoFail[i] = true;
            }

            foreach (int i in new int[] { 0, 1, 2, 6, 7, 8, 9, 10, 19, 22, 23, 25, 30, 37, 38, 39, 40, 41, 43, 44, 45, 46,
                                          47, 48, 53, 54, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 70, 75, 76 })
            {
                Main.tileSolid[i] = true;
            }

            foreach (int i in new int[] { 3, 4, 5, 11 })
            {
                Main.tileSolid[i] = false;
            }

            foreach (int i in new int[] { 63, 64, 65, 66, 67, 68 })
            {
                Main.tileStone[i] = false;
            }

            foreach (int i in new int[] { 41, 43, 44 })
            {
                Main.tileDungeon[i] = true;
            }
            for (int l = 0; l < 201; l++)
            {
                Main.item[l] = new Item();
            }
            for (int m = 0; m < NPC.MAX_NPCS + 1; m++)
            {
                Main.npcs[m]        = new NPC();
                Main.npcs[m].whoAmI = m;
            }
            for (int i = 0; i < MAX_PLAYERS + 1; i++)
            {
                Main.players[i] = new Player();
            }
            for (int num2 = 0; num2 < 1001; num2++)
            {
                Main.projectile[num2] = new Projectile();
            }
            for (int num10 = 0; num10 < Liquid.resLiquid; num10++)
            {
                Main.liquid[num10] = new Liquid();
            }
            for (int num11 = 0; num11 < 10000; num11++)
            {
                Main.liquidBuffer[num11] = new LiquidBuffer();
            }

            Main.teamColor[0] = new Color(255, 255, 255);
            Main.teamColor[1] = new Color(230, 40, 20);
            Main.teamColor[2] = new Color(20, 200, 30);
            Main.teamColor[3] = new Color(75, 90, 255);
            Main.teamColor[4] = new Color(200, 180, 0);

            NPC.SetNames();

            NetPlay.Init();
        }