Beispiel #1
0
        public bool Run(object[] args)
        {
            NWCreature self = (NWCreature)args[0];

            if (!self.IsInCombat ||
                self.RightHand.IsRanged)
            {
                return(false);
            }

            self.AssignCommand(() =>
            {
                _.ActionEquipMostDamagingMelee(new Object());
            });

            return(true);
        }
Beispiel #2
0
        public BehaviourTreeBuilder Build(BehaviourTreeBuilder builder, params object[] args)
        {
            return(builder.Do("EquipBestMelee", t =>
            {
                NWCreature self = (NWCreature)args[0];
                if (!self.IsInCombat ||
                    self.RightHand.IsRanged)
                {
                    return BehaviourTreeStatus.Failure;
                }

                self.AssignCommand(() =>
                {
                    _.ActionEquipMostDamagingMelee(new Object());
                });

                return BehaviourTreeStatus.Running;
            }));
        }