Пример #1
0
        private static void Game_OnGameProcessPacket(GamePacketEventArgs args)
        {
            var packet = new GamePacket(args.PacketData);
            Camp camp;

            switch (packet.Header)
            {
                case 0xC3:
                    packet.Position = 5;
                    var UnitNetworkId = packet.ReadInteger();
                    var CampId = packet.ReadInteger();
                    var EmptyType = packet.ReadByte();
                    var BuffHash = packet.ReadInteger();
                    var respawnTime = packet.ReadFloat();

                    camp = Camps[CampId];
                    if (camp != null)
                        camp.Kill(respawnTime);

                    break;

                case 0xE9:
                    packet.Position = 21;
                    var campId = packet.ReadByte();

                    camp = Camps[campId];
                    if (camp != null)
                        camp.Spawn();

                    break;
            }
        }
Пример #2
0
 public static void OnGameProcessPacket(GamePacketEventArgs args)
 {
     try
     {
         if (Config.Item("db_targ").GetValue<KeyBind>().Active)
         {
             LogPacket(args);
         }
         if (Riven.orbwalker.ActiveMode.ToString() == "Combo")
         {
             if (args.PacketData[0] == 101 && Riven.Q.IsReady())
             {
                // LogPacket(args);
                 GamePacket gp = new GamePacket(args.PacketData);
                 gp.Position = 5;
                 int dType = (int)gp.ReadByte();
                 int targetID = gp.ReadInteger();
                 int source = gp.ReadInteger();
                 if (Riven.Player.NetworkId != source)
                     return;
                 Obj_AI_Hero targ = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(targetID);
                 if(dType == 12 || dType == 3)
                     Riven.Q.Cast(targ.Position);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
 }
Пример #3
0
 static void Game_OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (config.Item("grabem").GetValue<KeyBind>().Active)
     {
         GamePacket g = new GamePacket(args.PacketData);
         if (g.Header == 0xFE)
         {
             if (Packet.MultiPacket.OnAttack.Decoded(args.PacketData).Type == Packet.AttackTypePacket.TargetedAA)
             {
                 g.Position = 1;
                 var k = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(g.ReadInteger());
                 if (k is Obj_AI_Hero && k.IsEnemy)
                 {
                     if (Vector3.Distance(k.Position, ObjectManager.Player.Position) <= 925)
                     {
                         //Game.PrintChat(k.Name + " auto'd");
                         List<Vector3> v = new List<Vector3> {k.Position};
                         var l = LeagueSharp.Common.Collision.GetCollision(v, p);
                         if (l.Count == 0)
                         {
                             //Game.PrintChat("casting q");
                             ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Q, k.Position);
                         }
                     }
                 }
             }
         }
     }
 }
Пример #4
0
        private static void Game_OnGameSendPacket(GamePacketEventArgs args)
        {
            if (args.PacketData[0] != 0xA8)
                return;

            var p = new GamePacket(args.PacketData) { Position = 5 };
            LastSequence = p.ReadInteger();
        }
Пример #5
0
        public static void Game_OnGameProcessPacket(GamePacketEventArgs args)
        {
            if (!Config.Item("comboWreset").GetValue<bool>() || args.PacketData[0] != 0x65 || !MasterYi.W.IsReady() ||
                LxOrbwalker.CurrentMode != LxOrbwalker.Mode.Combo)
            {
                return;
            }

            // LogPacket(args);
            var gp = new GamePacket(args.PacketData) {Position = 1};
            var dmg = Packet.S2C.Damage.Decoded(args.PacketData);

            var targetId = gp.ReadInteger();
            int dType = gp.ReadByte();
            int unknown = gp.ReadShort();
            var damageAmount = gp.ReadFloat();
            var targetNetworkIdCopy = gp.ReadInteger();
            var sourceNetworkId = gp.ReadInteger();
            var dmga =
                (float)
                    MasterYi.Player.GetAutoAttackDamage(
                        ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(targetId));
            if (dmga - 10 > damageAmount || dmga + 10 < damageAmount)
            {
                return;
            }

            if (MasterYi.Player.NetworkId != dmg.SourceNetworkId && MasterYi.Player.NetworkId == targetId)
            {
                return;
            }

            var targ = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(dmg.TargetNetworkId);
            if ((int) dmg.Type != 12 && (int) dmg.Type != 4 && (int) dmg.Type != 3)
            {
                return;
            }

            if (MasterYi.W.IsReady() && LxOrbwalker.InAutoAttackRange(targ))
            {
                MasterYi.W.Cast(targ.Position);
                // LXOrbwalker.ResetAutoAttackTimer();
            }
            // Console.WriteLine("dtyoe: " + dType);
        }
Пример #6
0
 private static void Game_OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] == 0x71)
     {
         var packet = new GamePacket(args.PacketData) {Position = 1};
         var networkId = packet.ReadInteger();
         WObjectNetworkId = networkId;
     }
 }
