Exemplo n.º 1
0
        private void ChangeModel(int skinId, AttackableUnit target)
        {
            switch (skinId)
            {
            case 0:
                ApiFunctionManager.SetChampionModel((Champion)target, "LuluSquill");
                break;

            case 1:
                ApiFunctionManager.SetChampionModel((Champion)target, "LuluCupcake");
                break;

            case 2:
                ApiFunctionManager.SetChampionModel((Champion)target, "LuluKitty");
                break;

            case 3:
                ApiFunctionManager.SetChampionModel((Champion)target, "LuluDragon");
                break;

            case 4:
                ApiFunctionManager.SetChampionModel((Champion)target, "LuluSnowman");
                break;
            }
        }
Exemplo n.º 2
0
        public void ApplyEffects(Champion owner, AttackableUnit target, Spell spell, Projectile projectile)
        {
            Champion champion   = (Champion)target;
            float    time       = 1 + 0.25f * spell.Level;
            var      buff       = ((ObjAIBase)target).AddBuffGameScript("LuluWDebuff", "LuluWDebuff", spell);
            var      visualBuff = ApiFunctionManager.AddBuffHUDVisual("LuluWDebuff", time, 1, (ObjAIBase)target);
            string   model      = champion.Model;

            ChangeModel(owner.Skin, target);

            Particle p = ApiFunctionManager.AddParticleTarget(owner, "Lulu_W_polymorph_01.troy", target, 1);

            ApiFunctionManager.CreateTimer(time, () =>
            {
                ApiFunctionManager.RemoveParticle(p);
                ApiFunctionManager.RemoveBuffHUDVisual(visualBuff);
                owner.RemoveBuffGameScript(buff);
                ApiFunctionManager.SetChampionModel((Champion)target, model);
            });
            projectile.setToRemove();
        }