public AbilityProcessor(Unit caster, AbilityInterface parent)
 {
     _caster          = caster;
     _abInterface     = parent;
     _abEffectInvoker = new AbilityEffectInvoker(caster);
     _channelHandler  = new NewChannelHandler(this, caster);
 }
示例#2
0
文件: Ability.cs 项目: dzikun/WarEmu
 public Ability(AbilityInterface Interface, Ability Parent, Ability_Stats Info, Unit Caster, bool IsBuff, ushort Px, ushort Py, ushort Pz, ushort ZoneId, string OverrideHandler = "")
     : this(Interface, Parent, Info, Caster, IsBuff, OverrideHandler)
 {
     this.Px = Px;
     this.Py = Py;
     this.Pz = Pz;
     this.ZoneId = ZoneId;
 }
示例#3
0
 public Ability(AbilityInterface Interface, Ability Parent, Ability_Stats Info, Unit Caster, bool IsBuff, ushort Px, ushort Py, ushort Pz, ushort ZoneId, string OverrideHandler = "")
     : this(Interface, Parent, Info, Caster, IsBuff, OverrideHandler)
 {
     this.Px     = Px;
     this.Py     = Py;
     this.Pz     = Pz;
     this.ZoneId = ZoneId;
 }
示例#4
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);
 }
示例#5
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);
 }
示例#6
0
文件: Unit.cs 项目: nalgol/WarEmu
 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 static void F_BUY_CAREER_PACKAGE(BaseClient client, PacketIn packet)
        {
            GameClient cclient = (GameClient)client;

            if (cclient.Plr == null)
            {
                return;
            }

            AbilityInterface abInterface = cclient.Plr.AbtInterface;

            byte value    = packet.GetUint8();
            byte resource = packet.GetUint8();
            byte unk1     = packet.GetUint8();
            byte tree     = packet.GetUint8();

            if (resource != 7) // renown training
            {
                cclient.Plr.RenInterface.PurchaseRenownAbility(resource, tree);
                return;
            }

            if (tree <= 3)
            {
                if (!abInterface.AddPointToTree(tree))
                {
                    return;
                }
            }

            else if (tree <= 24)
            {
                byte targetTree = 1;
                tree -= 3;

                while (tree > 7)
                {
                    tree -= 7;
                    targetTree++;
                }

                abInterface.ActivateSkillInTree(targetTree, tree);
            }

            else
            {
                return;
            }

            abInterface.SaveMastery();
            abInterface.ReloadMastery();
            abInterface.MasteryChanged = true;
        }
示例#8
0
文件: Ability.cs 项目: dzikun/WarEmu
        public Ability(AbilityInterface Interface, Ability Parent, Ability_Stats Info, Unit Caster, bool IsBuff, string OverrideHandler = "")
        {
            this.Parent = Parent;
            this.Info = Info;
            this.Caster = Caster;
            this.Interface = Interface;
            if (OverrideHandler == "")
                this.Handler = AbilityMgr.GetAbilityHandler(Info.Entry, Info.Info.HandlerName);
            else
                this.Handler = AbilityMgr.GetAbilityHandler(0, OverrideHandler);

            this.IsBuff = IsBuff;

            if (Handler != null)
                Handler.InitAbility(this);
        }
示例#9
0
        public Ability(AbilityInterface Interface, Ability Parent, Ability_Stats Info, Unit Caster, bool IsBuff, string OverrideHandler = "")
        {
            this.Parent    = Parent;
            this.Info      = Info;
            this.Caster    = Caster;
            this.Interface = Interface;
            if (OverrideHandler == "")
            {
                this.Handler = AbilityMgr.GetAbilityHandler(Info.Entry, Info.Info.HandlerName);
            }
            else
            {
                this.Handler = AbilityMgr.GetAbilityHandler(0, OverrideHandler);
            }

            this.IsBuff = IsBuff;

            if (Handler != null)
            {
                Handler.InitAbility(this);
            }
        }