コード例 #1
0
 public void Reset(DE_Skill skillDe, DE_SkillData skillDataDe, DDO_Skill ddo)
 {
     m_skillDe     = skillDe;
     m_skillDataDe = skillDataDe;
     m_skillLevel  = ddo.m_skillLevel;
     m_masterly    = ddo.m_masterly;
 }
コード例 #2
0
        public List <DDO_Skill> GetSkillListByCharacterId(int charId)
        {
            DataSet ds = new DataSet();

            cmd = "select * from skill where charid=" + charId + ";";

            pool.ExecuteSql(database, cmd, ds);
            DataTable        dt  = ds.Tables[0];
            List <DDO_Skill> res = new List <DDO_Skill> ();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DDO_Skill skill = new DDO_Skill();
                skill.m_skillId    = short.Parse(dt.Rows[i]["skillid"].ToString());
                skill.m_masterly   = int.Parse(dt.Rows[i]["masterly"].ToString());
                skill.m_skillLevel = short.Parse(dt.Rows[i]["level"].ToString());
                res.Add(skill);
            }
            return(res);
        }
コード例 #3
0
        //SKILL
        public void UpdateSkill(DDO_Skill ddo)
        {
            int charId = ddo.m_characterId;

            DataSet ds = new DataSet();

            cmd = "select * from skill where charid=" + charId + " and skillid=" + ddo.m_skillId + ";";

            pool.ExecuteSql(database, cmd, ds);
            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count != 0)
            {
                cmd = "update skill set masterly=" + ddo.m_masterly + ", level=" + ddo.m_skillLevel + " where charid=" + charId + " and skillid=" + ddo.m_skillId + ";";
            }
            else
            {
                cmd = "insert into skill values(null," + ddo.m_skillId + "," + charId + "," + ddo.m_masterly + "," + ddo.m_skillLevel + ")";
            }
            pool.ExecuteSql(database, cmd);
        }
コード例 #4
0
        public void InsertSkill(DDO_Skill skill)
        {
            cmd = "insert into skill values(null," + skill.m_skillId + "," + skill.m_characterId + "," + skill.m_skillLevel + "," + skill.m_skillLevel + ");";

            pool.ExecuteSql(database, cmd);
        }