Beispiel #1
0
        private static void ShowFakeClick(Vector3 position)
        {
            var tile = NavMesh.WorldToGrid(position.X, position.Y);
            var z = NavMesh.GetHeightForPosition(position.X, position.Y);

            var p = new GamePacket(0x87);
            p.WriteHexString(
                "00 00 00 00 02 69 DC 57 4D C9 4F 15 0A 20 00 00 00 00 00 00 00 00 00 01 00 00 00 00 B2 01 00 40");
            p.WriteInteger(ObjectManager.Player.NetworkId);
            p.WriteByte(0, 8);
            p.WriteShort((short) tile.X);
            p.WriteFloat(z);
            p.WriteShort((short) tile.Y);
            p.WriteHexString("6F F2 00 00 00 00 18 F3");
            p.WriteShort((short) tile.X);
            p.WriteFloat(z);
            p.WriteShort((short) tile.Y);
            p.WriteHexString(
                "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 69 DC 57 4D 79 0D DA 08 20 00 00 00 00 00 00 00 00 00 01 00 00 00 00 B1 01 00 40");
            p.WriteInteger(ObjectManager.Player.NetworkId);
            p.WriteByte(0, 8);
            p.WriteShort((short) tile.X);
            p.WriteFloat(z);
            p.WriteShort((short) tile.Y);
            p.WriteHexString("6F F2 00 00 00 00 18 F3");
            p.WriteShort((short) tile.X);
            p.WriteFloat(z);
            p.WriteShort((short) tile.Y);
            p.WriteHexString("00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00");
            p.Process();
        }
Beispiel #2
0
 public static void OnProcessPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] == 0xBA)
     {
         ObjectNetworkId = new GamePacket(args.PacketData) { Position = 2 }.ReadInteger();
     }
 }
Beispiel #3
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;
             }
         }
     }
 }
Beispiel #4
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;
            }
        }
Beispiel #5
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());
     }
 }
Beispiel #6
0
        private static void PacketHandler(GamePacketEventArgs args)
        {
            var Packetc = new GamePacket(args.PacketData);
            if (Packetc.Header == Packet.C2S.Cast.Header)
            {
                var decodedpacket = Packet.C2S.Cast.Decoded(args.PacketData);
                if (LatestCast.Tick + 500 < Environment.TickCount)
                {
                    LatestCast.Timepass = Environment.TickCount - LatestCast.Tick;
                    LatestCast.Distance = Math.Sqrt(Math.Pow(decodedpacket.ToX - LatestCast.X, 2) + Math.Pow(decodedpacket.ToY - LatestCast.Y, 2));
                    LatestCast.Delay = (LatestCast.Distance * 0.1 * Config.Item("delaytime").GetValue<Slider>().Value);
                    if (Environment.TickCount > LatestCast.Tick + LatestCast.Delay)
                    {
                        args.Process = false;
                    }
                    if (args.Process == true)
                    {
                        LatestCast.Tick = Environment.TickCount;
                        LatestCast.X = decodedpacket.ToX;
                        LatestCast.Y = decodedpacket.ToY;
                    }
                }
            }

        }
Beispiel #7
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);
                         }
                     }
                 }
             }
         }
     }
 }
Beispiel #8
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();
        }
 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;
     }
 }
Beispiel #10
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);
            }
        }
Beispiel #11
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;
         }
     }
 }
Beispiel #12
0
 private static void LogGamePacket(GamePacket result, String file = null, String prefix = null)
 {
     byte[] b = new byte[result.Size()];
     long size = result.Size();
     int cur = 0;
     while (cur < size - 1)
     {
         b[cur] = result.ReadByte(cur);
         cur++;
     }
     LogPacket(b, file, prefix);
 }
Beispiel #13
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;
            }
        }
Beispiel #14
0
 private void OnGameProcessPacket(GamePacketEventArgs args)
 {
     if (targetObj != null && PacketCast && (LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Combo || LXOrbwalker.CurrentMode == LXOrbwalker.Mode.Harass))
     {
         if (args.PacketData[0] != 100) return;
         var PacketData = new GamePacket(args.PacketData);
         PacketData.Position = 1;
         if (PacketData.ReadInteger() != targetObj.NetworkId) return;
         var PacketType = PacketData.ReadByte();
         PacketData.Position += 4;
         if (PacketData.ReadInteger() != Player.NetworkId) return;
         if (PacketType == 12) SkillQ.Cast(targetObj.Position, PacketCast);
         return;
     }
 }
