Example #1
0
        public virtual void UnSummon()
        {
            AiCharacter.Disable();

            Owner.SendPacket(new PetDelete(ObjectSummonType, ObjId));

            Owner.Party?.BroadcastToMembers(new ExPartyPetWindowDelete(ObjId, Owner.ObjId, Name));

            Owner.Summon = null;
            DeleteMe();
        }
Example #2
0
        public override void OnSpawn(bool notifyOthers = true)
        {
            base.OnSpawn(notifyOthers);
            if (Template.AggroRange > 0)
            {
                AiCharacter.Enable();
            }

            SpawnX = X;
            SpawnY = Y;
            SpawnZ = Z;

            //socialTask = new System.Timers.Timer();
            //socialTask.Interval = rnd.Next(10, 30) * 1000;
            //socialTask.Elapsed += new System.Timers.ElapsedEventHandler(SocialTask);
            //socialTask.Enabled = true;
        }
Example #3
0
    protected virtual void Awake()
    {
        if (agent == false)
        {
            var companion = GameObject.FindWithTag("Companion");
            if (companion)
                agent = companion.GetComponent<NavMeshAgent>();

        }

        if (agent)
            _aiCharacter = agent.GetComponent<AiCharacter>();
        else
        {
            gameObject.SetActive(false);    //  No faun exists, so turn this off
            return;
        }

        if (objectActive) ActivateObject(null);
    }
Example #4
0
 public virtual void ChangeNode()
 {
     AiCharacter.ChangeFollowStatus();
 }