Ejemplo n.º 1
0
        public static void HandlePacket(BinaryReader bb)
        {
            byte msg = bb.ReadByte();

            if (Debug)
            {
                ModContent.GetInstance <Fargowiltas>().Logger.Error((Main.netMode == NetmodeID.Server ? "--SERVER-- " : "--CLIENT-- ") + "HANDING MESSAGE: " + msg);
            }

            try
            {
                if (msg == SummonNPCFromClient)
                {
                    if (Main.netMode == NetmodeID.Server)
                    {
                        int    playerID            = bb.ReadByte();
                        int    bossType            = bb.ReadInt16();
                        bool   spawnMessage        = bb.ReadBoolean();
                        int    npcCenterX          = bb.ReadInt32();
                        int    npcCenterY          = bb.ReadInt32();
                        string overrideDisplayName = bb.ReadString();
                        bool   namePlural          = bb.ReadBoolean();

                        Fargowiltas.SpawnBoss(Main.player[playerID], bossType, spawnMessage, new Vector2(npcCenterX, npcCenterY), overrideDisplayName, namePlural);
                    }
                }
            }
            catch (Exception e)
            {
                ModContent.GetInstance <Fargowiltas>().Logger.Error((Main.netMode == NetmodeID.Server ? "--SERVER-- " : "--CLIENT-- ") + "ERROR HANDLING MSG: " + msg.ToString() + ": " + e.Message);
                ModContent.GetInstance <Fargowiltas>().Logger.Error(e.StackTrace);
                ModContent.GetInstance <Fargowiltas>().Logger.Error("-------");
            }
        }
Ejemplo n.º 2
0
        public override void Load()
        {
            Instance = this;

            summonTracker = new MutantSummonTracker();

            HomeKey   = RegisterHotKey("Quick Recall/Mirror", "Home");
            RodKey    = RegisterHotKey("Quick Rod of Discord", "E");
            CustomKey = RegisterHotKey("Quick Use Custom (Bottom Left Inventory Slot)", "K");

            mods = new string[]
            {
                "FargowiltasSouls",    // Fargo's Souls
                "Bluemagic",           // Elemental Unleash / Blushiemagic's Mod
                "CalamityMod",         // Calamity
                "CookieMod",           // Cookie Mod
                "CrystiliumMod",       // Crystilium
                "GRealm",              // GRealm
                "JoostMod",            // JoostMod
                "TrueEater",           // Nightmares Unleashed
                "SacredTools",         // SacredTools / Shadows of Abaddon
                "SpiritMod",           // Spirit
                "ThoriumMod",          // Thorium
                "W1KModRedux",         // W1K's Mod Redux
                "EchoesoftheAncients", // Echoes of the Ancients
                "ForgottenMemories",   // Beyond the Forgotten Ages
                "Disarray",            // Disarray
                "ElementsAwoken",      // Elements Awoken
                "Laugicality",         // Enigma
                "Split",               // Split
                "Antiaris",            // Antiaris
                "AAMod",               // Ancients Awakened
                "TrelamiumMod",        // Trelamium
                "pinkymod",            // Pinkymod
                "Redemption",          // Mod of Redemption
                "Jetshift",            // Jetshift
                "Ocram",               // Ocram 'n Stuff
                "CSkies",              // Celestial Skies
            };

            ModLoaded = new Dictionary <string, bool>();
            foreach (string mod in mods)
            {
                ModLoaded.Add(mod, false);
            }

            AddToggle("Mutant", "Mutant Can Spawn", "MutantMask", "ffffff");
            AddToggle("Abom", "Abominationn Can Spawn", "AbominationnMask", "ffffff");
            //AddToggle("Devi", "Deviantt Can Spawn", "LumberHat", "ffffff");
            ModTranslation text = CreateTranslation("Devi");

            text.SetDefault("[i:" + ItemID.RuneHat + "][c/ffffff: Deviantt Can Spawn]");
            AddTranslation(text);

            AddToggle("Lumber", "Lumberjack Can Spawn", "LumberHat", "ffffff");

            // DD2 Banner Effect hack
            ItemID.Sets.BannerStrength = ItemID.Sets.Factory.CreateCustomSet(new ItemID.BannerEffect(1f));
        }
Ejemplo n.º 3
0
        public override void Load()
        {
            Instance = this;

            summonTracker   = new MutantSummonTracker();
            dialogueTracker = new DevianttDialogueTracker();
            dialogueTracker.AddVanillaDialogue();

            HomeKey   = KeybindLoader.RegisterKeybind(this, "Quick Recall/Mirror", "Home");
            RodKey    = KeybindLoader.RegisterKeybind(this, "Quick Rod of Discord", "E");
            CustomKey = KeybindLoader.RegisterKeybind(this, "Quick Use Custom (Bottom Left Inventory Slot)", "K");

            StatKey = KeybindLoader.RegisterKeybind(this, "Open Stat Sheet", "M");

            _userInterfaceManager = new UIManager();
            _userInterfaceManager.LoadUI();

            mods = new string[]
            {
                "FargowiltasSouls", // Fargo's Souls
                "FargowiltasSoulsDLC",
                "ThoriumMod",
                "CalamityMod"
            };

            ModLoaded = new Dictionary <string, bool>();
            foreach (string mod in mods)
            {
                ModLoaded.Add(mod, false);
            }

            AddToggle("Mods.Fargowiltas.Mutant", "Mutant Can Spawn", ModContent.ItemType <MutantMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Abom", "Abominationn Can Spawn", ModContent.ItemType <AbominationnMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Devi", "Deviantt Can Spawn", ModContent.ItemType <DevianttMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Lumber", "Lumberjack Can Spawn", ModContent.ItemType <LumberjackMask>(), "ffffff");
            AddToggle("Mods.Fargowiltas.Squirrel", "Squirrel Can Spawn", ItemID.TopHat, "ffffff");

            CaughtNPCItem.RegisterItems(this);

            // DD2 Banner Effect hack
            ItemID.Sets.BannerStrength = ItemID.Sets.Factory.CreateCustomSet(new ItemID.BannerEffect(1f));
        }