Beispiel #1
0
        public override bool OnDragDrop(Mobile from, Item dropped)
        {
            PlayerMobile player = from as PlayerMobile;

            if (player != null)
            {
                QuestSystem qs = player.Quest;

                if (qs is HaochisTrialsQuest)
                {
                    QuestObjective obj = qs.FindObjective(typeof(FourthTrialCatsObjective));

                    if (obj != null && !obj.Completed)
                    {
                        Gold gold = dropped as Gold;

                        if (gold != null)
                        {
                            obj.Complete();
                            qs.AddObjective(new FourthTrialReturnObjective(false));

                            SayTo(from, 1063241);                       // I thank thee.  This gold will be a great help to me and mine!

                            gold.Consume();                             // Intentional difference from OSI: don't take all the gold of poor newbies!
                            return(gold.Deleted);
                        }
                    }
                }
            }

            return(base.OnDragDrop(from, dropped));
        }
Beispiel #2
0
 public bool AddGoldPile(Gold gold)
 {
     if (!GoldLedger)
     {
         return(false);
     }
     gold.Amount = (int)AddGoldAmount((ulong)gold.Amount);
     if (gold.Amount == 0)
     {
         gold.Consume();
         return(true);
     }
     return(false);
 }