Ejemplo n.º 1
0
        /// <summary>
        /// Called when a combat pet attacks a monster
        /// </summary>
        public void PetOnAttackMonster(Creature monster)
        {
            /*Console.WriteLine($"{Name}.PetOnAttackMonster({monster.Name})");
             * Console.WriteLine($"Attackable: {monster.Attackable}");
             * Console.WriteLine($"Tolerance: {monster.Tolerance}");*/

            // faction mobs will retaliate against combat pets belonging to the same faction
            if (monster.SameFaction(this))
            {
                monster.AddRetaliateTarget(this);
            }

            if (monster.MonsterState == State.Idle && (monster.Tolerance & PlayerCombatPet_RetaliateExclude) == 0)
            {
                monster.AttackTarget = this;
                monster.WakeUp();
            }
        }