コード例 #1
0
        public CharacterDatabaseData(DataRow row)
            : base()
        {
            Skills    = new CharacterSkillTree();
            Storage   = new ItemStorage();
            Inventory = new ItemInventory();
            Cart      = new ItemInventoryCart();
            Hotkeys   = new CharacterHotkey[Global.MAX_HOTKEYS];
            Friends   = new CharacterFriendList();

            if (row != null)
            {
                LoadFromDatabase(row);
            }
        }
コード例 #2
0
        public void LoadSkills()
        {
            // TODO: rly needed? will be instanced in character constructor too
            //		 maybe only some custom clear implementation?
            Skills = new CharacterSkillTree();
            DataTable table = Core.Database.Query("SELECT * FROM `char_skill` WHERE `charID` = {0}", ID);

            if (table == null || table.Rows.Count == 0)
            {
                return;
            }

            foreach (DataRow row in table.Rows)
            {
                CharacterSkill skill = new CharacterSkill((ushort)row.Field <int>("skillID"), (ushort)row.Field <ushort>("skillLv"), ESkillFlag.Permanent);
                Skills.Add(skill);
            }
        }
コード例 #3
0
 public CharacterSkillTree(CharacterSkillTree tree)
     : this(tree.Length)
 {
     tree.CopyTo(mSkills, 0);
 }