Пример #1
0
        public ViewerWebServices(WaterWarsController controller) : base(controller)
        {
            m_buyPointServices = new BuyPointServices(m_controller);
            PlayerServices     = new PlayerServices(m_controller);

            Initialise();
        }
Пример #2
0
        protected Hashtable HandleGetAsset(string rawBpId, string rawGameAssetId, Hashtable request)
        {
            Hashtable reply = new Hashtable();

            UUID bpId = new UUID(rawBpId);

            IDictionary <UUID, BuyPoint> buyPoints = m_controller.Game.BuyPoints;

            BuyPoint bp;

            buyPoints.TryGetValue(bpId, out bp);

            UUID gameAssetId = new UUID(rawGameAssetId);

            AbstractGameAsset ga;

            lock (bp.GameAssets)
                bp.GameAssets.TryGetValue(gameAssetId, out ga);

            reply["int_response_code"]   = 200; // 200 OK
            reply["str_response_string"] = BuyPointServices.Serialize(ga);
            reply["content_type"]        = "text/plain";

            return(reply);
        }
Пример #3
0
        public ViewerWebServices(WaterWarsController controller)
            : base(controller)
        {
            m_buyPointServices = new BuyPointServices(m_controller);
            PlayerServices = new PlayerServices(m_controller);

            Initialise();
        }