Beispiel #15
0
        private static void ChangeSize()
        {
            var p = new GamePacket(0xC4);
            p.WriteInteger(0);
            p.WriteInteger(LastSequence);
            p.WriteByte(0x1);
            p.WriteByte(0x8);
            p.WriteInteger(ObjectManager.Player.NetworkId);
            p.WriteInteger(0x800);
            p.WriteByte(0x8);
            p.WriteFloat(Size);
            p.Process();

            LastProcess = Environment.TickCount;
        }
Beispiel #16
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);
                }

            }
        }
Beispiel #17
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);
        }
Beispiel #18
0
 private static void ChangeSize(Int32 netId, Single size)
 {
     Obj_AI_Hero hero = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(netId);
     if (hero != null)
     {
         GamePacket p = new GamePacket(0xC4);
         p.WriteInteger(0);
         p.WriteInteger(SequenceId++);
         p.WriteByte(0x1);
         p.WriteByte(0x8);
         p.WriteInteger(netId);
         p.WriteInteger(0x800);
         p.WriteByte(0x8);
         p.WriteFloat(size);
         p.Process();
         SequenceId++;
     }
 }
Beispiel #19
0
 public static void LogPacket(GamePacketEventArgs args)
 {
     if (args.PacketData[0] != 114 && args.PacketData[0] != 119 && args.PacketData[0] != 168 ) //97 = move
     {
          GamePacket gp = new GamePacket(args.PacketData);
       //      gp.Position = 5;
       //      int dType = (int)gp.ReadByte();
       //      int target = gp.ReadInteger();
       //      int source = gp.ReadInteger();
       //      Console.WriteLine("DamageT: " + dType);
       //      Console.WriteLine("targetId: " + target);
        //     Console.WriteLine("SourceId: " + source + " - " + Riven.Player.NetworkId);
         Console.WriteLine("Head: " + args.PacketData[0]);
         Console.WriteLine("Channel: {0}{3}Flag: {1}{3}Data: {2}{3}{3}", args.Channel, args.ProtocolFlag,
             args.PacketData.Aggregate(string.Empty,
                 (current, d) => current + (d.ToString(CultureInfo.InvariantCulture) + " ")), Environment.NewLine);
     }
 }
 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);
     }
 }
Beispiel #21
0
        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);
            }
        }
Beispiel #22
0
                public static GamePacket Encoded(Struct packetStruct)
                {
                    var result = new GamePacket(Header);

                    result.WriteInteger(packetStruct.NetworkId);
                    result.WriteInteger(packetStruct.NetworkId & ~0x40000000);
                    result.WriteByte((byte)(packetStruct.BOk ? 1 : 0));
                    result.WriteInteger(packetStruct.SkinId);
                    for (var i = 0; i < 32; i++)
                    {
                        if (i < packetStruct.ModelName.Length)
                        {
                            result.WriteByte((byte)packetStruct.ModelName[i]);
                        }
                        else
                        {
                            result.WriteByte(0x00);
                        }
                    }

                    return(result);
                }
Beispiel #23
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());
            }
        }
Beispiel #24
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;
 }
Beispiel #25
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);
                }
Beispiel #26
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;
                }
            }*/
        }
Beispiel #27
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;
                }
Beispiel #28
0
                public static GamePacket Encoded(Struct packetStruct)
                {
                    var result = new GamePacket(Header);
                    result.WriteInteger(packetStruct.NetworkId);
                    result.WriteInteger(packetStruct.NetworkId & ~0x40000000);
                    result.WriteByte((byte)(packetStruct.BOk ? 1 : 0));
                    result.WriteInteger(packetStruct.SkinId);
                    for (var i = 0; i < 32; i++)
                    {
                        if (i < packetStruct.ModelName.Length)
                        {
                            result.WriteByte((byte)packetStruct.ModelName[i]);
                        }
                        else
                        {
                            result.WriteByte(0x00);
                        }
                    }

                    return result;
                }
Beispiel #29
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;
                }
Beispiel #30
0
 public static GamePacket Encoded(Struct packetStruct)
 {
     var result = new GamePacket(Header);
     result.WriteInteger(packetStruct.TurretNetworkId);
     result.WriteInteger(packetStruct.TargetNetworkId);
     return result;
 }
Beispiel #31
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     packet.Position = 5;
     result.Winner = packet.ReadByte();
     return result;
 }
Beispiel #32
0
 public static GamePacket Encoded(Struct packetStruct)
 {
     var result = new GamePacket(Header);
     result.WriteInteger(0);
     result.WriteByte(packetStruct.Winner);
     return result;
 }
Beispiel #33
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;
                }
Beispiel #34
0
 public static bool Check(GamePacket p)
 {
     return(!Enabled || CanCast(p));
 }