Пример #7
0
        /// <summary>
        ///     Detects the spells that have missile and are casted from fow.
        /// </summary>
        public static void GameOnOnGameProcessPacket(GamePacketEventArgs args)
        {
            //Gets received when a projectile is created.
            if (args.PacketData[0] == 0x3B)
            {
                var packet = new GamePacket(args.PacketData);

                packet.Position = 1;

                packet.ReadFloat(); //Missile network ID

                var missilePosition = new Vector3(packet.ReadFloat(), packet.ReadFloat(), packet.ReadFloat());
                var unitPosition = new Vector3(packet.ReadFloat(), packet.ReadFloat(), packet.ReadFloat());

                packet.Position = packet.Size() - 119;
                var missileSpeed = packet.ReadFloat();

                packet.Position = 65;
                var endPos = new Vector3(packet.ReadFloat(), packet.ReadFloat(), packet.ReadFloat());

                packet.Position = 112;
                var id = packet.ReadByte();

                packet.Position = packet.Size() - 83;

                var unit = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(packet.ReadInteger());
                if ((!unit.IsValid || unit.Team == ObjectManager.Player.Team))
                {
                    return;
                }

                var spellData = SpellDatabase.GetBySpeed(unit.ChampionName, (int)missileSpeed, id);

                if (spellData == null)
                {
                    return;
                }
                if (spellData.SpellName != "Laser")
                {
                    return;
                }
                var castTime = Environment.TickCount - Game.Ping / 2 - spellData.Delay
                               - (int)
                                 (1000 * missilePosition.SwitchYZ().To2D().Distance(unitPosition.SwitchYZ())
                                  / spellData.MissileSpeed);

                //Trigger the skillshot detection callbacks.
                TriggerOnDetectSkillshot(
                    DetectionType.RecvPacket,
                    spellData,
                    castTime,
                    unitPosition.SwitchYZ().To2D(),
                    endPos.SwitchYZ().To2D(),
                    unit);
            }
        }
Пример #8
0
 static void Game_OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] == 0xFE && Config.Item("AntiCamLock").GetValue<bool>())
     {
         var p = new GamePacket(args.PacketData);
         if (p.ReadInteger(1) == ObjectManager.Player.NetworkId && p.Size() > 9)
         {
             args.Process = false;
         }
     }
 }
