GetSkill() public method

public GetSkill ( int SkillNo ) : int
SkillNo int
return int
Exemplo n.º 1
0
 public void onLanding(float fallSpeed)
 {
     if (isSwimming == false)
     {
         float fallspeedAdjusted = fallSpeed - ((float)PlayerSkills.GetSkill(Skills.SkillAcrobat) * 0.13f);
         //Do stuff with acrobat here. In the mean time a flat skill check.
         if (fallspeedAdjusted >= 3.5f)
         {
             //Debug.Log("Fallspeed = " + fallSpeed + " adjusted down to " + fallspeedAdjusted) ;
             ApplyDamage(Random.Range(1, 5));                //TODO:As a function of the acrobat skill versus fall.
         }
         aud.clip = GameWorldController.instance.getMus().SoundEffects[0];
         aud.Play();
     }
 }
Exemplo n.º 2
0
        public override void Run(string[] args)
        {
            if (args.Length != 2)
            {
                Console.instance.Print("Usage: raise_skill <skill> <amount>");
                return;
            }

            string name   = args[0];
            int    amount = int.Parse(args[1]);
            Skills skills = Player.m_localPlayer.GetSkills();

            foreach (Skills.SkillDef skillDef in skills.m_skills)
            {
                Jotunn.Logger.LogInfo(skillDef.m_skill.ToString().ToLower());
                if (skillDef.m_skill.ToString().ToLower() == name)
                {
                    Skills.Skill skill = skills.GetSkill(skillDef.m_skill);
                    skill.m_level += amount;
                    skill.m_level  = Mathf.Clamp(skill.m_level, 0.0f, 100f);
                    Player.m_localPlayer.Message(MessageHud.MessageType.TopLeft, "Skill incresed " + skill.m_info.m_skill.ToString() + ": " + (object)(int)skill.m_level, 0, skill.m_info.m_icon);
                    Console.instance.Print("Skill " + skillDef.m_skill.ToString() + " = " + skill.m_level.ToString());
                    return;
                }
            }

            Console.instance.Print("Skill not found " + name);
        }
Exemplo n.º 3
0
 public void GetSkill()
 {
     if (skill.GetSkill(m_PlayerHandler))
     {
         TurnOnSkillIcon();
     }
 }
    public void GetSkill()
    {
        if (skill.GetSkill(m_GodHandler))
        {
            TurnOnSkillIcon();
            if (skill.name == "Pickup Objects")
            {
                pickupSkill.skillActive = true;
            }

            if (skill.name == "Arrow Grab")
            {
                arrowSkill.skillActive = true;
            }

            if (skill.name == "Health Swap")
            {
                healthSkill.skillActive = true;
            }

            if (skill.name == "Buff Steal")
            {
                buffSkill.skillActive = true;
            }
        }
    }
Exemplo n.º 5
0
            /*
             * private static void Prefix(Skills __instance, Skills.SkillType skillType, float factor = 1f)
             * {
             *
             *
             * }*/

            private static void Postfix(Skills __instance, Skills.SkillType skillType, float factor = 1f)
            {
                if (Settings.isEnabled("Player") && Settings.getBool("Player", "experienceGainedNotifications"))
                {
                    Skills.Skill skill   = __instance.GetSkill(skillType);
                    float        percent = skill.m_accumulator / (skill.GetNextLevelRequirement() / 100);
                    __instance.m_player.Message(MessageHud.MessageType.TopLeft, skill.m_info.m_skill + " [" + Helper.tFloat(skill.m_accumulator, 2) + "/" + Helper.tFloat(skill.GetNextLevelRequirement(), 2) + "] (" + Helper.tFloat(percent, 0) + "%)", 0, skill.m_info.m_icon);
                }
            }
Exemplo n.º 6
0
        public static float GetSkillLevel(Skills playerSkills, Skills.SkillType skillType)
        {
            if (playerSkills != null)
            {
                return(playerSkills.GetSkill(skillType).m_level);
            }

            return(1);
        }
Exemplo n.º 7
0
 private static void Postfix(Skills __instance, Skills.SkillType skillType, float factor = 1f)
 {
     if (Configuration.Current.Hud.IsEnabled && Configuration.Current.Hud.experienceGainedNotifications)
     {
         Skills.Skill skill   = __instance.GetSkill(skillType);
         float        percent = skill.m_accumulator / (skill.GetNextLevelRequirement() / 100);
         __instance.m_player.Message(MessageHud.MessageType.TopLeft, skill.m_info.m_skill + " [" + Helper.tFloat(skill.m_accumulator, 2) + "/" + Helper.tFloat(skill.GetNextLevelRequirement(), 2) + "] (" + Helper.tFloat(percent, 0) + "%)", 0, skill.m_info.m_icon);
     }
 }
Exemplo n.º 8
0
 public void AddSkill(Skills skill)
 {
     if (gearValue >= skill.GearsNeeded)
     {
         gearValue    -= skill.GearsNeeded;
         gearText.text = gearValue.ToString();
         enabledSkills.Add(skill);
         skill.GetSkill(this);
     }
 }
