Exemplo n.º 1
0
Arquivo: Trade.cs Projeto: BjkGkh/Boon
        public Trade(int UserOneId, int UserTwoId, int RoomId)
        {
            oneId = UserOneId;
            twoId = UserTwoId;

            Users = new TradeUser[2];
            Users[0] = new TradeUser(UserOneId, RoomId);
            Users[1] = new TradeUser(UserTwoId, RoomId);
            TradeStage = 1;
            this.RoomId = RoomId;

            foreach (TradeUser User in Users.ToList())
            {
                if (!User.GetRoomUser().Statusses.ContainsKey("trd"))
                {
                    User.GetRoomUser().AddStatus("trd", "");
                    User.GetRoomUser().UpdateNeeded = true;
                }
            }

            SendMessageToUsers(new TradingStartComposer(UserOneId, UserTwoId));
        }