public InventoryComponent(uint uint_1, GameClient class16_1, UserDataFactory class12_0) { this.Session = class16_1; this.uint_0 = uint_1; this.list_0 = new List<UserItem>(); this.hashtable_0 = new Hashtable(); this.hashtable_1 = new Hashtable(); this.discs = new Hashtable(); this.list_1 = new List<uint>(); this.list_0.Clear(); DataTable dataTable_ = class12_0.DataTable_6; foreach (DataRow dataRow in dataTable_.Rows) { string str; uint id = Convert.ToUInt32(dataRow["Id"]); uint baseItem = Convert.ToUInt32(dataRow["base_item"]); if (!DBNull.Value.Equals(dataRow["extra_data"])) { str = (string)dataRow["extra_data"]; } else { str = string.Empty; } list_0.Add(new UserItem(id, baseItem, str)); UserItem item = new UserItem(id, baseItem, str); if (item.method_1().InteractionType == "musicdisc") { this.discs.Add(item.uint_0, item); } } this.hashtable_0.Clear(); DataTable dataTable_2 = class12_0.DataTable_11; foreach (DataRow dataRow in dataTable_2.Rows) { Pet @class = GoldTree.GetGame().GetCatalog().method_12(dataRow); this.hashtable_0.Add(@class.PetId, @class); } }
public bool method_0(UserItem class39_0) { return class39_0.method_1().AllowTrade && class39_0.method_1().AllowMarketplaceSell; }
public void method_11(uint uint_1, uint uint_2, string string_0, bool bool_0) { UserItem item = new UserItem(uint_1, uint_2, string_0); this.list_0.Add(item); if (this.list_1.Contains(uint_1)) { this.list_1.Remove(uint_1); } if (!this.hashtable_1.ContainsKey(uint_1)) { if (bool_0) { using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("extra_data", string_0); @class.ExecuteQuery(string.Concat(new object[] { "INSERT INTO items (Id,user_id,base_item,extra_data,wall_pos) VALUES ('", uint_1, "','", this.uint_0, "','", uint_2, "',@extra_data, '')" })); return; } } if (item.method_1().InteractionType == "musicdisc") { this.discs.Add(item.uint_0, item); } using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.ExecuteQuery(string.Concat(new object[] { "UPDATE items SET room_id = 0, user_id = '", this.uint_0, "' WHERE Id = '", uint_1, "'" })); } } }
public SongItem(UserItem item) { this.itemID = (int)item.uint_0; this.songID = Convert.ToInt32(item.string_0); this.baseItem = item.method_1(); }