Exemplo n.º 9
0
        //http://wpdev.sourceforge.net/docs/formats/csharp/art.html
        //https://uo.stratics.com/heptazane/fileformats.shtml#3.3


        static void Main(string[] args)
        {
            Stopwatch w = Stopwatch.StartNew();

            FileManager.UoFolderPath = @"E:\Giochi\Ultima Online Classic ORION";
            FileManager.LoadFiles();


            Map.Malas.Load();

            var aadwa = Map.Malas.Tiles.GetLandTile(944 >> 8, 480 >> 8);

            ushort[] pixels     = Art.ReadStaticArt(0x206A, out short width, out short height);
            ushort[] landpixels = Art.ReadLandArt(3);

            GraphicHelper.HasBody(46);

            int hue = 38;
            // 1254 = wild tiger
            //var animation = Animations.GetAnimation(1421, 0, 0, ref hue);

            /*var animation1 = Animations.GetAnimation(1253, 0, 0, ref hue);
            *  var animation2 = Animations.GetAnimation(1250, 0, 0, ref hue);*/

            var a = Fonts.GetASCII(0).GetChar('A');

            ushort[] pixelsgump = Gumps.GetGump(0x1393, out int widthgump, out int heightgump);

            Map.Felucca.Load();
            int x = 1201;
            int y = 1694;

            for (int i = 0, oy = y; i < 10; i++, oy++)
            {
                for (int j = 0, ox = x; j < 10; j++, ox++)
                {
                    var aa = Map.Felucca.GetRenderedBlock(ox, oy, 24, 24);
                }
            }

            Map.Felucca.Unload();

            Map.Malas.Load();
            x = 644;
            y = 480;
            var aaa = Map.Malas.GetRenderedBlock(x, y, 24, 24);

            // MultiComponentList components = Multi.GetMulti(50);

            var skill = Skills.GetSkill(2);

            Console.WriteLine(w.ElapsedMilliseconds + " ms");
            Console.ReadLine();
        }
Exemplo n.º 10
0
        private static void Notification(Skills __instance, Skills.SkillType skillType, float factor = 1f)
        {
            if (skillType == Skills.SkillType.None)
            {
                return;
            }

            if (Main.showXPNotifications.Value)
            {
                Skills.Skill skill = __instance.GetSkill(skillType);
                Patches.XPNotification.Show(skill, factor);
            }
        }
Exemplo n.º 11
0
        private static void ExpCommand(string[] args)
        {
            if (args.Length != 2)
            {
                Log.Info("Usage: player_giveexp <skill> <amt>");
            }

            string skillName = args[0].ToLower();
            int    amt       = int.Parse(args[1]);

            if (skillName == "farming")
            {
                Game1.player.gainExperience(Farmer.farmingSkill, amt);
            }
            else if (skillName == "foraging")
            {
                Game1.player.gainExperience(Farmer.foragingSkill, amt);
            }
            else if (skillName == "mining")
            {
                Game1.player.gainExperience(Farmer.miningSkill, amt);
            }
            else if (skillName == "fishing")
            {
                Game1.player.gainExperience(Farmer.fishingSkill, amt);
            }
            else if (skillName == "combat")
            {
                Game1.player.gainExperience(Farmer.combatSkill, amt);
            }
            else if (skillName == "luck")
            {
                Game1.player.gainExperience(Farmer.luckSkill, amt);
            }
            else
            {
                var skill = Skills.GetSkill(skillName);
                if (skill == null)
                {
                    Log.Info("No such skill exists");
                }
                else
                {
                    Game1.player.AddCustomSkillExperience(skill, amt);
                }
            }
        }
Exemplo n.º 12
0
        public static void LowerSkill(this Skills __instance, SkillType skillType, float factor = 1f)
        {
            if (skillType == SkillType.None)
            {
                return;
            }
            Skill skill = __instance.GetSkill(skillType);
            float level = skill.m_level;

            if (skill.Lower(factor))
            {
                __instance.m_player.OnSkillLevelup(skillType, skill.m_level);
                MessageHud.MessageType type = (((int)level != 0) ? MessageHud.MessageType.TopLeft : MessageHud.MessageType.Center);
                __instance.m_player.Message(type, "Skill reduced (control) $skill_" + skill.m_info.m_skill.ToString().ToLower() + ": " + (int)skill.m_level, 0, skill.m_info.m_icon);
                Gogan.LogEvent("Game", "Leveldown", skillType.ToString(), (int)skill.m_level);
            }
        }
        private static void loadExpPerLevel(IModHelper helper)
        {
            expPerLevel = new int[] { 100, 380, 770, 1300, 2150, 3300, 4800, 6900, 10000, 15000 };

            if (helper.ModRegistry.IsLoaded("spacechase0.Magic"))
            {
                magicExpPerLevel = Skills.GetSkill("magic").ExperienceCurve;
            }
            if (helper.ModRegistry.IsLoaded("spacechase0.CookingSkill"))
            {
                cookingExpPerLevel = Skills.GetSkill("cooking").ExperienceCurve;
            }
            if (helper.ModRegistry.IsLoaded("blueberry.LoveOfCooking"))
            {
                loveCookingExpPerLevel = Skills.GetSkill("blueberry.LoveOfCooking.CookingSkill").ExperienceCurve;
            }
        }
