Ejemplo n.º 1
0
 public AbilityProcessor(Unit caster, AbilityInterface parent)
 {
     _caster          = caster;
     _abInterface     = parent;
     _abEffectInvoker = new AbilityEffectInvoker(caster);
     _channelHandler  = new NewChannelHandler(this, caster);
 }
Ejemplo n.º 2
0
        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;
        }