public ProfessionalFisherQuest(Mobile from, FishMonger monger, FishMonger quester, BaseBoat boat)
        {
            PlayerFishingEntry entry = PlayerFishingEntry.GetEntry(from, true);

            int lines;

            if (boat.IsClassicBoat)
            {
                lines = 1;
            }
            else
            {
                lines = entry.CalculateLines();
            }

            m_TurnIn = monger;
            m_Boat   = boat;

            int  index  = 0;
            int  amount = 10;
            Type type   = null;

            List <int>             hasChosen = new List <int>();
            Dictionary <Type, int> types     = new Dictionary <Type, int>();

            for (int i = 0; i < lines; i++)
            {
                entry.GetRandomFish(ref index, ref amount, hasChosen);
                hasChosen.Add(index);
                type = FishQuestHelper.GetTypeFromIndex(index);
                if (amount < 5)
                {
                    amount = 5;
                }
                if (amount > 20)
                {
                    amount = 20;
                }

                types[type] = amount;
            }

            AddObjective(new FishQuestObjective(types));
            AddReward(new BaseReward(1116510)); //A rare reward from the Order of the Dragonfish.

            hasChosen.Clear();

            m_Title = GetTitle(quester);
        }
Beispiel #2
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            int count = reader.ReadInt();

            Line = new Dictionary <Type, int[]>();

            for (int i = 0; i < count; i++)
            {
                Type  type = FishQuestHelper.GetTypeFromIndex(reader.ReadInt());
                int[] line = new int[] { reader.ReadInt(), reader.ReadInt() };

                if (type != null)
                {
                    Line[type] = line;
                }
            }
        }