Пример #9
0
        public static void OnGameProcessPacket(GamePacketEventArgs args)
        {
            try
            {
                if (Talon.orbwalker.ActiveMode.ToString() == "Combo" || Config.Item("harHard").GetValue<KeyBind>().Active)
                {
                    if (args.PacketData[0] == 101 && Talon.Q.IsReady())
                    {
                        Packet.S2C.Damage.Struct dmg = Packet.S2C.Damage.Decoded(args.PacketData);
                        // LogPacket(args);
                        GamePacket gp = new GamePacket(args.PacketData);
                        gp.Position = 1;

                        int targetID = gp.ReadInteger();
                        int dType = (int)gp.ReadByte();
                        int Unknown = gp.ReadShort();
                        float DamageAmount = gp.ReadFloat();
                        int TargetNetworkIdCopy = gp.ReadInteger();
                        int SourceNetworkId = gp.ReadInteger();
                        if (Talon.Player.NetworkId != dmg.SourceNetworkId)
                            return;
                        Obj_AI_Hero targ = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(targetID);
                        if (targ != null)
                        {
                            Talon.sumItems.cast(SummonerItems.ItemIds.Ghostblade);
                            Talon.Q.Cast();
                            useQ = true;
                            Orbwalking.ResetAutoAttackTimer();

                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Пример #10
0
        private static void Game_OnGameProcessPacket(GamePacketEventArgs args)
        {
            if (args.PacketData[0] == 113)
            {
                var packet = new GamePacket(args.PacketData);
                packet.Position = 1;
                var networkId = packet.ReadInteger();
                var active = packet.ReadByte() == 1;

                if (active)
                    WObjectNetworkId = networkId;
                else
                    WObjectNetworkId = -1;
            }
        }
Пример #11
0
        static void Game_OnGameProcessPacket(GamePacketEventArgs args)
        {
            if (args.PacketData[0] == Packet.S2C.EmptyJungleCamp.Header)
            {
                Packet.S2C.EmptyJungleCamp.Struct camp = Packet.S2C.EmptyJungleCamp.Decoded(args.PacketData);
                Console.WriteLine("disable camp: "+camp.CampId);
                jTimer.disableCamp((byte)camp.CampId);
            }

            if (args.PacketData[0] == 0xE9)
            {
                GamePacket gp = new GamePacket(args.PacketData);
                gp.Position = 21;
                byte campID = gp.ReadByte();
                Console.WriteLine("Enable camp: "+campID);
                jTimer.enableCamp(campID);

            }

            //AfterAttack
            if (args.PacketData[0] == 0x65 && Config.Item("doJungle").GetValue<KeyBind>().Active)
            {
                GamePacket gp = new GamePacket(args.PacketData);
                gp.Position = 1;
                Packet.S2C.Damage.Struct dmg = Packet.S2C.Damage.Decoded(args.PacketData);

                int targetID = gp.ReadInteger();
                int dType = (int)gp.ReadByte();
                int Unknown = gp.ReadShort();
                float DamageAmount = gp.ReadFloat();
                int TargetNetworkIdCopy = gp.ReadInteger();
                int SourceNetworkId = gp.ReadInteger();
                float dmga = (float)player.GetAutoAttackDamage(ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(targetID));
                if (dmga - 10 > DamageAmount || dmga + 10 < DamageAmount)
                    return;
                if (player.NetworkId != dmg.SourceNetworkId || player.NetworkId == targetID || player.NetworkId == TargetNetworkIdCopy)
                    return;
                Obj_AI_Base targ = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(dmg.TargetNetworkId);
                if ((int) dmg.Type == 12 || (int) dmg.Type == 4 || (int) dmg.Type == 3)
                {
                    Console.WriteLine("dmg: " + DamageAmount + " : " + dmga);

                    JungleClearer.jungler.doAfterAttack(targ);
                }

            }
        }
 private static void Game_OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] != 0x34)
     {
         return;
     }
     var packet = new GamePacket(args.PacketData);
     packet.Position = 1;
     var networkId = packet.ReadInteger();
     if (args.PacketData[9] != 17)
     {
         return;
     }
     if (ActiveAttacks.ContainsKey(networkId))
     {
         ActiveAttacks.Remove(networkId);
     }
 }
Пример #13
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 1;
     result.NetworkId = packet.ReadInteger();
     result.FromSlotByte = packet.ReadByte();
     result.ToSlotByte = packet.ReadByte();
     return result;
 }
Пример #14
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 1;
     result.SourceNetworkId = packet.ReadInteger();
     result.ObjectNetworkId = packet.ReadInteger();
     return result;
 }
Пример #15
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 1;
     result.NetworkId = packet.ReadInteger();
     result.SlotByte = packet.ReadByte();
     result.SlotId = (SpellSlot)(result.SlotByte - 0x80 + (byte)SpellSlot.Item1);
     return result;
 }
Пример #16
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 1;
     result.SourceNetworkId = packet.ReadInteger();
     result.Slot = (SpellSlot)packet.ReadByte();
     result.ToX = packet.ReadFloat();
     result.ToY = packet.ReadFloat();
     result.ToZ = packet.ReadFloat();
     return result;
 }
Пример #17
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 1;
     result.SourceNetworkId = packet.ReadInteger();
     result.MoveType = packet.ReadByte();
     result.X = packet.ReadFloat();
     result.Y = packet.ReadFloat();
     result.TargetNetworkId = packet.ReadInteger();
     packet.ReadByte();
     result.UnitNetworkId = packet.ReadInteger();
     return result;
 }
