public override void Unload()
        {
            NetHandler.Unload();
            NPCSets.Unload();
            SquireMinionTypes.Unload();
            NecromancerAccessory.Unload();
            SquireGlobalProjectile.Unload();
            IdleLocationSets.Unload();
            TargetSelectionTacticHandler.Unload();
            UserInterfaces.Unload();
            MinionTacticsGroupMapper.Unload();
            LandChunkConfigs.Unload();
            SpriteCompositionManager.Unload();
            CritterConfigs.Unload();
            AmuletOfManyMinionsWorld.Unload();
            PartyHatSystem.Unload();
            CombatPetLevelTable.Unload();
            CombatPetBuff.Unload();
            BlackCatMinion.Unload();
            QuizResult.Unload();
            DefaultPetsQuizData.Unload();

            CycleTacticHotKey       = null;
            CycleTacticsGroupHotKey = null;
            QuickDefendHotKey       = null;
        }
        public override void Load()
        {
            NetHandler.Load();
            NPCSets.Load();
            SquireMinionTypes.Load();
            NecromancerAccessory.Load();
            SquireGlobalProjectile.Load();
            IdleLocationSets.Load();
            TargetSelectionTacticHandler.Load();
            UserInterfaces.Load();
            MinionTacticsGroupMapper.Load();
            LandChunkConfigs.Load();
            SpriteCompositionManager.Load();
            CritterConfigs.Load();
            AmuletOfManyMinionsWorld.Load();
            CombatPetLevelTable.Load();
            CombatPetBuff.Load();
            DefaultPetsQuizData.Load();

            CycleTacticHotKey       = RegisterHotKey("Cycle Minion Tactic", "K");
            CycleTacticsGroupHotKey = RegisterHotKey("Cycle Tactics Group", "L");
            QuickDefendHotKey       = RegisterHotKey("Minion Quick Defend", "V");
            if (!Main.dedServ)
            {
                AddEquipTexture(null, EquipType.Legs, "RoyalGown_Legs", "AmuletOfManyMinions/Items/Armor/RoyalArmor/RoyalGown_Legs");
            }
        }
Esempio n. 3
0
 public override void SetDefaults()
 {
     base.SetDefaults();
     Main.buffNoSave[Type]        = true;
     Main.buffNoTimeDisplay[Type] = true;
     MinionTacticsGroupMapper.AddBuffMapping(this);
 }
Esempio n. 4
0
 protected override void PostSend(BinaryWriter writer, Player player)
 {
     writer.Write(tacticsIds);
     writer.Write(selectedTactic);
     writer.Write(ignoreTargetReticle);
     MinionTacticsGroupMapper.WriteBuffMap(writer, tacticsMap);
 }
Esempio n. 5
0
        protected override void PostReceive(BinaryReader reader, int sender, Player player)
        {
            MinionTacticsPlayer minionTacticsPlayer = player.GetModPlayer <MinionTacticsPlayer>();

            byte[] tacticsIds          = reader.ReadBytes(MinionTacticsPlayer.TACTICS_GROUPS_COUNT);
            byte   selectedTactic      = reader.ReadByte();
            byte   ignoreTargetReticle = reader.ReadByte();

            // reading rest of packet directly into dict
            MinionTacticsGroupMapper.ReadBuffMap(reader, minionTacticsPlayer.MinionTacticsMap);

            minionTacticsPlayer.SetAllTactics(tacticsIds, selectedTactic);
            minionTacticsPlayer.IgnoreVanillaMinionTarget = ignoreTargetReticle;
        }
        protected override void PostReceive(BinaryReader reader, int sender, Player player)
        {
            MinionTacticsGroupMapper.ReadBuffMap(reader, out Dictionary <int, int> destDict);
            MinionTacticsPlayer modPlayer = player.GetModPlayer <MinionTacticsPlayer>();

            foreach (var pair in destDict)
            {
                modPlayer.MinionTacticsMap[pair.Key] = pair.Value;
            }
            // TODO pass the raw byte array, rather than deconstructing/reconstructing the dest dict
            if (Main.netMode == NetmodeID.Server)
            {
                new MinionGroupsPacket(player, destDict).Send(from: sender);
            }
        }
 protected override void PostSend(BinaryWriter writer, Player player)
 {
     MinionTacticsGroupMapper.WriteBuffMap(writer, tacticsMap);
 }