/// <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;
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
		/// <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;
		}