Exemplo n.º 14
0
        private void Skills_CheatRaiseSkill(On.Skills.orig_CheatRaiseSkill orig, Skills self, string name, float value)
        {
            foreach (var config in Skills.Values)
            {
                if (config.IsFromName(name))
                {
                    Skills.Skill skill         = self.GetSkill(config.UID);
                    var          localizedName = config.Name.StartsWith("$") ? Localization.instance.Translate(config.Name) : config.Name;

                    skill.m_level += value;
                    skill.m_level  = Mathf.Clamp(skill.m_level, 0f, 100f);
                    self.m_player.Message(MessageHud.MessageType.TopLeft, "Skill increased " + localizedName + ": " + (int)skill.m_level, 0, skill.m_info.m_icon);
                    Console.instance.Print("Skill " + config.Name + " = " + skill.m_level);

                    return;
                }
            }

            orig(self, name, value);
        }
Exemplo n.º 15
0
        private void Skills_CheatRaiseSkill(Skills self, string name, float value)
        {
            foreach (var config in CustomSkills.Values)
            {
                if (config.IsFromName(name))
                {
                    Skills.Skill skill         = self.GetSkill(config.UID);
                    var          localizedName = config.Name.StartsWith("$") ? Localization.instance.Localize(config.Name) : config.Name;

                    skill.m_level += value;
                    skill.m_level  = Mathf.Clamp(skill.m_level, 0f, 100f);
                    self.m_player.Message(MessageHud.MessageType.TopLeft,
                                          $"Skill increased {localizedName}: {(int)skill.m_level}", 0, skill.m_info.m_icon);
                    Console.instance.Print($"Skill {localizedName} = {skill.m_level}");
                    Logger.LogDebug($"Raised skill {localizedName} to {skill.m_level}");

                    return;
                }
            }
        }
Exemplo n.º 16
0
        private IEnumerable <Skill> GetAddedSkills()
        {
            if (!this.IsFound)
            {
                yield break;
            }

            yield return(new Skill
            {
                Type = this.CookingSkillType,
                SkillScreenPosition = 8,
                SourceRectangleForSkillIcon = new Rectangle(0, 0, 16, 16),
                SkillIconTexture = this.IconTexture,
                Professions = this.GetAddedProfessions(),
                GetSkillLevel = this.GetLevel,
                SetSkillLevel = level =>
                {
                }, // no set necessary, as the level isn't stored independently from the experience
                SetSkillExperience = ModEntry.SetExperience,
                LevelUpManager = new LevelUpManager
                {
                    IsMenu = menu =>
                             menu is SkillLevelUpMenu &&
                             this.Helper.Reflection.GetField <string>(menu, "currentSkill").GetValue() ==
                             ModEntry.SpaceCoreSkillId,
                    GetLevel = () => Game1.player.GetCustomSkillLevel(Skills.GetSkill(ModEntry.SpaceCoreSkillId)),
                    CreateNewLevelUpMenu = (skill, level) => new LevelUpMenuDecorator <SkillLevelUpMenu>(
                        skill,
                        level,
                        new SkillLevelUpMenu(ModEntry.SpaceCoreSkillId, level),
                        "professionsToChoose",
                        "leftProfessionDescription",
                        "rightProfessionDescription",
                        SkillLevelUpMenu.getProfessionDescription
                        )
                }
            });
        }
Exemplo n.º 17
0
 private void ShowSkills(string command, string[] args)
 {
     Monitor.Log(Skills.GetSkillList().Join(x => Skills.GetSkill(x).Id, "\n"), LogLevel.Info);
 }
