コード例 #1
0
        public override bool OnDragDropInto(Mobile from, Item dropped, Point3D p)
        {
            if (dropped is BaseHighseasFish && m_Quest != null)
            {
                FishQuestObjective obj = m_Quest.GetObjective();

                if (obj != null && obj.Update(dropped))
                {
                    return(base.OnDragDropInto(from, dropped, p));
                }
            }

            from.SendLocalizedMessage(1072355, null, 0x23); // That item does not match any of your quest criteria
            return(false);
        }
コード例 #2
0
ファイル: ShippingCrate.cs プロジェクト: Tauriella/ServUO-1
        public bool CheckCarve(Item item)
        {
            if (Quest == null)
            {
                return(true);
            }

            FishQuestObjective obj = Quest.GetObjective();

            if (obj.CheckLift(item))
            {
                return(false);
            }

            return(true);
        }
コード例 #3
0
ファイル: ShippingCrate.cs プロジェクト: Tauriella/ServUO-1
        public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
        {
            if (Quest == null)
            {
                return(base.CheckLift(from, item, ref reject));
            }

            FishQuestObjective obj = Quest.GetObjective();

            if (obj != null && obj.CheckLift(item))
            {
                reject = LRReason.CannotLift;
                return(false);
            }

            return(true);
        }
コード例 #4
0
ファイル: ShippingCrate.cs プロジェクト: Tauriella/ServUO-1
        public override bool OnDragDropInto(Mobile from, Item dropped, Point3D p)
        {
            if (dropped is BaseHighseasFish && Quest != null)
            {
                FishQuestObjective obj = Quest.GetObjective();

                if (obj != null && obj.CheckLift(dropped) && base.OnDragDropInto(from, dropped, p))
                {
                    obj.Update(dropped);
                    InvalidateProperties();
                    return(true);
                }
            }

            from.SendLocalizedMessage(1116461); // This is not needed to fill the order.
            return(false);
        }
コード例 #5
0
ファイル: ShippingCrate.cs プロジェクト: pallop/Servuo
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            if (dropped is BaseHighseasFish && m_Quest != null)
            {
                FishQuestObjective obj = m_Quest.GetObjective();

                if (obj != null && obj.CheckLift(dropped) && base.OnDragDrop(from, dropped))
                {
                    obj.Update(dropped);
                    InvalidateProperties();
                    return(true);
                }
            }

            from.SendLocalizedMessage(1072355, null, 0x23); // That item does not match any of your quest criteria
            return(false);
        }
コード例 #6
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);
        }
コード例 #7
0
        public override bool OnStackAttempt(Mobile from, Item stack, Item dropped)
        {
            if (dropped is BaseHighseasFish && m_Quest != null)
            {
                FishQuestObjective obj = m_Quest.GetObjective();

                if (obj != null)
                {
                    if (obj.Update(dropped) && base.OnStackAttempt(from, stack, dropped))
                    {
                        return(true);
                    }
                }
            }

            from.SendLocalizedMessage(1072355, null, 0x23); // That item does not match any of your quest criteria
            return(false);
        }