예제 #1
0
        private IEnumerator InitHandCoroutine()
        {
            while (ModReferences.rightHandTransform == null)
            {
                yield return(null);

                LocalPlayer.Inventory?.SendMessage("GetRightHand");
            }
            yield return(null);

            MoreCraftingReceipes.Initialize();

            //Multishot
            Effects.Multishot.localPlayerInstance = Effects.Multishot.Create(LocalPlayer.Transform, ModReferences.rightHandTransform);
            Effects.Multishot.localPlayerInstance.SetActive(false);

            //yield return null;
            //do
            //{
            //    if (LocalPlayer.Inventory.Owns(79))
            //        LocalPlayer.Inventory.Equip(79, false);

            //}
            //while (PlayerInventoryMod.originalBowModel == null);
        }
예제 #2
0
        public static void ResetAllStats()
        {
            COTFEvents.ClearEvents();
            foreach (var item in instance.ExtraCarryingCapactity)
            {
                item.Value.Remove();
            }

            activeBuffs.Clear();
            SpellDataBase.Reset();

            foreach (var stat in instance.allStats)
            {
                stat.Reset();
            }
            SpellActions.ShieldCastTime = 0;
            SpellActions.SeekingArrow_ChangeTargetOnHit = false;
            SpellActions.SeekingArrow_TimeStamp         = 0;
            BlackFlame.DmgAmp            = 1;
            BlackFlame.GiveAfterburn     = false;
            BlackFlame.GiveDamageBuff    = false;
            WeaponInfoMod.AlwaysIgnite   = false;
            AutoPickupItems.radius       = 7.5f;
            Berserker.active             = false;
            instance.damageAbsorbAmounts = new float[2];

            instance.GeneratedResources.Clear();

            MoreCraftingReceipes.LockAll();
            MoreCraftingReceipes.BlockUpdating = true;
            instance.AssignLevelAttributes();
            ReapplyAllItems();
            ReapplyAllPerks();
            ReapplyAllSpell();
            foreach (var extraItem in instance.ExtraCarryingCapactity)
            {
                extraItem.Value.NewApply();
            }
            MoreCraftingReceipes.BlockUpdating = false;
            MoreCraftingReceipes.AddReceipes();
        }