protected ABrain(Unit unit)
 {
     _unit  = unit;
     Combat = (CombatInterface_Npc)unit.CbtInterface;
     AI     = unit.AiInterface;
     _pet   = unit as Pet;
 }
Beispiel #2
0
 public Unit()
     : base()
 {
     ItmInterface = new ItemsInterface(this);
     CbtInterface = new CombatInterface(this);
     StsInterface = new StatsInterface(this);
     QtsInterface = new QuestsInterface(this);
     MvtInterface = new MovementInterface(this);
     AbtInterface = new AbilityInterface(this);
     AiInterface  = new AIInterface(this);
 }
Beispiel #3
0
 public Unit()
     : base()
 {
     ItmInterface = new ItemsInterface(this);
     CbtInterface = new CombatInterface(this);
     StsInterface = new StatsInterface(this);
     QtsInterface = new QuestsInterface(this);
     MvtInterface = new MovementInterface(this);
     AbtInterface = new AbilityInterface(this);
     AiInterface = new AIInterface(this);
 }
Beispiel #4
0
 public Unit()
     : base()
 {
     ItmInterface = AddInterface<ItemsInterface>();
     CbtInterface = AddInterface<CombatInterface>();
     StsInterface = AddInterface<StatsInterface>();
     QtsInterface = AddInterface<QuestsInterface>();
     MvtInterface = AddInterface<MovementInterface>();
     AbtInterface = AddInterface<AbilityInterface>();
     AiInterface = AddInterface<AIInterface>();
 }
        public override void OnAttacked(Unit attacker)
        {
            if (_petOwner.AIMode != (byte)PetCommand.Passive && !_petOwner.IsHeeling && !IgnoreDamageEvents && CurrentTarget == null)
            {
                switch (AIInterface.State)
                {
                case AiState.STANDING:
                    AIInterface.ProcessCombatStart(attacker);
                    break;

                case AiState.MOVING:
                    AIInterface.ProcessCombatStart(attacker);
                    break;
                }
            }

            RefreshCombatTimer();

            _petOwner.Owner.CbtInterface.RefreshCombatTimer();
        }
        public override void OnDealDamage(Unit victim, uint damageCount)
        {
            if (_petOwner.AIMode != (byte)PetCommand.Passive && !_petOwner.IsHeeling && !IgnoreDamageEvents && CurrentTarget == null)
            {
                switch (AIInterface.State)
                {
                case AiState.STANDING:
                    AIInterface.ProcessCombatStart(victim);
                    break;

                case AiState.MOVING:
                    AIInterface.ProcessCombatStart(victim);
                    break;
                }

                _Owner.EvtInterface.Notify(EventName.OnDealDamage, victim, damageCount);
            }

            RefreshCombatTimer();

            _petOwner.Owner.CbtInterface.RefreshCombatTimer();
        }
        public override void OnTakeDamage(Unit fighter, uint damage, float hatredMod, uint mitigation = 0)
        {
            if (_petOwner.AIMode != (byte)PetCommand.Passive && !_petOwner.IsHeeling && !IgnoreDamageEvents && CurrentTarget == null)
            {
                switch (AIInterface.State)
                {
                case AiState.STANDING:
                    AIInterface.ProcessCombatStart(fighter);
                    break;

                case AiState.MOVING:
                    AIInterface.ProcessCombatStart(fighter);
                    break;
                }

                _Owner.EvtInterface.Notify(EventName.OnReceiveDamage, fighter, null);
            }

            RefreshCombatTimer();

            _petOwner.Owner.CbtInterface.RefreshCombatTimer();
        }
Beispiel #8
0
 public override bool Load()
 {
     AI = _Owner.GetUnit().AiInterface;
     ClearTargets();
     return(base.Load());
 }
Beispiel #9
0
 public GuardBrain(AIInterface Interface)
     : base(Interface)
 {
 }
Beispiel #10
0
 public AgressiveBrain(AIInterface Interface)
     : base(Interface)
 {
 }
Beispiel #11
0
        public AgressiveBrain(AIInterface Interface)
            : base(Interface)
        {

        }
Beispiel #12
0
 public override bool Load()
 {
     AI = _Owner.GetUnit().AiInterface;
     ClearTargets();
     return base.Load();
 }
Beispiel #13
0
 public ABrain(AIInterface Interface)
 {
     this.Interface = Interface;
 }
Beispiel #14
0
 public ABrain(AIInterface Interface)
 {
     this.Interface = Interface;
 }
Beispiel #15
0
        public GuardBrain(AIInterface Interface)
            : base(Interface)
        {

        }
Beispiel #16
0
        public PassiveBrain(AIInterface Interface)
            : base(Interface)
        {

        }
Beispiel #17
0
 public PassiveBrain(AIInterface Interface)
     : base(Interface)
 {
 }
Beispiel #18
0
 public override bool Load()
 {
     AIInterface   = UnitOwner.AiInterface;
     CurrentTarget = null;
     return(base.Load());
 }