Esempio n. 1
0
 /// <summary>
 /// Makes the given Unit use this GameObject.
 /// Skill-locked GameObjects cannot be used directly but must be interacted on with spells.
 /// </summary>
 public bool Use(Character chr)
 {
     if (Lock != null && !Lock.IsUnlocked && Lock.Keys.Length <= 0 || !Handler.TryUse(chr))
     {
         return(false);
     }
     if (Entry.PageId != 0U)
     {
         MiscHandler.SendGameObjectTextPage(chr, this);
     }
     if (GossipMenu != null)
     {
         chr.StartGossip(GossipMenu, this);
     }
     chr.QuestLog.OnUse(this);
     return(true);
 }
Esempio n. 2
0
 /// <summary>
 /// Makes the given Unit use this GameObject.
 /// Skill-locked GameObjects cannot be used directly but must be interacted on with spells.
 /// </summary>
 public bool Use(Character chr)
 {
     if (this.Lock != null && !this.Lock.IsUnlocked && this.Lock.Keys.Length <= 0 || !this.Handler.TryUse(chr))
     {
         return(false);
     }
     if (this.Entry.PageId != 0U)
     {
         MiscHandler.SendGameObjectTextPage((IPacketReceiver)chr, (IEntity)this);
     }
     if (this.GossipMenu != null)
     {
         chr.StartGossip(this.GossipMenu, (WorldObject)this);
     }
     chr.QuestLog.OnUse(this);
     return(true);
 }
Esempio n. 3
0
        /// <summary>
        /// Makes the given Unit use this GameObject.
        /// Skill-locked GameObjects cannot be used directly but must be interacted on with spells.
        /// </summary>
        public bool Use(Character chr)
        {
            if ((Lock == null || Lock.IsUnlocked || Lock.Keys.Length > 0) &&
                Handler.TryUse(chr))
            {
                if (Entry.PageId != 0)
                {
                    MiscHandler.SendGameObjectTextPage(chr, this);
                }
                if (GossipMenu != null)
                {
                    chr.StartGossip(GossipMenu, this);
                }


                chr.QuestLog.OnUse(this);
                return(true);
            }
            return(false);
        }