public SecureTradeContainer(SecureTrade trade) : base(0x1E5E) { m_Trade = trade; Movable = false; }
public SecureTradeContainer(SecureTrade trade) : base(0x1E5E) { Trade = trade; Movable = false; }
public override void OnDoubleClickSecureTrade(Mobile from) { if (!from.InRange(GetWorldLocation(), 2)) { from.SendLocalizedMessage(500446); // That is too far away. } else { from.SendGump(new RecipeBookGump(from, this)); SecureTradeContainer cont = GetSecureTradeCont(); if (cont != null) { SecureTrade trade = cont.Trade; if (trade != null && trade.From.Mobile == from) { trade.To.Mobile.SendGump(new RecipeBookGump(trade.To.Mobile, this)); } else if (trade != null && trade.To.Mobile == from) { trade.From.Mobile.SendGump(new RecipeBookGump(trade.From.Mobile, this)); } } } }
public override void OnDoubleClickSecureTrade(Mobile from) { if (!from.InRange(this.GetWorldLocation(), 2)) { from.SendLocalizedMessage(500446); // That is too far away. } else if (this.m_Entries.Count == 0) { from.SendLocalizedMessage(1062381); // The book is empty. } else { from.SendGump(new BOBGump((PlayerMobile)from, this)); SecureTradeContainer cont = this.GetSecureTradeCont(); if (cont != null) { SecureTrade trade = cont.Trade; if (trade != null && trade.From.Mobile == from) { trade.To.Mobile.SendGump(new BOBGump((PlayerMobile)(trade.To.Mobile), this)); } else if (trade != null && trade.To.Mobile == from) { trade.From.Mobile.SendGump(new BOBGump((PlayerMobile)(trade.From.Mobile), this)); } } } }
public override void OnDoubleClickSecureTrade(Mobile from) { if (from.InRange(GetWorldLocation(), 2)) { DisplayTo(from); SecureTradeContainer cont = GetSecureTradeCont(); if (cont != null) { SecureTrade trade = cont.Trade; if (trade != null && trade.From.Mobile == from) { DisplayTo(trade.To.Mobile); } else if (trade != null && trade.To.Mobile == from) { DisplayTo(trade.From.Mobile); } } } else { from.SendLocalizedMessage(500446); // That is too far away. } }
public override void OnDoubleClickSecureTrade(Mobile from) { if (!from.InRange(GetWorldLocation(), 2)) { from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } else if (m_Entries.Count == 0) { from.SendLocalizedMessage(1062381); // The book is empty. } else { from.SendGump(new BOBGump((PlayerMobile)from, this)); SecureTradeContainer cont = GetSecureTradeCont(); if (cont != null) { SecureTrade trade = cont.Trade; if (trade != null && trade.From.Mobile == from) { trade.To.Mobile.SendGump(new BOBGump((PlayerMobile)(trade.To.Mobile), this)); } else if (trade != null && trade.To.Mobile == from) { trade.From.Mobile.SendGump(new BOBGump((PlayerMobile)(trade.From.Mobile), this)); } } } }
public void RemoveTrade(SecureTrade trade) { if (m_Trades != null) { m_Trades.Remove(trade); } }
public SecureTradeContainer FindTradeContainer(Mobile m) { if (Trades == null) { return(null); } for (var index = 0; index < Trades.Count; index++) { SecureTrade trade = Trades[index]; SecureTradeInfo from = trade.From; SecureTradeInfo to = trade.To; if (from.Mobile == Mobile && to.Mobile == m) { return(from.Container); } if (from.Mobile == m && to.Mobile == Mobile) { return(to.Container); } } return(null); }
public SecureTradeContainer(SecureTrade trade) : base(0x1E5E) { this.m_Trade = trade; this.Movable = false; }
public SecureTradeContainer(SecureTrade trade) : base(0x1E5E) { m_Trade = trade; Movable = false; Layer = Layer.SecureTrade; }
public SecureTradeContainer AddTrade(NetState state) { SecureTrade newTrade = new SecureTrade(m_Mobile, state.m_Mobile); m_Trades.Add(newTrade); state.m_Trades.Add(newTrade); return(newTrade.From.Container); }
public SecureTradeContainer AddTrade(NetState state) { if (Trades == null || state.Trades == null) { return(null); } SecureTrade newTrade = new SecureTrade(Mobile, state.Mobile); Trades.Add(newTrade); state.Trades.Add(newTrade); return(newTrade.From.Container); }
public SecureTrade FindTrade(Mobile m) { for (int i = 0; i < m_Trades.Count; ++i) { SecureTrade trade = m_Trades[i]; if (trade.From.Mobile == m || trade.To.Mobile == m) { return(trade); } } return(null); }
public void ValidateAllTrades() { for (int i = m_Trades.Count - 1; i >= 0; --i) { if (i >= m_Trades.Count) { continue; } SecureTrade trade = m_Trades[i]; if (trade.From.Mobile.Deleted || trade.To.Mobile.Deleted || !trade.From.Mobile.Alive || !trade.To.Mobile.Alive || !trade.From.Mobile.InRange(trade.To.Mobile, 2) || trade.From.Mobile.Map != trade.To.Mobile.Map) { trade.Cancel(); } } }
public SecureTrade FindTrade(Mobile m) { if (Trades == null) { return(null); } for (var index = 0; index < Trades.Count; index++) { SecureTrade trade = Trades[index]; if (trade.From.Mobile == m || trade.To.Mobile == m) { return(trade); } } return(null); }
public SecureTradeContainer FindTradeContainer(Mobile m) { for (int i = 0; i < m_Trades.Count; ++i) { SecureTrade trade = m_Trades[i]; SecureTradeInfo from = trade.From; SecureTradeInfo to = trade.To; if (from.Mobile == m_Mobile && to.Mobile == m) { return(from.Container); } else if (from.Mobile == m && to.Mobile == m_Mobile) { return(to.Container); } } return(null); }
public Container TradeWith(NetState state) { int num1; SecureTrade trade1; for (num1 = 0; (num1 < this.m_Trades.Count); ++num1) { trade1 = ((SecureTrade)this.m_Trades[num1]); if (((trade1.From.Mobile == this.m_Mobile) || (trade1.To.Mobile == this.m_Mobile)) && ((trade1.From.Mobile == state.m_Mobile) || (trade1.To.Mobile == state.m_Mobile))) { if (trade1.From.Mobile != this.m_Mobile) { return(trade1.To.Container); } return(trade1.From.Container); } } SecureTrade trade2 = new SecureTrade(this.m_Mobile, state.m_Mobile); this.m_Trades.Add(trade2); state.m_Trades.Add(trade2); return(trade2.From.Container); }
public void RemoveTrade(SecureTrade trade) { Trades?.Remove(trade); }
// Methods public SecureTradeContainer(SecureTrade trade) : base(7774) { this.m_Trade = trade; base.Movable = false; }
public void RemoveTrade(SecureTrade trade) { m_Trades.Remove(trade); }