public override bool OnDragDrop(Mobile from, Item dropped) { if (dropped is Head) { Head ph = dropped as Head; Mobile p = World.FindMobile(ph.PlayerSerial); if (p != null && p is PlayerMobile && (ph.WhenKilled + TimeSpan.FromHours(24.0)) > DateTime.Now) { PlayerMobile pm = p as PlayerMobile; if (pm.Bounty > 0) { if (from.Karma < 1) { Say(true, "We only accept bounty hunting from honorable folk! Away with thee!"); return(false); } Say(true, "Ah, a head! Let me check to see if there is a bounty on this."); if (Banker.Deposit(from, pm.Bounty)) { FindDeletePost(pm); Timer m_timer = new GiveBountyTimer(pm, this, ph, from); m_timer.Start(); ph.Delete(); return(true); } else { Say(true, String.Format("There is a bounty on {0}, but your bank box is full.", pm.Name)); return(false); } } else { if (from.Karma < 1) { Say(true, "We only accept bounty hunting from honorable folk! Away with thee!"); return(false); } //GetSpeech(); Say(true, "Ah, a head! Let me check to see if there is a bounty on this."); Timer m_timer = new GiveBountyTimer(pm, this, ph, from); m_timer.Start(); ph.Delete(); return(true); } } else { GetSpeech(); ph.Delete(); return(true); } } return(base.OnDragDrop(from, dropped)); }
public override bool OnDragDrop( Mobile from, Item dropped ) { if (dropped is Head) { Head ph = dropped as Head; Mobile p = World.FindMobile(ph.PlayerSerial); if (p != null && p is PlayerMobile && (ph.WhenKilled + TimeSpan.FromHours(24.0)) > DateTime.Now) { PlayerMobile pm = p as PlayerMobile; if (pm.Bounty > 0) { if (from.Karma < 1) { Say(true, "We only accept bounty hunting from honorable folk! Away with thee!"); return false; } Say(true, "Ah, a head! Let me check to see if there is a bounty on this."); if (Banker.Deposit(from, pm.Bounty)) { FindDeletePost(pm); Timer m_timer = new GiveBountyTimer(pm, this, ph, from); m_timer.Start(); ph.Delete(); return true; } else { Say(true, String.Format("There is a bounty on {0}, but your bank box is full.", pm.Name)); return false; } } else { if (from.Karma < 1) { Say(true, "We only accept bounty hunting from honorable folk! Away with thee!"); return false; } //GetSpeech(); Say(true, "Ah, a head! Let me check to see if there is a bounty on this."); Timer m_timer = new GiveBountyTimer(pm, this, ph, from); m_timer.Start(); ph.Delete(); return true; } } else { GetSpeech(); ph.Delete(); return true; } } return base.OnDragDrop(from, dropped); }