Пример #18
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     packet.Position = 1;
     return new Struct(packet.ReadInteger());
 }
Пример #19
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();
                    packet.Position = 1;
                    result.NetworkId = packet.ReadInteger();
                    result.Id = packet.ReadInteger();
                    result.BOk = packet.ReadByte() == 0x01;
                    result.SkinId = packet.ReadInteger();

                    return result;
                }
Пример #20
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    packet.Position = 12;
                    result.UnitNetworkId = packet.ReadInteger();
                    result.Speed = packet.ReadFloat();

                    return result;
                }
Пример #21
0
 private static void Game_OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] == 0x17)
     {
         var packet = new GamePacket(args.PacketData);
         packet.Position = 1;
         if (packet.ReadInteger() == ObjectManager.Player.NetworkId)
         {
             packet.Position = 7;
             var id = packet.ReadByte();
             switch (id)
             {
                 case 0x42:
                     if (Select == Cards.Blue) SendWPacket();
                     break;
                 case 0x47:
                     if (Select == Cards.Yellow) SendWPacket();
                     break;
                 case 0x52:
                     if (Select == Cards.Red) SendWPacket();
                     break;
             }
         }
     }
 }
Пример #22
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data) { Position = 5 };
     return new Struct(
         packet.ReadFloat(), packet.ReadFloat(), packet.ReadInteger(), packet.ReadInteger(),
         (PingType)packet.ReadByte());
 }
Пример #23
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    packet.Position = 1;
                    result.TargetNetworkId = packet.ReadInteger();
                    result.Type = (DamageTypePacket)packet.ReadByte();
                    result.TargetNetworkIdCopy = packet.ReadInteger();
                    result.SourceNetworkId = packet.ReadInteger();
                    result.DamageAmount = packet.ReadFloat();

                    return result;
                }
Пример #24
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    packet.Position = 1;
                    result.UnitNetworkId = packet.ReadInteger();
                    packet.ReadShort();
                    result.MaxHealth = packet.ReadFloat();
                    result.CurrentHealth = packet.ReadFloat();
                    return result;
                }
Пример #25
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();


                    packet.Position = 1;
                    result.NetworkId = packet.ReadInteger();
                    result.Type = (FloatTextPacket) packet.ReadByte();
                    //result.Text = packet.ReadString();

                    return result;
                }
Пример #26
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 5;
     result.UnitNetworkId = packet.ReadInteger();
     result.CampId = packet.ReadInteger();
     result.EmptyType = packet.ReadByte();
     return result;
 }
