/// <summary>
        /// Unassign this slot.
        /// </summary>
        public override void Unassign()
        {
            // Remove the icon
            base.Unassign();

            // Clear the talent info
            this.m_TalentInfo = null;

            // Clear the spell info
            this.m_SpellInfo = null;
        }
        public void Assign()
        {
            if (this.slot == null || this.talentDatabase == null || this.spellDatabase == null)
            {
                return;
            }

            UITalentInfo info = this.talentDatabase.GetByID(this.assignTalent);

            if (info != null)
            {
                this.slot.Assign(info, this.spellDatabase.GetByID(info.spellEntry));
                this.slot.AddPoints(this.addPoints);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Assign the specified slot by talentInfo and spellInfo.
        /// </summary>
        /// <param name="talentInfo">Talent info.</param>
        /// <param name="spellInfo">Spell info.</param>
        public bool Assign(UITalentInfo talentInfo, UISpellInfo spellInfo)
        {
            if (talentInfo == null || spellInfo == null)
                return false;

            // Use the base class to assign the icon
            this.Assign(spellInfo.Icon);

            // Set the talent info
            this.m_TalentInfo = talentInfo;

            // Set the spell info
            this.m_SpellInfo = spellInfo;

            // Update the points label
            this.UpdatePointsLabel();

            // Return success
            return true;
        }
        /// <summary>
        /// Assign the specified slot by talentInfo and spellInfo.
        /// </summary>
        /// <param name="talentInfo">Talent info.</param>
        /// <param name="spellInfo">Spell info.</param>
        public bool Assign(UITalentInfo talentInfo, UISpellInfo spellInfo)
        {
            if (talentInfo == null || spellInfo == null)
            {
                return(false);
            }

            // Use the base class to assign the icon
            this.Assign(spellInfo.Icon);

            // Set the talent info
            this.m_TalentInfo = talentInfo;

            // Set the spell info
            this.m_SpellInfo = spellInfo;

            // Update the points label
            this.UpdatePointsLabel();

            // Return success
            return(true);
        }
        void Start()
        {
            if (this.slot == null)
            {
                this.slot = this.GetComponent <UITalentSlot>();
            }

            if (this.slot == null || this.talentDatabase == null || this.spellDatabase == null)
            {
                this.Destruct();
                return;
            }

            UITalentInfo info = this.talentDatabase.GetByID(this.assignTalent);

            if (info != null)
            {
                this.slot.Assign(info, this.spellDatabase.GetByID(info.spellEntry));
                this.slot.AddPoints(this.addPoints);
            }

            this.Destruct();
        }
		/// <summary>
		/// Unassign this slot.
		/// </summary>
		public override void Unassign()
		{
			// Remove the icon
			base.Unassign();
			
			// Clear the talent info
			this.m_TalentInfo = null;
			
			// Clear the spell info
			this.m_SpellInfo = null;
		}