public static void OnAddRow(SqliteDataReader reader) { TDItem data = new TDItem(); data.ReadRow(reader); OnAddData(data); data.Reset(); CompleteRowAdd(data); }
private static void OnAddData(TDItem memberInstance) { long key = memberInstance.ID; if (m_DataCache.ContainsKey(key)) { Log.e(string.Format("Invaild, TDItemTable Id already exists {0}", key)); } else { m_DataCache.Add(key, memberInstance); m_DataList.Add(memberInstance); } }
public static Equipment CreateEquipment(TDItem itemConf) { var conf_Equipment = TDEquipmentTable.GetData(itemConf.SubID); Equipment equipment = null; switch (conf_Equipment.equipmentType) { case EquipmentType.Helmet: equipment = new Equipment_Helmet(itemConf.ID); break; case EquipmentType.Torso: equipment = new Equipment_Torso(itemConf.ID); break; case EquipmentType.Hands: equipment = new Equipment_Hands(itemConf.ID); break; case EquipmentType.Legs: equipment = new Equipment_Legs(itemConf.ID); break; case EquipmentType.Hips: equipment = new Equipment_Hips(itemConf.ID); break; case EquipmentType.Shoulders: equipment = new Equipment_Shoulders(itemConf.ID); break; case EquipmentType.Back: equipment = new Equipment_Back(itemConf.ID); break; case EquipmentType.Weapon: break; } if (equipment != null) { equipment.Conf = itemConf; } return(equipment); }
static void CompleteRowAdd(TDItem tdData) { }