Пример #27
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    packet.Position      = 5;
                    result.UnitNetworkId = packet.ReadInteger();
                    packet.Position      = 184;
                    var b = packet.ReadByte();

                    packet.Position = 81;
                    var b2 = packet.ReadByte();

                    result.Status = RecallStatus.Unknown;

                    var gObject = ObjectManager.GetUnitByNetworkId <GameObject>(result.UnitNetworkId);

                    if (gObject == null || !gObject.IsValid)
                    {
                        return(result);
                    }

                    if (gObject is Obj_AI_Hero)
                    {
                        var unit = (Obj_AI_Hero)gObject;

                        if (!unit.IsValid || unit.Spellbook.GetSpell(SpellSlot.Recall) == null)
                        {
                            return(result);
                        }

                        result.Type = ObjectType.Player;
                        var duration = Utility.GetRecallTime(unit);

                        result.Duration = duration;

                        if (!RecallT.ContainsKey(result.UnitNetworkId))
                        {
                            RecallT.Add(result.UnitNetworkId, 0);
                        }

                        if (!TPT.ContainsKey(result.UnitNetworkId))
                        {
                            TPT.Add(result.UnitNetworkId, 0);
                        }


                        if (b2 != 0 ||
                            TPT.ContainsKey(result.UnitNetworkId) &&
                            Environment.TickCount - TPT[result.UnitNetworkId] < 4500)
                        {
                            if (b2 != 0)
                            {
                                TPT[result.UnitNetworkId] = Environment.TickCount;
                                result.Status             = RecallStatus.TeleportStart;
                            }

                            else if (Environment.TickCount - TPT[result.UnitNetworkId] < 3500)
                            {
                                result.Status             = RecallStatus.TeleportAbort;
                                TPT[result.UnitNetworkId] = 0;
                            }
                            else if (Environment.TickCount - TPT[result.UnitNetworkId] < 4500)
                            {
                                result.Status             = RecallStatus.TeleportEnd;
                                TPT[result.UnitNetworkId] = 0;
                            }
                        }
                        else
                        {
                            switch (b)
                            {
                            case 4:
                                if (RecallT.ContainsKey(result.UnitNetworkId))
                                {
                                    if (Environment.TickCount - RecallT[result.UnitNetworkId] < duration - 1200)
                                    {
                                        result.Status = RecallStatus.RecallAborted;
                                    }
                                    else if (Environment.TickCount - RecallT[result.UnitNetworkId] < duration + 1000)
                                    {
                                        result.Status = RecallStatus.RecallFinished;
                                    }
                                    RecallT[result.UnitNetworkId] = 0;
                                }
                                break;

                            case 6:
                                result.Status = RecallStatus.RecallStarted;
                                RecallT[result.UnitNetworkId] = Environment.TickCount;
                                break;
                            }
                        }
                    }
                    else if (gObject is Obj_AI_Turret)
                    {
                        result.Type   = ObjectType.Turret;
                        result.Status = b2 != 0 ? RecallStatus.TeleportStart : RecallStatus.TeleportEnd;
                    }
                    else if (gObject is Obj_AI_Minion)
                    {
                        result.Type = ObjectType.Object;

                        if (gObject.Name.Contains("Minion"))
                        {
                            result.Type = ObjectType.Minion;
                        }
                        if (gObject.Name.Contains("Ward"))
                        {
                            result.Type = ObjectType.Ward;
                        }

                        result.Status = b2 != 0 ? RecallStatus.TeleportStart : RecallStatus.TeleportEnd;
                    }
                    else
                    {
                        result.Type = ObjectType.Object;
                    }


                    return(result);
                }
Пример #28
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();
                    packet.Position = 1;
                    result.TurretNetworkId = packet.ReadInteger();
                    result.TargetNetworkId = packet.ReadInteger();

                    if (result.TurretNetworkId != 0)
                    {
                        AggroList[result.TurretNetworkId] = result.TargetNetworkId;
                    }

                    return result;
                }
Пример #29
0
        static void Game_OnGameProcessPacket(GamePacketEventArgs args)
        {
            GamePacket g = new GamePacket(args.PacketData);
            if (g.Header != 0xFE)
                return;

            if (menu.Item("qAA").GetValue<KeyBind>().Active)
            {
                if (Packet.MultiPacket.OnAttack.Decoded(args.PacketData).Type == Packet.AttackTypePacket.TargetedAA)
                {
                    g.Position = 1;
                    var k = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(g.ReadInteger());
                    if (k is Obj_AI_Hero && k.IsEnemy)
                    {
                        if (Vector3.Distance(k.Position, Player.Position) <= Q.Range)
                        {
                            Q.Cast(k.Position, packets());
                        }
                    }
                }
            }
        }
Пример #30
0
        private static void OnGameProcessPacket(GamePacketEventArgs args)
        {//28 16 176 ??184
            if (args.PacketData[0] == 41)//135no 100no 183no 34no 101 133 56yesss? 127 41yess
            {
                GamePacket gp = new GamePacket(args.PacketData);
                //Console.WriteLine(Encoding.UTF8.GetString(args.PacketData, 0, args.PacketData.Length));
                gp.Position = 1;
                if (gp.ReadInteger() == Yasuo.Player.NetworkId /*&&  Encoding.UTF8.GetString(args.PacketData, 0, args.PacketData.Length).Contains("Spell3")*/)
                {
                    Console.WriteLine("----");
                    Yasuo.lastDash.to = Yasuo.Player.Position;
                    Yasuo.isDashigPro = false;
                    Yasuo.time = Game.Time - Yasuo.startDash;
                }
                /* for (int i = 1; i < gp.Size() - 4; i++)
                 {
                     gp.Position = i;
                     if (gp.ReadInteger() == Yasuo.Player.NetworkId)
                     {
                         Console.WriteLine("Found: "+i);
                     }
                 }

                 Console.WriteLine("End dash");
                 Yasuo.Q.Cast(Yasuo.Player.Position);*/
            }

            /*if (args.PacketData[0] == 176) //135no 100no 183no 34no 101 133 56yesss? 127 41yess
            {
                GamePacket gp = new GamePacket(args.PacketData);
                //Console.WriteLine(Encoding.UTF8.GetString(args.PacketData, 0, args.PacketData.Length));
                gp.Position = 1;
                if (gp.ReadInteger() == Yasuo.Player.NetworkId)
                {
                    Console.WriteLine("--- DAhs started Packets---");
                    Yasuo.lastDash.from = Yasuo.Player.Position;
                    Yasuo.isDashigPro = true;
                    Yasuo.castFrom = Yasuo.Player.Position;
                    Yasuo.startDash = Game.Time;
                }
            }*/
        }
