示例#1
0
        private void PlayerOnUpdateArmorSets(Player.orig_UpdateArmorSets orig, Terraria.Player self, int i)
        {
            int  head   = self.head;
            int  body   = self.body;
            int  legs   = self.legs;
            Item armor0 = self.armor[0].Clone();
            Item armor1 = self.armor[1].Clone();
            Item armor2 = self.armor[2].Clone();

            int   solarCounter        = self.solarCounter;
            bool  vortexStealthActive = self.vortexStealthActive;
            float beetleCounter       = self.beetleCounter;

            orig(self, i);
            String setBonus = self.setBonus;

            int   solarCounter2        = self.solarCounter;
            bool  vortexStealthActive2 = self.vortexStealthActive;
            float beetleCounter2       = self.beetleCounter;
            bool  stadustBuff          = self.FindBuffIndex(187) != -1;

            self.head                = self.armor[10].headSlot;
            self.body                = self.armor[11].bodySlot;
            self.legs                = self.armor[12].legSlot;
            self.armor[0]            = self.armor[10];
            self.armor[1]            = self.armor[11];
            self.armor[2]            = self.armor[12];
            self.solarCounter        = solarCounter;
            self.vortexStealthActive = vortexStealthActive;
            self.beetleCounter       = beetleCounter;

            orig(self, i);
            self.GetModPlayer <ArmorSocialPlayer>().secondSetBonus = self.setBonus;
            if (self.head == 101 && self.body == 66 && self.legs == 55 && ArmorSocialConfig.BalanceSpectreHealing && ArmorSocialConfig.ArmorSocialMode == setBonusOnly)
            {
                self.magicDamage -= .4f;
            }

            self.solarCounter        = Math.Max(self.solarCounter, solarCounter2);
            self.vortexStealthActive = self.vortexStealthActive || vortexStealthActive2;
            self.beetleCounter       = Math.Max(self.beetleCounter, beetleCounter2);
            if (stadustBuff && self.FindBuffIndex(187) == -1)
            {
                self.AddBuff(187, 3600);
            }

            self.head     = head;
            self.body     = body;
            self.legs     = legs;
            self.armor[0] = armor0;
            self.armor[1] = armor1;
            self.armor[2] = armor2;
            self.setBonus = setBonus;
        }
示例#2
0
 public override void UpdateEquip(Terraria.Player player)
 {
     player.AddBuff(BuffID.BabyGrinch, -1);
     player.UpdatePet(ProjectileID.BabyGrinch);
 }