示例#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();
        }
示例#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;
        }
示例#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);
    }
示例#4
0
 public virtual void ChangeNode()
 {
     AiCharacter.ChangeFollowStatus();
 }