Пример #31
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    packet.Position = 5;
                    result.UnitNetworkId = packet.ReadInteger();
                    packet.Position = 184;
                    var b = packet.ReadByte();
                    packet.Position = 81;
                    var b2 = packet.ReadByte();
                    result.Status = RecallStatus.Unknown;

                    var gObject = ObjectManager.GetUnitByNetworkId<GameObject>(result.UnitNetworkId);

                    if (gObject == null || !gObject.IsValid)
                        return result;

                    if (gObject is Obj_AI_Hero)
                    {
                        var unit = (Obj_AI_Hero)gObject;

                        if (!unit.IsValid || unit.Spellbook.GetSpell(SpellSlot.Recall) == null)
                            return result;

                        result.Type = ObjectType.Player;
                        var duration = Utility.GetRecallTime(unit);

                        result.Duration = duration;

                        if (!RecallT.ContainsKey(result.UnitNetworkId))
                        {
                            RecallT.Add(result.UnitNetworkId, 0);
                        }

                        if (!TPT.ContainsKey(result.UnitNetworkId))
                        {
                            TPT.Add(result.UnitNetworkId, 0);
                        }


                        if (b2 != 0 ||
                            TPT.ContainsKey(result.UnitNetworkId) &&
                            Environment.TickCount - TPT[result.UnitNetworkId] < 4500)
                        {
                            if (b2 != 0)
                            {
                                TPT[result.UnitNetworkId] = Environment.TickCount;
                                result.Status = RecallStatus.TeleportStart;
                            }

                            else if (Environment.TickCount - TPT[result.UnitNetworkId] < 3500)
                            {
                                result.Status = RecallStatus.TeleportAbort;
                                TPT[result.UnitNetworkId] = 0;
                            }
                            else if (Environment.TickCount - TPT[result.UnitNetworkId] < 4500)
                            {
                                result.Status = RecallStatus.TeleportEnd;
                                TPT[result.UnitNetworkId] = 0;
                            }
                        }
                        else
                            switch (b)
                            {
                                case 4:
                                    if (RecallT.ContainsKey(result.UnitNetworkId))
                                    {
                                        if (Environment.TickCount - RecallT[result.UnitNetworkId] < duration - 1200)
                                        {
                                            result.Status = RecallStatus.RecallAborted;
                                        }
                                        else if (Environment.TickCount - RecallT[result.UnitNetworkId] < duration + 1000)
                                        {
                                            result.Status = RecallStatus.RecallFinished;
                                        }
                                        RecallT[result.UnitNetworkId] = 0;
                                    }
                                    break;
                                case 6:
                                    result.Status = RecallStatus.RecallStarted;
                                    RecallT[result.UnitNetworkId] = Environment.TickCount;
                                    break;
                            }
                    }
                    else if (gObject is Obj_AI_Turret)
                    {
                        result.Type = ObjectType.Turret;
                        result.Status = b2 != 0 ? RecallStatus.TeleportStart : RecallStatus.TeleportEnd;
                    }
                    else if (gObject is Obj_AI_Minion)
                    {
                        result.Type = ObjectType.Object;

                        if (gObject.Name.Contains("Minion"))
                        {
                            result.Type = ObjectType.Minion;
                        }
                        if (gObject.Name.Contains("Ward"))
                        {
                            result.Type = ObjectType.Ward;
                        }

                        result.Status = b2 != 0 ? RecallStatus.TeleportStart : RecallStatus.TeleportEnd;
                    }
                    else
                    {
                        result.Type = ObjectType.Object;
                    }


                    return result;
                }