private bool ReadStorageItem(MySqlDataReader reader, out CharacterItem result) { if (reader.Read()) { result = new CharacterItem(); result.dataId = reader.GetInt32(0); result.level = reader.GetInt16(1); result.amount = reader.GetInt16(2); result.durability = reader.GetFloat(3); result.exp = reader.GetInt32(4); result.lockRemainsDuration = reader.GetFloat(5); result.ammo = reader.GetInt16(6); result.ReadSockets(reader.GetString(7)); return(true); } result = CharacterItem.Empty; return(false); }
private bool ReadCharacterItem(SqliteDataReader reader, out CharacterItem result) { if (reader.Read()) { result = new CharacterItem(); result.id = reader.GetString(0); result.dataId = reader.GetInt32(1); result.level = reader.GetInt16(2); result.amount = reader.GetInt16(3); result.equipSlotIndex = reader.GetByte(4); result.durability = reader.GetFloat(5); result.exp = reader.GetInt32(6); result.lockRemainsDuration = reader.GetFloat(7); result.ammo = reader.GetInt16(8); result.ReadSockets(reader.GetString(9)); return true; } result = CharacterItem.Empty; return false; }
private bool ReadCharacterItem(MySqlDataReader reader, out CharacterItem result) { if (reader.Read()) { result = new CharacterItem(); result.id = reader.GetString(0); result.dataId = reader.GetInt32(1); result.level = reader.GetInt16(2); result.amount = reader.GetInt16(3); result.equipSlotIndex = reader.GetByte(4); result.durability = reader.GetFloat(5); result.exp = reader.GetInt32(6); result.lockRemainsDuration = reader.GetFloat(7); result.expireTime = reader.GetInt64(8); result.randomSeed = reader.GetInt16(9); result.ammo = reader.GetInt16(10); result.ReadSockets(reader.GetString(11)); return(true); } result = CharacterItem.Empty; return(false); }