Ejemplo n.º 1
0
        public static double GetPoints(Item item)
        {
            if (item is IVvVItem vItem && vItem.IsVvVItem)
            {
                return(0);
            }

            double points = 0;

            Type type = item.GetType();

            if (Entries.ContainsKey(type))
            {
                points = Entries[type];

                if (item is SOS sos && sos.IsAncient)
                {
                    points = 2500;
                }

                if (item.Stackable)
                {
                    points = points * item.Amount;
                }

                return(points);
            }

            if (item is RunicHammer hammer)
            {
                if (hammer.Resource == CraftResource.DullCopper)
                {
                    points = 5 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.ShadowIron)
                {
                    points = 10 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Copper)
                {
                    points = 25 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Bronze)
                {
                    points = 100 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Gold)
                {
                    points = 250 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Agapite)
                {
                    points = 1000 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Verite)
                {
                    points = 4000 * hammer.UsesRemaining;
                }
                else if (hammer.Resource == CraftResource.Valorite)
                {
                    points = 8000 * hammer.UsesRemaining;
                }
            }
            else if (item is RunicSewingKit sewing)
            {
                if (sewing.Resource == CraftResource.SpinedLeather)
                {
                    points = 10 * sewing.UsesRemaining;
                }
                else if (sewing.Resource == CraftResource.HornedLeather)
                {
                    points = 100 * sewing.UsesRemaining;
                }
                else if (sewing.Resource == CraftResource.BarbedLeather)
                {
                    points = 400 * sewing.UsesRemaining;
                }
            }
            else if (item is PowerScroll ps)
            {
                if (ps.Value == 105)
                {
                    points = 50;
                }
                else if (ps.Value == 110)
                {
                    points = 100;
                }
                else if (ps.Value == 115)
                {
                    points = 500;
                }
                else if (ps.Value == 120)
                {
                    points = 2500;
                }
            }
            else if (item is ScrollOfTranscendence scrollOfTranscendence)
            {
                SpecialScroll sot = scrollOfTranscendence;

                points = sot.Value / 0.1 * 2;
            }
            else if (item is Bait bait)
            {
                points = 10 * bait.UsesRemaining;
            }
            else if (item is TreasureMap tmap)
            {
                switch (tmap.Level)
                {
                default:
                case 0: return(50);

                case 1: return(100);

                case 2: return(250);

                case 3: return(750);

                case 4: return(1000);
                }
            }
            else if (item is MonsterStatuette ms)
            {
                if (ms.Type == MonsterStatuetteType.Slime)
                {
                    points = 5000;
                }
            }
            else if (item is PigmentsOfTokuno || item is LesserPigmentsOfTokuno)
            {
                BasePigmentsOfTokuno pigments = (BasePigmentsOfTokuno)item;
                points = 500 * pigments.UsesRemaining;
            }
            else if (item is ICombatEquipment)
            {
                points = GetPointsForEquipment(item);
            }

            if (item.LootType != LootType.Blessed && points < 100 && item is IShipwreckedItem shipItem && shipItem.IsShipwreckedItem)
            {
                points = 100;
            }

            return(points);
        }
Ejemplo n.º 2
0
        public static double GetPoints(Item item)
        {
            if (item is IVvVItem && ((IVvVItem)item).IsVvVItem)
            {
                return(0);
            }

            double points = 0;

            Type type = item.GetType();

            if (Entries.ContainsKey(type))
            {
                points = Entries[type];

                // Kind of ametuar, but if this arrizes more, we'll make a seperate function
                if (item is SOS && ((SOS)item).IsAncient)
                {
                    points = 2500;
                }

                if (item.Stackable)
                {
                    points = points * item.Amount;
                }

                return(points);
            }
            else
            {
                if (item is RunicHammer)
                {
                    RunicHammer hammer = (RunicHammer)item;

                    if (hammer.Resource == CraftResource.DullCopper)
                    {
                        points = 5 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.ShadowIron)
                    {
                        points = 10 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Copper)
                    {
                        points = 25 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Bronze)
                    {
                        points = 100 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Gold)
                    {
                        points = 250 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Agapite)
                    {
                        points = 1000 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Verite)
                    {
                        points = 4000 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Valorite)
                    {
                        points = 8000 * hammer.UsesRemaining;
                    }
                }
                else if (item is RunicSewingKit)
                {
                    RunicSewingKit sewing = (RunicSewingKit)item;

                    if (sewing.Resource == CraftResource.SpinedLeather)
                    {
                        points = 10 * sewing.UsesRemaining;
                    }
                    else if (sewing.Resource == CraftResource.HornedLeather)
                    {
                        points = 100 * sewing.UsesRemaining;
                    }
                    else if (sewing.Resource == CraftResource.BarbedLeather)
                    {
                        points = 400 * sewing.UsesRemaining;
                    }
                }
                else if (item is PowerScroll)
                {
                    PowerScroll ps = (PowerScroll)item;

                    if (ps.Value == 105)
                    {
                        points = 50;
                    }
                    else if (ps.Value == 110)
                    {
                        points = 100;
                    }
                    else if (ps.Value == 115)
                    {
                        points = 500;
                    }
                    else if (ps.Value == 120)
                    {
                        points = 2500;
                    }
                }
                else if (item is ScrollOfTranscendence)
                {
                    SpecialScroll sot = (SpecialScroll)item;

                    points = sot.Value / 0.1 * 2;
                }
                else if (item is Bait)
                {
                    Bait bait = (Bait)item;

                    points = 10 * bait.UsesRemaining;
                }
                else if (item is TreasureMap)
                {
                    TreasureMap tmap = (TreasureMap)item;

                    if (tmap.Level == 1)
                    {
                        points = 50;
                    }
                    else if (tmap.Level == 2)
                    {
                        points = 100;
                    }
                    else if (tmap.Level == 3)
                    {
                        points = 250;
                    }
                    else if (tmap.Level == 4)
                    {
                        points = 500;
                    }
                    else if (tmap.Level == 5)
                    {
                        points = 750;
                    }
                    else if (tmap.Level == 6)
                    {
                        points = 1000;
                    }
                }
                else if (item is MidnightBracers && item.LootType == LootType.Cursed)
                {
                    points = 5000;
                }
                else if (item is MonsterStatuette)
                {
                    MonsterStatuette ms = (MonsterStatuette)item;

                    if (ms.Type == MonsterStatuetteType.Slime)
                    {
                        points = 5000;
                    }
                }
                else if (item is PigmentsOfTokuno || item is LesserPigmentsOfTokuno)
                {
                    BasePigmentsOfTokuno pigments = (BasePigmentsOfTokuno)item;
                    points = 500 * pigments.UsesRemaining;
                }
                else if (item is ICombatEquipment)
                {
                    points = GetPointsForEquipment(item);
                }

                if (item.LootType != LootType.Blessed && points < 100 && item is IShipwreckedItem && ((IShipwreckedItem)item).IsShipwreckedItem)
                {
                    points = 100;
                }

                return(points);
            }
        }
