Ejemplo n.º 1
0
        public static ActionbarRecord NewActionBarRecord(SpecProfile profile, int groupId)
        {
            var newRecord = new ActionbarRecord() {
                SpecProfile = profile,
                ActionbarGroupId = groupId
            };

            //newRecord.CreateAndFlush();

            return newRecord;
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Creates a new SpecProfile and saves it to the db.
		/// </summary>
		/// <param name="record">The character or pet that will own the spec profile.</param>
		/// <returns>The newly created SpecProfile.</returns>
		public static SpecProfile NewSpecProfile(Character owner, int specIndex, byte[] actionbar)
		{
			// TODO: Glyphs
			var newProfile = new SpecProfile(owner.EntityId.Low, specIndex)
			{
				ActionButtons = actionbar,
				GlyphIds = new uint[6]
			};

			return newProfile;
		}
Ejemplo n.º 3
0
        public static GlyphRecord NewGlyphRecord(SpecProfile profile, int groupId)
        {
            var newRecord = new GlyphRecord() {
                SpecProfile = profile,
                GlyphGroupId = groupId,
                glyphPropertiesId = 0
            };

            //newRecord.CreateAndFlush();

            return newRecord;
        }
Ejemplo n.º 4
0
		public static ITalentRecord NewTalentRecord(SpecProfile profile, int talentGroupId, TalentId talentId, int rank)
		{
			var newRecord = new TalentRecord()
			{
				SpecProfile = profile,
				TalentGroupId = talentGroupId,
				TalentId = talentId,
				Rank = rank
			};

			// TODO: Only save in DB-queue context!
			//newRecord.CreateAndFlush();

			return newRecord;
		}
Ejemplo n.º 5
0
        /// <summary>
        /// Creates a new SpecProfile and saves it to the db.
        /// </summary>
        /// <param name="record">The character or pet that will own the spec profile.</param>
        /// <returns>The newly created SpecProfile.</returns>
        public static SpecProfile NewSpecProfile(Character owner)
        {
            var newProfile = new SpecProfile() {
				owner = owner,
                talentGroupCount = 1,
                TalentGroupInUse = 0,
                glyphGroupRecords = new List<GlyphRecord>(MAX_GLYPHS_PER_GROUP*MAX_TALENT_GROUPS),
                actionbarGroupRecords = new List<ActionbarRecord>()
            };

			// TODO: Load existing profiles
            //newProfile.CreateAndFlush();

            for (var i = 0; i < MAX_GLYPHS_PER_GROUP; i++)
            {
                newProfile.glyphGroupRecords.Add(GlyphRecord.NewGlyphRecord(newProfile, 0));
            }
            
            return newProfile;
		}
Ejemplo n.º 6
0
 public GlyphRecord(SpecProfile profile, int groupId)
 {
     SpecProfile = profile;
     GlyphGroupId = groupId;
     glyphPropertiesId = 0;
 }