public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { AuthString = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { PlayerName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Item = new ItemStack(); Item.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Helmet = new ItemStack(); Helmet.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Chestplate = new ItemStack(); Chestplate.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Leggings = new ItemStack(); Leggings.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { Boots = new ItemStack(); Boots.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public IAsyncResult send_updateInventoryItem(AsyncCallback callback, object state, string authString, string playerName, ItemStack item, int itemIndex)
public void send_updateInventoryItem(string authString, string playerName, ItemStack item, int itemIndex) #endif { oprot_.WriteMessageBegin(new TMessage("updateInventoryItem", TMessageType.Call, seqid_)); updateInventoryItem_args args = new updateInventoryItem_args(); args.AuthString = authString; args.PlayerName = playerName; args.Item = item; args.ItemIndex = itemIndex; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return oprot_.Transport.BeginFlush(callback, state); #else oprot_.Transport.Flush(); #endif }
public IAsyncResult Begin_updateInventoryItem(AsyncCallback callback, object state, string authString, string playerName, ItemStack item, int itemIndex) { return send_updateInventoryItem(callback, state, authString, playerName, item, itemIndex); }
/// <summary> /// Replaces an item in the player's inventory with the supplied one /// /// @since 1.5 /// /// @param authString /// The authentication hash /// /// @param playerName /// The name of the player /// /// @param item /// The item that will replace the item specified by itemIndex, in the form of an ItemStack /// /// @param itemIndex /// The 0-based index of which item to replace in the inventory /// /// @return boolean true on success, false on failure /// /// @throws Errors.EAuthException /// If the method call was not correctly authenticated /// /// @throws Errors.EDataException /// If the player was not found /// /// @throws org.apache.thrift.TException /// If something went wrong with Thrift /// </summary> /// <param name="authString"></param> /// <param name="playerName"></param> /// <param name="item"></param> /// <param name="itemIndex"></param> public bool updateInventoryItem(string authString, string playerName, ItemStack item, int itemIndex) { #if !SILVERLIGHT send_updateInventoryItem(authString, playerName, item, itemIndex); return recv_updateInventoryItem(); #else var asyncResult = Begin_updateInventoryItem(null, null, authString, playerName, item, itemIndex); return End_updateInventoryItem(asyncResult); #endif }
public void send_addItemToInventory(string authString, string playerName, ItemStack item) #endif { oprot_.WriteMessageBegin(new TMessage("addItemToInventory", TMessageType.Call, seqid_)); addItemToInventory_args args = new addItemToInventory_args(); args.AuthString = authString; args.PlayerName = playerName; args.Item = item; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return oprot_.Transport.BeginFlush(callback, state); #else oprot_.Transport.Flush(); #endif }
public IAsyncResult send_addItemToInventory(AsyncCallback callback, object state, string authString, string playerName, ItemStack item)
/// <summary> /// Add an item to a player's inventory /// /// @since 1.5 /// /// @param authString /// The authentication hash /// /// @param playerName /// The name of the player /// /// @param item /// The item to add, in the form of an ItemStack /// /// @return boolean true on success, false on failure /// /// @throws Errors.EAuthException /// If the method call was not correctly authenticated /// /// @throws Errors.EDataException /// If the player was not found /// /// @throws org.apache.thrift.TException /// If something went wrong with Thrift /// </summary> /// <param name="authString"></param> /// <param name="playerName"></param> /// <param name="item"></param> public bool addItemToInventory(string authString, string playerName, ItemStack item) { #if !SILVERLIGHT send_addItemToInventory(authString, playerName, item); return recv_addItemToInventory(); #else var asyncResult = Begin_addItemToInventory(null, null, authString, playerName, item); return End_addItemToInventory(asyncResult); #endif }
public IAsyncResult Begin_addItemToInventory(AsyncCallback callback, object state, string authString, string playerName, ItemStack item) { return send_addItemToInventory(callback, state, authString, playerName, item); }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.List) { { Inventory = new List<ItemStack>(); TList _list9 = iprot.ReadListBegin(); for( int _i10 = 0; _i10 < _list9.Count; ++_i10) { ItemStack _elem11 = new ItemStack(); _elem11 = new ItemStack(); _elem11.Read(iprot); Inventory.Add(_elem11); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { ItemInHand = new ItemStack(); ItemInHand.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { Armor = new PlayerArmor(); Armor.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }