コード例 #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            FishQuestHelper.AddMonger(this);
        }
コード例 #2
0
ファイル: SeaMarketOfficer.cs プロジェクト: ygtkms/ServUO
        public override void OnTalk(PlayerMobile pm)
        {
            if (!HasQuest(pm))
            {
                BaseBoat boat = FishQuestHelper.GetBoat(pm);

                if (boat != null && boat is BaseGalleon)
                {
                    if (((BaseGalleon)boat).Scuttled)
                    {
                        pm.SendLocalizedMessage(1116752); //Your ship is a mess!  Fix it first and then we can talk about catching pirates.
                    }
                    else
                    {
                        ProfessionalBountyQuest q = new ProfessionalBountyQuest((BaseGalleon)boat);
                        q.Owner   = pm;
                        q.Quester = this;

                        pm.CloseGump(typeof(MondainQuestGump));
                        pm.SendGump(new MondainQuestGump(q));
                    }
                }
                else
                {
                    SayTo(pm, 1116751); //The ship you are captaining could not take on a pirate ship.  Bring a warship if you want this quest.
                    OnOfferFailed();
                }
            }
        }
コード例 #3
0
ファイル: GBBigglesby.cs プロジェクト: pallop/Servuo
        public override void OnTalk(PlayerMobile pm)
        {
            if (!HasQuest(pm))
            {
                BaseBoat boat = FishQuestHelper.GetBoat(pm);

                if (boat != null && boat is BaseGalleon)
                {
                    if (((BaseGalleon)boat).Scuttled)
                    {
                        pm.SendLocalizedMessage(1116752); //Your ship is a mess!  Fix it first and then we can talk about catching pirates.
                    }
                    else
                    {
                        ProfessionalBountyQuest q = new ProfessionalBountyQuest((BaseGalleon)boat);
                        q.Owner   = pm;
                        q.Quester = this;

                        pm.CloseGump(typeof(MondainQuestGump));
                        pm.SendGump(new MondainQuestGump(q));
                    }
                }
                else if (boat != null && !(boat is BaseGalleon))
                {
                    SayTo(pm, 1116751); //The ship you are captaining could not take on a pirate ship.  Bring a warship if you want this quest.
                }
                else if (m_NextSay < DateTime.UtcNow)
                {
                    if (m_LastSay == 0)
                    {
                        if (this.Map != Map.Tokuno)
                        {
                            Say(1152651);  //I'm G.B. Bigglesby, proprietor of the G.B. Bigglesby Free Trade Floating Emporium.
                        }
                        else
                        {
                            Say("I am {0}, proprietor of {0} Free Trade Coroporation of Tokuno.", Name);
                        }
                        m_LastSay = 1;
                    }
                    else
                    {
                        Say(1152652);  //This sea market be me life's work and 'tis me pride and joy..
                        m_LastSay = 0;
                    }

                    m_NextSay = DateTime.UtcNow + TimeSpan.FromSeconds(5);
                }
            }
        }
コード例 #4
0
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);

            if (Quest == null)
            {
                return;
            }

            int loc = 1116453; //~1_val~: ~2_val~/~3_val~

            FishQuestObjective obj = Quest.GetObjective();

            if (obj == null)
            {
                Delete();
            }

            if (obj != null)
            {
                foreach (KeyValuePair <Type, int[]> kvp in obj.Line)
                {
                    int idx = FishQuestHelper.GetIndexForType(kvp.Key);

                    list.Add(loc, "#{0}\t{1}\t{2}", FishQuestHelper.Labels[idx], kvp.Value[0].ToString(), kvp.Value[1].ToString());

                    loc++;
                }
            }

            object delivery = GetDeliveryInfo();

            if (delivery is string s)
            {
                list.Add(s);
            }
            else
            {
                list.Add((int)delivery);
            }

            list.Add(1076255); //NO-TRADE

            list.Add(1072241, "{0}\t{1}\t{2}\t{3}", TotalItems, MaxItems, TotalWeight, MaxWeight);
        }
コード例 #5
0
        public override void OnTalk(PlayerMobile player)
        {
            int      distance = 100;
            BaseBoat boat     = FishQuestHelper.GetBoat(player);

            if (boat == null)
            {
                SayTo(player, 1116514); //Bring yer ship around, I might have some work for ye!);
            }
            else
            {
                bool inRange = InRange(boat.Location, distance) && boat.Map == Map;

                if (!FishQuestHelper.HasFishQuest(player, this, inRange))
                {
                    FishMonger monger = FishQuestHelper.GetRandomMonger(player, this);

                    if (monger == null)
                    {
                        SayTo(player, "It seems my fellow fish mongers are on vacation.  Try again later, or perhaps another Facet.");
                    }
                    else
                    {
                        ProfessionalFisherQuest quest = new ProfessionalFisherQuest(player, monger, this, boat);

                        if (quest != null)
                        {
                            quest.Quester = this;
                            quest.Owner   = player;
                            player.CloseGump(typeof(MondainQuestGump));
                            player.SendGump(new MondainQuestGump(quest));

                            if (boat.IsClassicBoat)
                            {
                                SayTo(player, "Such a weak vessle can only catch a weak line.");
                            }
                        }
                    }
                }
            }
        }
コード例 #6
0
 public FishMonger()
 {
     FishQuestHelper.AddMonger(this);
 }