예제 #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];
		}