Exemplo n.º 18
0
        public NewSkillsPage(int x, int y, int width, int height)
            : base(x, y, width, height, false)
        {
            int x1 = this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + 80;
            int y1 = this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + (int)((double)height / 2.0) + 80;

            this.playerPanel = new Rectangle(this.xPositionOnScreen + 64, this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder, 128, 192);
            if (Game1.player.canUnderstandDwarves)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11587"), Game1.mouseCursors, new Rectangle(129, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10201;
                textureComponent.rightNeighborID = 10202;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasRustyKey)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 68 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11588"), Game1.mouseCursors, new Rectangle(145, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10202;
                textureComponent.rightNeighborID = 10203;
                textureComponent.leftNeighborID  = 10201;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasClubCard)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 136 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11589"), Game1.mouseCursors, new Rectangle(161, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10203;
                textureComponent.rightNeighborID = 10204;
                textureComponent.leftNeighborID  = 10202;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasSpecialCharm)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 204 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11590"), Game1.mouseCursors, new Rectangle(176, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10204;
                textureComponent.rightNeighborID = 10205;
                textureComponent.leftNeighborID  = 10203;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasSkullKey)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 272 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11591"), Game1.mouseCursors, new Rectangle(192, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10205;
                textureComponent.rightNeighborID = 10206;
                textureComponent.leftNeighborID  = 10204;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasMagnifyingGlass)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 340 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.magnifyingglass"), Game1.mouseCursors, new Rectangle(208, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10205;
                textureComponent.rightNeighborID = 10206;
                textureComponent.leftNeighborID  = 10204;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasDarkTalisman)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 408 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\Objects:DarkTalisman"), Game1.mouseCursors, new Rectangle(225, 320, 16, 16), 4f, true);
                textureComponent.myID            = 10206;
                textureComponent.rightNeighborID = 10207;
                textureComponent.leftNeighborID  = 10205;
                textureComponent.upNeighborID    = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.hasMagicInk)
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 476 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\Objects:MagicInk"), Game1.mouseCursors, new Rectangle(241, 320, 16, 16), 4f, true);
                textureComponent.myID           = 10207;
                textureComponent.leftNeighborID = 10206;
                textureComponent.upNeighborID   = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.eventsSeen.Contains(2120303))
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 544 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\Objects:BearPaw"), Game1.mouseCursors, new Rectangle(192, 336, 16, 16), 4f, true);
                textureComponent.myID           = 10208;
                textureComponent.leftNeighborID = 10207;
                textureComponent.upNeighborID   = 4;
                specialItems.Add(textureComponent);
            }
            if (Game1.player.eventsSeen.Contains(3910979))
            {
                List <ClickableTextureComponent> specialItems     = this.specialItems;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("", new Rectangle(x1 + 612 + WALLET_MOVE_X, y1 + WALLET_MOVE_Y, 64, 64), (string)null, Game1.content.LoadString("Strings\\Objects:SpringOnionBugs"), Game1.mouseCursors, new Rectangle(208, 336, 16, 16), 4f, true);
                textureComponent.myID           = 10209;
                textureComponent.leftNeighborID = 10208;
                textureComponent.upNeighborID   = 4;
                specialItems.Add(textureComponent);
            }
            int num1 = 0;
            int num2 = LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.ru ? this.xPositionOnScreen + width - 448 - 48 + 4 : this.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 256 - 4;
            int num3 = this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - 12;
            int num4 = 4;

            while (num4 < 10)
            {
                for (int index = 0; index < (SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5); ++index)
                {
                    string professionBlurb = "";
                    string professionTitle = "";
                    bool   flag            = false;
                    int    whichProfession = -1;
                    switch (index)
                    {
                    case 0:
                        flag            = Game1.player.FarmingLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(0, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;

                    case 1:
                        flag            = Game1.player.MiningLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(3, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;

                    case 2:
                        flag            = Game1.player.ForagingLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(2, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;

                    case 3:
                        flag            = Game1.player.FishingLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(1, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;

                    case 4:
                        flag            = Game1.player.CombatLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(4, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;

                    case 5:
                        flag            = Game1.player.LuckLevel > num4;
                        whichProfession = Game1.player.getProfessionForSkill(5, num4 + 1);
                        this.parseProfessionDescription(ref professionBlurb, ref professionTitle, LevelUpMenu.getProfessionDescription(whichProfession));
                        break;
                    }
                    if (flag && (num4 + 1) % 5 == 0)
                    {
                        List <ClickableTextureComponent> skillBars        = this.skillBars;
                        ClickableTextureComponent        textureComponent = new ClickableTextureComponent(string.Concat((object)whichProfession), new Rectangle(num1 + num2 - 4 + num4 * 36, num3 + index * 56, 56, 36), (string)null, professionBlurb, Game1.mouseCursors, new Rectangle(159, 338, 14, 9), 4f, true);
                        textureComponent.myID            = num4 + 1 == 5 ? 100 + index : 200 + index;
                        textureComponent.leftNeighborID  = num4 + 1 == 5 ? index : 100 + index;
                        textureComponent.rightNeighborID = num4 + 1 == 5 ? 200 + index : -1;
                        textureComponent.downNeighborID  = 10201;
                        skillBars.Add(textureComponent);
                    }
                }
                num1 += 24;
                num4 += 5;
            }

            //////////////////////////////////
            num1 = 0;
            num4 = 4;
            while (num4 < 10)
            {
                int index_ = SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5;
                foreach (var skillName in Skills.GetSkillList())
                {
                    var    skill           = Skills.GetSkill(skillName);
                    string professionBlurb = "";
                    string professionTitle = "";
                    bool   flag            = false;
                    Skills.Skill.Profession whichProfession = null;
                    flag            = Game1.player.GetCustomSkillLevel(skill) > num4;
                    whichProfession = Skills.getProfessionFor(skill, num4 + 1);// Game1.player.getProfessionForSkill(0, num4 + 1);
                    var profLines = new List <string>();
                    if (whichProfession != null)
                    {
                        profLines.Add(whichProfession.Name);
                        profLines.AddRange(whichProfession.Description.Split('\n'));
                    }
                    this.parseProfessionDescription(ref professionBlurb, ref professionTitle, profLines);
                    if (flag && (num4 + 1) % 5 == 0 && whichProfession != null)
                    {
                        List <ClickableTextureComponent> skillBars        = this.skillBars;
                        ClickableTextureComponent        textureComponent = new ClickableTextureComponent("C" + whichProfession.Name, new Rectangle(num1 + num2 - 4 + num4 * 36, num3 + index_ * 56, 56, 36), (string)null, professionBlurb, Game1.mouseCursors, new Rectangle(159, 338, 14, 9), 4f, true);
                        textureComponent.myID            = num4 + 1 == 5 ? 100 + index_ : 200 + index_;
                        textureComponent.leftNeighborID  = num4 + 1 == 5 ? index_ : 100 + index_;
                        textureComponent.rightNeighborID = num4 + 1 == 5 ? 200 + index_ : -1;
                        textureComponent.downNeighborID  = 10201;
                        skillBars.Add(textureComponent);
                    }

                    ++index_;
                }
                num1 += 24;
                num4 += 5;
            }
            //////////////////////////////////
            for (int index = 0; index < this.skillBars.Count; ++index)
            {
                if (index < this.skillBars.Count - 1 && Math.Abs(this.skillBars[index + 1].myID - this.skillBars[index].myID) < 50)
                {
                    this.skillBars[index].downNeighborID   = this.skillBars[index + 1].myID;
                    this.skillBars[index + 1].upNeighborID = this.skillBars[index].myID;
                }
            }
            if (this.skillBars.Count > 1 && this.skillBars.Last <ClickableTextureComponent>().myID >= 200 && this.skillBars[this.skillBars.Count - 2].myID >= 200)
            {
                this.skillBars.Last <ClickableTextureComponent>().upNeighborID = this.skillBars[this.skillBars.Count - 2].myID;
            }
            for (int index = 0; index < (SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5); ++index)
            {
                int num5 = index;
                switch (num5)
                {
                case 1:
                    num5 = 3;
                    break;

                case 3:
                    num5 = 1;
                    break;
                }
                string hoverText = "";
                switch (num5)
                {
                case 0:
                    if (Game1.player.FarmingLevel > 0)
                    {
                        hoverText = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11592", (object)Game1.player.FarmingLevel) + Environment.NewLine + Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11594", (object)Game1.player.FarmingLevel);
                        break;
                    }
                    break;

                case 1:
                    if (Game1.player.FishingLevel > 0)
                    {
                        hoverText = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11598", (object)Game1.player.FishingLevel);
                        break;
                    }
                    break;

                case 2:
                    if (Game1.player.ForagingLevel > 0)
                    {
                        hoverText = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11596", (object)Game1.player.ForagingLevel);
                        break;
                    }
                    break;

                case 3:
                    if (Game1.player.MiningLevel > 0)
                    {
                        hoverText = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11600", (object)Game1.player.MiningLevel);
                        break;
                    }
                    break;

                case 4:
                    if (Game1.player.CombatLevel > 0)
                    {
                        hoverText = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11602", (object)(Game1.player.CombatLevel * 5));
                        break;
                    }
                    break;
                }
                List <ClickableTextureComponent> skillAreas       = this.skillAreas;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent(string.Concat((object)num5), new Rectangle(num2 - 128 - 48, num3 + index * 56, 148, 36), string.Concat((object)num5), hoverText, (Texture2D)null, Rectangle.Empty, 1f, false);
                textureComponent.myID            = index;
                textureComponent.downNeighborID  = index < 4 ? index + 1 : 10201;
                textureComponent.upNeighborID    = index > 0 ? index - 1 : 12341;
                textureComponent.rightNeighborID = 100 + index;
                skillAreas.Add(textureComponent);
            }
            //////////////////////////////////
            int index__ = (SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5);

            foreach (var skillName in Skills.GetSkillList())
            {
                var skill = Skills.GetSkill(skillName);
                int num5  = index__;
                switch (num5)
                {
                case 1:
                    num5 = 3;
                    break;

                case 3:
                    num5 = 1;
                    break;
                }
                string hoverText = "";
                if (Game1.player.GetCustomSkillLevel(skill) > 0)
                {
                    hoverText = skill.GetSkillPageHoverText(Game1.player.GetCustomSkillLevel(skill));
                }
                List <ClickableTextureComponent> skillAreas       = this.skillAreas;
                ClickableTextureComponent        textureComponent = new ClickableTextureComponent("C" + skill.Name, new Rectangle(num2 - 128 - 48, num3 + index__ * 56, 148, 36), string.Concat((object)num5), hoverText, (Texture2D)null, Rectangle.Empty, 1f, false);
                textureComponent.myID            = index__;
                textureComponent.downNeighborID  = index__ < 4 ? index__ + 1 : 10201;
                textureComponent.upNeighborID    = index__ > 0 ? index__ - 1 : 12341;
                textureComponent.rightNeighborID = 100 + index__;
                skillAreas.Add(textureComponent);

                ++index__;
            }
            //////////////////////////////////
        }
Exemplo n.º 19
0
        public override void draw(SpriteBatch b)
        {
            Game1.drawDialogueBox(this.xPositionOnScreen, this.yPositionOnScreen, this.width, this.height, false, true, (string)null, false);
            int num1 = this.xPositionOnScreen + 64 - 12;
            int num2 = this.yPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder;

            b.Draw(Game1.timeOfDay >= 1900 ? Game1.nightbg : Game1.daybg, new Vector2((float)num1, (float)num2), Color.White);
            Game1.player.FarmerRenderer.draw(b, new FarmerSprite.AnimationFrame((bool)((NetFieldBase <bool, NetBool>)Game1.player.bathingClothes) ? 108 : this.playerPanelFrames[this.playerPanelIndex], 0, false, false, (AnimatedSprite.endOfAnimationBehavior)null, false), (bool)((NetFieldBase <bool, NetBool>)Game1.player.bathingClothes) ? 108 : this.playerPanelFrames[this.playerPanelIndex], new Rectangle(this.playerPanelFrames[this.playerPanelIndex] * 16, (bool)((NetFieldBase <bool, NetBool>)Game1.player.bathingClothes) ? 576 : 0, 16, 32), new Vector2((float)(num1 + 32), (float)(num2 + 32)), Vector2.Zero, 0.8f, 2, Color.White, 0.0f, 1f, Game1.player);
            if (Game1.timeOfDay >= 1900)
            {
                Game1.player.FarmerRenderer.draw(b, new FarmerSprite.AnimationFrame(this.playerPanelFrames[this.playerPanelIndex], 0, false, false, (AnimatedSprite.endOfAnimationBehavior)null, false), this.playerPanelFrames[this.playerPanelIndex], new Rectangle(this.playerPanelFrames[this.playerPanelIndex] * 16, 0, 16, 32), new Vector2((float)(num1 + 32), (float)(num2 + 32)), Vector2.Zero, 0.8f, 2, Color.DarkBlue * 0.3f, 0.0f, 1f, Game1.player);
            }
            b.DrawString(Game1.smallFont, Game1.player.Name, new Vector2((float)(num1 + 64) - Game1.smallFont.MeasureString(Game1.player.Name).X / 2f, (float)(num2 + 192 + 4)), Game1.textColor);
            b.DrawString(Game1.smallFont, Game1.player.getTitle(), new Vector2((float)(num1 + 64) - Game1.smallFont.MeasureString(Game1.player.getTitle()).X / 2f, (float)(num2 + 256 - 32)), Game1.textColor);
            int num3 = LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.ru ? this.xPositionOnScreen + this.width - 448 - 48 : this.xPositionOnScreen + IClickableMenu.borderWidth + IClickableMenu.spaceToClearTopBorder + 256 - 8;
            int num4 = this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + IClickableMenu.borderWidth - 8;
            int num5 = 0;

            for (int index1 = 0; index1 < 10; ++index1)
            {
                for (int index2 = 0; index2 < (SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5); ++index2)
                {
                    bool      flag1     = false;
                    bool      flag2     = false;
                    string    text      = "";
                    int       number    = 0;
                    Rectangle rectangle = Rectangle.Empty;
                    switch (index2)
                    {
                    case 0:
                        flag1 = Game1.player.FarmingLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11604");
                        }
                        number    = Game1.player.FarmingLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedFarmingLevel) > 0;
                        rectangle = new Rectangle(10, 428, 10, 10);
                        break;

                    case 1:
                        flag1 = Game1.player.MiningLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11605");
                        }
                        number    = Game1.player.MiningLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedMiningLevel) > 0;
                        rectangle = new Rectangle(30, 428, 10, 10);
                        break;

                    case 2:
                        flag1 = Game1.player.ForagingLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11606");
                        }
                        number    = Game1.player.ForagingLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedForagingLevel) > 0;
                        rectangle = new Rectangle(60, 428, 10, 10);
                        break;

                    case 3:
                        flag1 = Game1.player.FishingLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11607");
                        }
                        number    = Game1.player.FishingLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedFishingLevel) > 0;
                        rectangle = new Rectangle(20, 428, 10, 10);
                        break;

                    case 4:
                        flag1 = Game1.player.CombatLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11608");
                        }
                        number    = Game1.player.CombatLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedCombatLevel) > 0;
                        rectangle = new Rectangle(120, 428, 10, 10);
                        break;

                    case 5:
                        flag1 = Game1.player.LuckLevel > index1;
                        if (index1 == 0)
                        {
                            text = Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11609");
                        }
                        number    = Game1.player.LuckLevel;
                        flag2     = (int)((NetFieldBase <int, NetInt>)Game1.player.addedLuckLevel) > 0;
                        rectangle = new Rectangle(50, 428, 10, 10);
                        break;
                    }
                    if (!text.Equals(""))
                    {
                        b.DrawString(Game1.smallFont, text, new Vector2((float)((double)num3 - (double)Game1.smallFont.MeasureString(text).X + 4.0 - 64.0), (float)(num4 + 4 + index2 * 56)), Game1.textColor);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num3 - 56), (float)(num4 + index2 * 56)), new Rectangle?(rectangle), Color.Black * 0.3f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.85f);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num3 - 52), (float)(num4 - 4 + index2 * 56)), new Rectangle?(rectangle), Color.White, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                    }
                    if (!flag1 && (index1 + 1) % 5 == 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 - 4 + index1 * 36), (float)(num4 + index2 * 56)), new Rectangle?(new Rectangle(145, 338, 14, 9)), Color.Black * 0.35f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 + index1 * 36), (float)(num4 - 4 + index2 * 56)), new Rectangle?(new Rectangle(145 + (flag1 ? 14 : 0), 338, 14, 9)), Color.White * (flag1 ? 1f : 0.65f), 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                    }
                    else if ((index1 + 1) % 5 != 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 - 4 + index1 * 36), (float)(num4 + index2 * 56)), new Rectangle?(new Rectangle(129, 338, 8, 9)), Color.Black * 0.35f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.85f);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 + index1 * 36), (float)(num4 - 4 + index2 * 56)), new Rectangle?(new Rectangle(129 + (flag1 ? 8 : 0), 338, 8, 9)), Color.White * (flag1 ? 1f : 0.65f), 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                    }
                    if (index1 == 9)
                    {
                        NumberSprite.draw(number, b, new Vector2((float)(num5 + num3 + (index1 + 2) * 36 + 12 + (number >= 10 ? 12 : 0)), (float)(num4 + 16 + index2 * 56)), Color.Black * 0.35f, 1f, 0.85f, 1f, 0, 0);
                        NumberSprite.draw(number, b, new Vector2((float)(num5 + num3 + (index1 + 2) * 36 + 16 + (number >= 10 ? 12 : 0)), (float)(num4 + 12 + index2 * 56)), (flag2 ? Color.LightGreen : Color.SandyBrown) * (number == 0 ? 0.75f : 1f), 1f, 0.87f, 1f, 0, 0);
                    }
                }
                if ((index1 + 1) % 5 == 0)
                {
                    num5 += 24;
                }
            }
            //////////////////////////////////
            int index2_ = SpaceCore.instance.Helper.ModRegistry.IsLoaded("spacechase0.LuckSkill") ? 6 : 5;

            foreach (var skillName in Skills.GetSkillList())
            {
                num5 = 0;
                var skill = Skills.GetSkill(skillName);
                for (int index1 = 0; index1 < skill.ExperienceCurve.Length; ++index1)
                {
                    bool   flag1  = false;
                    bool   flag2  = false;
                    string text   = "";
                    int    number = 0;

                    flag1 = Game1.player.GetCustomSkillLevel(skill) > index1;
                    if (index1 == 0)
                    {
                        text = skill.Name;
                    }
                    number = Game1.player.GetCustomSkillLevel(skill);
                    // TODO: Detect skill buffs? Is that even possible?
                    flag2 = false;// (int)((NetFieldBase<int, NetInt>)Game1.player.addedFarmingLevel) > 0;
                    if (!text.Equals(""))
                    {
                        b.DrawString(Game1.smallFont, text, new Vector2((float)((double)num3 - (double)Game1.smallFont.MeasureString(text).X + 4.0 - 64.0), (float)(num4 + 4 + index2_ * 56)), Game1.textColor);
                        if (skill.SkillsPageIcon != null)
                        {
                            b.Draw(skill.SkillsPageIcon, new Vector2((float)(num3 - 56), (float)(num4 + index2_ * 56)), null, Color.Black * 0.3f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.85f);
                            b.Draw(skill.SkillsPageIcon, new Vector2((float)(num3 - 52), (float)(num4 - 4 + index2_ * 56)), null, Color.White, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                        }
                    }
                    if (!flag1 && (index1 + 1) % 5 == 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 - 4 + index1 * 36), (float)(num4 + index2_ * 56)), new Rectangle?(new Rectangle(145, 338, 14, 9)), Color.Black * 0.35f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 + index1 * 36), (float)(num4 - 4 + index2_ * 56)), new Rectangle?(new Rectangle(145 + (flag1 ? 14 : 0), 338, 14, 9)), Color.White * (flag1 ? 1f : 0.65f), 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                    }
                    else if ((index1 + 1) % 5 != 0)
                    {
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 - 4 + index1 * 36), (float)(num4 + index2_ * 56)), new Rectangle?(new Rectangle(129, 338, 8, 9)), Color.Black * 0.35f, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.85f);
                        b.Draw(Game1.mouseCursors, new Vector2((float)(num5 + num3 + index1 * 36), (float)(num4 - 4 + index2_ * 56)), new Rectangle?(new Rectangle(129 + (flag1 ? 8 : 0), 338, 8, 9)), Color.White * (flag1 ? 1f : 0.65f), 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 0.87f);
                    }
                    if (index1 == 9)
                    {
                        NumberSprite.draw(number, b, new Vector2((float)(num5 + num3 + (index1 + 2) * 36 + 12 + (number >= 10 ? 12 : 0)), (float)(num4 + 16 + index2_ * 56)), Color.Black * 0.35f, 1f, 0.85f, 1f, 0, 0);
                        NumberSprite.draw(number, b, new Vector2((float)(num5 + num3 + (index1 + 2) * 36 + 16 + (number >= 10 ? 12 : 0)), (float)(num4 + 12 + index2_ * 56)), (flag2 ? Color.LightGreen : Color.SandyBrown) * (number == 0 ? 0.75f : 1f), 1f, 0.87f, 1f, 0, 0);
                    }

                    if ((index1 + 1) % 5 == 0)
                    {
                        num5 += 24;
                    }
                }

                ++index2_;
            }
            //////////////////////////////////
            foreach (ClickableTextureComponent skillBar in this.skillBars)
            {
                skillBar.draw(b);
            }
            foreach (ClickableTextureComponent skillBar in this.skillBars)
            {
                if ((double)skillBar.scale == 0.0)
                {
                    IClickableMenu.drawTextureBox(b, skillBar.bounds.X - 16 - 8, skillBar.bounds.Y - 16 - 16, 96, 96, Color.White);
                    if (skillBar.name.StartsWith("C"))
                    {
                        skillBar.scale = (float)Game1.pixelZoom;
                        if (skillBar.containsPoint(Game1.getMouseX(), Game1.getMouseY()) && !skillBar.name.Equals("-1") && skillBar.hoverText.Length > 0)
                        {
                            var professions = Skills.skills.SelectMany(x => x.Value.Professions).ToList();
                            var profession  = professions.Where(x => $"C{x.Id}" == skillBar.name).FirstOrDefault();
                            this.hoverText  = profession.Description;
                            this.hoverTitle = profession.Name;
                            var actuallyAProfessionImage = profession.Icon;
                            skillBar.scale = 0.0f;
                            b.Draw(actuallyAProfessionImage, new Vector2((float)(skillBar.bounds.X - Game1.pixelZoom * 2), (float)(skillBar.bounds.Y - Game1.tileSize / 2 + Game1.tileSize / 4)), new Rectangle(0, 0, 16, 16), Color.White, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 1f);
                        }
                    }
                    else
                    {
                        b.Draw(Game1.mouseCursors, new Vector2((float)(skillBar.bounds.X - 8), (float)(skillBar.bounds.Y - 32 + 16)), new Rectangle?(new Rectangle(this.professionImage % 6 * 16, 624 + this.professionImage / 6 * 16, 16, 16)), Color.White, 0.0f, Vector2.Zero, 4f, SpriteEffects.None, 1f);
                    }
                }
            }
            Game1.drawDialogueBox(this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + 32 + WALLET_MOVE_X, this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + (int)((double)this.height / 2.0) - 32 + WALLET_MOVE_Y, this.width - 64 - IClickableMenu.spaceToClearSideBorder * 2 + WALLET_MOVE_W, this.height / 4 + 64 + WALLET_MOVE_H, false, true, (string)null, false);
            this.drawBorderLabel(b, Game1.content.LoadString("Strings\\StringsFromCSFiles:SkillsPage.cs.11610"), Game1.smallFont, this.xPositionOnScreen + IClickableMenu.spaceToClearSideBorder + 96 + WALLET_MOVE_X, this.yPositionOnScreen + IClickableMenu.spaceToClearTopBorder + (int)((double)this.height / 2.0) - 32 + WALLET_MOVE_Y);
            foreach (ClickableTextureComponent specialItem in this.specialItems)
            {
                specialItem.draw(b);
            }
            if (this.hoverText.Length <= 0)
            {
                return;
            }
            IClickableMenu.drawHoverText(b, this.hoverText, Game1.smallFont, 0, 0, -1, this.hoverTitle.Length > 0 ? this.hoverTitle : (string)null, -1, (string[])null, (Item)null, 0, -1, -1, -1, -1, 1f, (CraftingRecipe)null);
        }
    public void LoadPlayer()
    {
        PlayerData data = SaveSystem.LoadPlayer();

        //SkillDisplay sd = new SkillDisplay();

        GodSkills.Clear();

        m_godLevel       = data.level;
        m_godPower       = data.power;
        m_godSkillPoints = data.skillPoints;
        m_godGold        = data.gold;

        foreach (int skill in data.skills)
        {
            switch (skill)
            {
            case 1:
                healthSwap.GetSkill(this);
                healthSwap.EnableSkill(this);
                //sd.healthSkill = GameObject.Find("Health Skill").GetComponent<SkillCheck>();
                //sd.healthSkill.skillActive = true;
                break;

            case 2:
                pickupObjects.GetSkill(this);
                pickupObjects.EnableSkill(this);
                //sd.pickupSkill = GameObject.Find("Pickup Skill").GetComponent<SkillCheck>();
                //sd.pickupSkill.skillActive = true;
                break;

            case 3:
                arrowGrab.GetSkill(this);
                arrowGrab.EnableSkill(this);
                //sd.arrowSkill = GameObject.Find("Arrow Skill").GetComponent<SkillCheck>();
                // sd.arrowSkill.skillActive = true;
                break;

            case 4:
                buffSwap.GetSkill(this);
                buffSwap.EnableSkill(this);
                //sd.buffSkill = GameObject.Find("Pickup Skill").GetComponent<SkillCheck>();
                //sd.buffSkill.skillActive = true;
                break;
            }
        }

        foreach (int item in data.items)
        {
            switch (item)
            {
            case 1:
                healthPotion.GetItem(this);
                healthPotion.GetItem(this);
                break;

            case 2:
                enragePotion.GetItem(this);
                enragePotion.GetItem(this);
                break;
            }
        }
    }
        public static int[] GetModExp(IModHelper helper, int index)
        {
            loadExpPerLevel(helper);


            int[] send = new int[3];

            if (index == 5)
            {
                int[] playerExperience = Game1.player.experiencePoints.ToArray();
                int   luckLevel        = Game1.player.luckLevel;

                send[0] = playerExperience[5];
                send[2] = luckLevel;
                if (send[2] < 10)
                {
                    send[1] = expPerLevel[luckLevel];
                }
                else
                {
                    send[1] = 10;
                }
            }
            else if (index == 6)
            {
                send[0] = Game1.player.GetCustomSkillExperience(Skills.GetSkill("cooking"));
                send[2] = Game1.player.GetCustomSkillLevel(Skills.GetSkill("cooking"));
                if (send[2] < 10)
                {
                    send[1] = cookingExpPerLevel[send[2]];
                }
                else
                {
                    send[1] = 10;
                }
            }
            else if (index == 7)
            {
                send[0] = Game1.player.GetCustomSkillExperience(Skills.GetSkill("blueberry.LoveOfCooking.CookingSkill"));
                send[2] = Game1.player.GetCustomSkillLevel(Skills.GetSkill("blueberry.LoveOfCooking.CookingSkill"));
                if (send[2] < 10)
                {
                    send[1] = loveCookingExpPerLevel[send[2]];
                }
                else
                {
                    send[1] = 10;
                }
            }
            else if (index == 8)
            {
                send[0] = Game1.player.GetCustomSkillExperience(Skills.GetSkill("magic"));
                send[2] = Game1.player.GetCustomSkillLevel(Skills.GetSkill("magic"));
                if (send[2] < 10)
                {
                    send[1] = magicExpPerLevel[send[2]];
                }
                else
                {
                    send[1] = 10;
                }
            }

            int[] returnValue = send;
            return(returnValue);
        }