public override bool OnDragDrop(Mobile from, Item dropped) { bool bReturn = false; try { if (dropped is Head) { int result = 0; int goldGiven = 0; bReturn = BountyKeeper.CollectBounty((Head)dropped, from, this, ref goldGiven, ref result); switch (result) { case -2: Say("Pft.. I don't want that."); break; case -3: Say("Haha, yeah right.."); Say("I'll take that head, you just run along now."); break; case -4: //good, gold given Say(string.Format("I thank you for the business. Here's the reward of {0} gold!", goldGiven)); break; case -5: Say(string.Format("I thank you for the business, but the bounty has already been collected.")); break; default: if (bReturn) { Say("I'll take that."); } else { Say("I don't want that."); } break; } } } catch (Exception e) { LogHelper.LogException(e); System.Console.WriteLine("Error (nonfatal) in Thief.OnDragDrop(): " + e.Message); System.Console.WriteLine(e.StackTrace); } return(bReturn); }
public override bool OnDragDrop(Mobile from, Item dropped) { bool bReturn = false; if (dropped is Head) { int result = 0; int goldGiven = 0; bReturn = BountyKeeper.CollectBounty((Head)dropped, from, this, ref goldGiven, ref result); switch (result) { case -2: Say("You disgusting miscreant! Why are you giving me an innocent person's head?"); break; case -3: Say("I suspect treachery...."); Say("I'll take that head, you just run along now."); break; case -4: //good, gold given Say(string.Format("My thanks for slaying this vile person. Here's the reward of {0} gold!", goldGiven)); break; case -5: Say(string.Format("My thanks for slaying this vile person, but the bounty has already been collected.")); break; default: if (bReturn) { Say("I'll take that."); } else { Say("I don't want that."); } break; } } return(bReturn); }