示例#1
0
文件: Trade.cs 项目: pallmall/WCell
		/// <summary>
		/// Makes initChr propose trading to targetChr
		/// Call CheckRequirements first
		/// </summary>
		/// <param name="initChr">initiator of trading</param>
		/// <param name="targetChr">traget of trading</param>
		public static void Propose(Character initChr, Character targetChr)
		{
			var trade = new Trade();
			trade.Trader1 = new TradeInfo(trade)
			{
				m_chr = initChr,
				m_status = TradeStatus.Proposed
			};

			trade.Trader2 = new TradeInfo(trade)
			{
				m_chr = targetChr,
				m_status = TradeStatus.Proposed
			};

			initChr.TradeInfo = trade.Trader1;
			targetChr.TradeInfo = trade.Trader2;

			TradeHandler.SendTradeProposal(targetChr.Client, initChr);
		}
示例#2
0
文件: Trade.cs 项目: pallmall/WCell
		private TradeInfo(Trade trade)
		{
			Trade = trade;
			m_items = new Item[TRADE_SLOT_COUNT];
		}