public DDO_CombatEfct[] GetAllMixCombatEfct() { cmd = "select * from `combat_effect`;"; DataSet ds = new DataSet(); pool.ExecuteSql(database, cmd, ds); DataTable dt = ds.Tables[0]; DDO_CombatEfct[] res = new DDO_CombatEfct[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { res[i].m_charId = int.Parse(dt.Rows[i]["charid"].ToString()); res[i].m_combatEfct = int.Parse(dt.Rows[i]["combat"].ToString()); res[i].m_name = dt.Rows[i]["name"].ToString(); res[i].m_ocp = (OccupationType)Enum.Parse(typeof(OccupationType), dt.Rows[i]["occupation"].ToString()); res[i].m_level = short.Parse(dt.Rows[i]["level"].ToString()); } return(res); }
public void UpdateMixCombatEfct(DDO_CombatEfct mixCombatEfct) { cmd = "update `combat_effect` set `combat`=" + mixCombatEfct.m_combatEfct + ",`name`=\"" + mixCombatEfct.m_name + "\", `occupation`=\"" + mixCombatEfct.m_ocp.ToString() + "\",level=" + mixCombatEfct.m_level + " where `charid`=" + mixCombatEfct.m_charId + ";"; pool.ExecuteSql(database, cmd); }
//COMBAT EFFECT public void InsertMixCombatEfct(DDO_CombatEfct mixCombatEfct) { cmd = "insert into `combat_effect` values(" + mixCombatEfct.m_charId + "," + mixCombatEfct.m_combatEfct + ",\"" + mixCombatEfct.m_name + "\",\"" + mixCombatEfct.m_ocp.ToString() + "\"," + mixCombatEfct.m_level + ");"; pool.ExecuteSql(database, cmd); }