Beispiel #1
0
        private static void FakeCreateLogic(Obj_AI_Base obj,
                                            string createname,
                                            int fakeNetId,
                                            bool namecheck,
                                            string changname)
        {
            if (!Menus.Menu.Item(createname).GetValue <bool>())
            {
                return;
            }
            var ho = SkillsList.IsObj(createname);

            if (ho == null)
            {
                return;
            }

            var misccheck = SkillsList.IsMisc(createname);

            if (misccheck != null)
            {
                return;
            }

            if (namecheck)
            {
                createname = changname;
            }

            var sender = new GameObject();

            foreach (var hero in
                     ObjectManager.Get <Obj_AI_Hero>().Where(d => obj.BaseSkinName == d.BaseSkinName))
            {
                AllSkills.Add(
                    new ListedText(
                        fakeNetId, createname, ho.Duration, hero.Position, Game.Time, sender, ho.Realtime, hero));
            }
        }
Beispiel #2
0
        private static void OnCreateObject(GameObject sender, EventArgs args)
        {
            // obj_AI_Minion can't type to "ObjectManager.GetUnitByNetworkId<Obj_GeneralParticleEmitter>", so it throw error.
            if (sender == null || args == null || sender.Type != GameObjectType.obj_GeneralParticleEmmiter ||
                !Menus.Menu.Item("activeskill").GetValue <bool>())
            {
                return;
            }
            if (sender.Name.Contains("missile") || sender.Name.Contains("Minion") ||
                sender.Name.Contains("InfiniteDuress_tar") || sender.Name.Contains("teleport_arrive") ||
                sender.Name.Contains("teleport_flash"))
            {
                return;
            }


            var ho =
                SkillsList.IsObj((ObjectManager.GetUnitByNetworkId <Obj_GeneralParticleEmitter>(sender.NetworkId)).Name);

            if (ho == null)
            {
                return;
            }

            var misccheck =
                SkillsList.IsMisc((ObjectManager.GetUnitByNetworkId <Obj_GeneralParticleEmitter>(sender.NetworkId)).Name);

            if (misccheck != null)
            {
                return;
            }



            {
                switch (ho.Realtime)
                {
                case 0:     //Object First Created Posistion
                    var r1 = DivideRealTime.RealTimeDivide(sender, 1);
                    if (r1 == null)
                    {
                        return;
                    }
                    if (PanthD)
                    {
                        ho.Duration = 2.5f;
                        PanthD      = false;
                    }
                    break;

                case 1:     //Realtime on Hero Position / Don't need to check Hero.isenemy
                    var r2 = DivideRealTime.RealTimeDivide(sender, 2);
                    if (r2 == null)
                    {
                        return;
                    }
                    if (KayleUlt)
                    {
                        if (!Menus.Menu.Item("eyeforaneye").GetValue <bool>())
                        {
                            return;
                        }
                        ho.Duration = KayleDuration;
                        KayleUlt    = false;
                    }
                    break;

                case 2:     //Realtime on Sender Position
                    var r3 = DivideRealTime.RealTimeDivide(sender, 1);
                    if (r3 == null)
                    {
                        return;
                    }
                    break;
                }
                AllSkills.Add(
                    new ListedText(
                        sender.NetworkId, sender.Name, ho.Duration, sender.Position, Game.Time, sender, ho.Realtime,
                        Heropos));
            }
        }