Пример #1
0
        void HandleRefreshInventoryCommand(string msg, SteamID sender)
        {
            var refreshMsg = new ClientGCMsgProtobuf <CMsgRequestInventoryRefresh>(
                EGCMsg.RequestInventoryRefresh);

            SteamGC.Send(refreshMsg, TF2App);
        }
Пример #2
0
        void HandleRefreshSchemaCommand(string msg, SteamID sender)
        {
            var refreshMsg = new ClientGCMsgProtobuf <CMsgRequestItemSchemaData>(
                EGCMsg.RequestItemSchemaData);

            SteamGC.Send(refreshMsg, TF2App);
        }
Пример #3
0
        void OnGCSOCacheSubscriptionCheck(IPacketGCMsg packetMsg)
        {
            var msg = new ClientGCMsgProtobuf <CMsgSOCacheSubscriptionCheck>(packetMsg);
            //Logger.WriteLine("SOCacheSubscriptionCheck version: " + msg.Body.version);

            var refreshMsg = new ClientGCMsgProtobuf <CMsgSOCacheSubscriptionRefresh>(
                EGCMsg.SOCacheSubscriptionRefresh);

            refreshMsg.Body.owner = SteamClient.SteamID;

            SteamGC.Send(refreshMsg, TF2App);
        }
Пример #4
0
        void CraftItems(List <ulong> items)
        {
            var craftMsg = new ClientGCMsg <CMsgCraft>();

            craftMsg.Body.Blueprint = 0xFF;
            craftMsg.Body.ItemCount = (ushort)items.Count;
            craftMsg.Body.Items     = new ulong[items.Count];

            for (int i = 0; i < items.Count; ++i)
            {
                craftMsg.Body.Items[i] = items[i];
            }

            Logger.WriteLine("Crafting {0} items", craftMsg.Body.ItemCount);
            SteamGC.Send(craftMsg, TF2App);
        }
Пример #5
0
        void HandlePaintCommand(string msg, SteamID sender)
        {
            UpdateBackpack();

            string[] args = msg.Split(' ');
            if (args.Length != 2)
            {
                SteamFriends.SendChatMessage(sender, EChatEntryType.ChatMsg,
                                             "Invalid arguments.");
                return;
            }

            var items = new List <ulong>();

            foreach (var arg in msg.Split(' '))
            {
                ulong item;
                if (!ulong.TryParse(arg, out item))
                {
                    continue;
                }

                items.Add(item);
            }

            if (items.Count != 2)
            {
                SteamFriends.SendChatMessage(sender, EChatEntryType.ChatMsg,
                                             "Invalid arguments.");
                return;
            }

            var paintMsg = new ClientGCMsg <CMsgPaint>();

            paintMsg.Body.ItemId  = items[0];
            paintMsg.Body.PaintId = items[1];

            SteamGC.Send(paintMsg, TF2App);
        }