Exemple #1
0
        private static void OnCreateObj_LuxMaliceCannon(GameObject obj, EventArgs args, AIHeroClient hero, SpellData spellData)
        {
            if (obj.Name.Contains("Lux") && obj.Name.Contains("R_mis_beam_middle"))
            {
                if (hero.IsVisible)
                {
                    return;
                }

                var objList = ObjectTracker.objTracker.Values.Where(o => o.Name == "hiu");
                if (objList.Count() >= 2)
                {
                    var dir  = ObjectTracker.GetLastHiuOrientation();
                    var pos1 = obj.Position.To2D() - dir * 1750;
                    var pos2 = obj.Position.To2D() + dir * 1750;

                    SpellDetector.CreateSpellData(hero, pos1.To3D(), pos2.To3D(), spellData, null, 0);

                    foreach (ObjectTrackerInfo gameObj in objList)
                    {
                        DelayAction.Add(1, () => ObjectTracker.objTracker.Remove(gameObj.obj.NetworkId));
                    }
                }
            }
        }
Exemple #2
0
        private static void OnCreateObj_jayceshockblast(GameObject obj, EventArgs args, AIHeroClient hero, SpellData spellData)
        {
            return;

            if (obj.IsEnemy && obj.Type == GameObjectType.obj_GeneralParticleEmitter &&
                obj.Name.Contains("Jayce") && obj.Name.Contains("accel_gate_start"))
            {
                var dir  = ObjectTracker.GetLastHiuOrientation();
                var pos1 = obj.Position.To2D() - dir * 470;
                var pos2 = obj.Position.To2D() + dir * 470;

                var gateTracker = new ObjectTrackerInfo(obj, "AccelGate");
                gateTracker.direction = dir.To3D();

                ObjectTracker.objTracker.Add(obj.NetworkId, gateTracker);

                foreach (var entry in SpellDetector.spells)
                {
                    var spell = entry.Value;

                    if (spell.info.spellName == "jayceshockblast")
                    {
                        var tHero = spell.heroID;

                        var intersection = spell.startPos.Intersection(spell.endPos, pos1, pos2);
                        var projection   = intersection.Point.ProjectOn(spell.startPos, spell.endPos);

                        if (intersection.Intersects && projection.IsOnSegment)
                        {
                            SpellDetector.CreateSpellData(hero, intersection.Point.To3D(), spell.endPos.To3D(), spellData, spell.spellObject);

                            DelayAction.Add(1, () => SpellDetector.DeleteSpell(entry.Key));
                        }
                    }
                }

                //SpellDetector.CreateSpellData(hero, pos1.To3D(), pos2.To3D(), spellData, null, 0);
            }
        }