Ejemplo n.º 3
0
        public static double GetPoints(Item item)
        {
            double points = 0;

            Type type = item.GetType();

            if (Entries.ContainsKey(type))
            {
                points = Entries[type];

                if (item.Stackable)
                {
                    points = points * item.Amount;
                }

                return(points);
            }
            else
            {
                if (item is RunicHammer)
                {
                    RunicHammer hammer = (RunicHammer)item;

                    if (hammer.Resource == CraftResource.DullCopper)
                    {
                        points = 5 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.ShadowIron)
                    {
                        points = 10 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Copper)
                    {
                        points = 25 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Bronze)
                    {
                        points = 100 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Gold)
                    {
                        points = 250 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Agapite)
                    {
                        points = 1000 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Verite)
                    {
                        points = 4000 * hammer.UsesRemaining;
                    }
                    else if (hammer.Resource == CraftResource.Valorite)
                    {
                        points = 8000 * hammer.UsesRemaining;
                    }
                }
                else if (item is RunicSewingKit)
                {
                    RunicSewingKit sewing = (RunicSewingKit)item;

                    if (sewing.Resource == CraftResource.SpinedLeather)
                    {
                        points = 10 * sewing.UsesRemaining;
                    }
                    else if (sewing.Resource == CraftResource.HornedLeather)
                    {
                        points = 100 * sewing.UsesRemaining;
                    }
                    else if (sewing.Resource == CraftResource.BarbedLeather)
                    {
                        points = 400 * sewing.UsesRemaining;
                    }
                }
                else if (item is PowerScroll)
                {
                    PowerScroll ps = (PowerScroll)item;

                    if (ps.Value == 105)
                    {
                        points = 50;
                    }
                    else if (ps.Value == 110)
                    {
                        points = 100;
                    }
                    else if (ps.Value == 115)
                    {
                        points = 500;
                    }
                    else if (ps.Value == 120)
                    {
                        points = 2500;
                    }
                }
                else if (item is ScrollofTranscendence)
                {
                    SpecialScroll sot = (SpecialScroll)item;

                    points = sot.Value / 0.1 * 2;
                }
                else if (item is Bait)
                {
                    Bait bait = (Bait)item;

                    points = 10 * bait.UsesRemaining;
                }
                else if (item is TreasureMap)
                {
                    TreasureMap tmap = (TreasureMap)item;

                    if (tmap.Level == 1)
                    {
                        points = 50;
                    }
                    else if (tmap.Level == 2)
                    {
                        points = 100;
                    }
                    else if (tmap.Level == 3)
                    {
                        points = 250;
                    }
                    else if (tmap.Level == 4)
                    {
                        points = 500;
                    }
                    else if (tmap.Level == 5)
                    {
                        points = 750;
                    }
                    else if (tmap.Level == 6)
                    {
                        points = 1000;
                    }
                }
                else if (item is MidnightBracers && item.LootType == LootType.Cursed)
                {
                    points = 5000;
                }
                else if (item is MonsterStatuette)
                {
                    MonsterStatuette ms = (MonsterStatuette)item;

                    if (ms.Type == MonsterStatuetteType.Slime)
                    {
                        points = 5000;
                    }
                }
                else if (item is PigmentsOfTokuno || item is LesserPigmentsOfTokuno)
                {
                    BasePigmentsOfTokuno pigments = (BasePigmentsOfTokuno)item;
                    points = 500 * pigments.UsesRemaining;
                }

                return(points);
            }
        }