public void ClaimGump_Callback(Mobile from, bool okay, object state) { if (okay && m_Owner != null && m_Owner.Owner == null && m_Owner.DecayLevel != DecayLevel.DemolitionPending) { bool canClaim = false; if (m_Owner.CoOwners == null || m_Owner.CoOwners.Count == 0) { canClaim = m_Owner.IsFriend(from); } else { canClaim = m_Owner.IsCoOwner(from); } if (canClaim && !BaseHouse.AtAccountHouseLimit(from)) { m_Owner.Owner = from; m_Owner.LastTraded = DateTime.UtcNow; } } InvalidateProperties(); ShowSign(from); }
public override void OnDoubleClick(Mobile m) { if (m_Owner == null) { return; } if (m.AccessLevel < AccessLevel.GameMaster && m_Owner.Owner == null && m_Owner.DecayLevel != DecayLevel.DemolitionPending) { bool canClaim = false; if (m_Owner.CoOwners == null || m_Owner.CoOwners.Count == 0) { canClaim = m_Owner.IsFriend(m); } else { canClaim = m_Owner.IsCoOwner(m); } if (canClaim && !BaseHouse.AtAccountHouseLimit(m)) { /* You do not currently own any house on any shard with this account, * and this house currently does not have an owner. If you wish, you * may choose to claim this house and become its rightful owner. If * you do this, it will become your Primary house and automatically * refresh. If you claim this house, you will be unable to place * another house or have another house transferred to you for the * next 7 days. Do you wish to claim this house? */ m.SendGump(new WarningGump(501036, 32512, 1049719, 32512, 420, 280, new WarningGumpCallback(ClaimGump_Callback), null)); } } ShowSign(m); }