Пример #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
        /// <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);
            }
        }
Пример #4
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);
 }
Пример #5
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;
            }
        }
Пример #6
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);
                }

            }
        }
Пример #7
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);
        }
Пример #8
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());
            }
        }
Пример #9
0
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     packet.Position = 1;
     return new Struct(packet.ReadInteger(), (SpellSlot)packet.ReadByte());
 }
Пример #10
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;
                }
Пример #11
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;
                }
Пример #12
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);
                }
Пример #13
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;
                }
Пример #14
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    result.NetworkId = packet.ReadInteger(1);
                    result.Item = new Items.Item(packet.ReadShort(), 0);
                    packet.Position += 2;
                    result.InventorySlot = packet.ReadByte();
                    result.SpellSlot = (SpellSlot) (result.InventorySlot + (byte) SpellSlot.Item1);
                    result.Stack = packet.ReadByte();
                    result.Charge = packet.ReadByte();
                    result.ReplaceItem = packet.ReadByte();

                    return result;
                }
Пример #15
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;
 }
Пример #16
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data) { Position = 2 };
                    var result = new Struct();

                    result.NetworkId = packet.ReadInteger();
                    packet.Position += 4;
                    result.Slot = (SpellSlot) packet.ReadByte();
                    result.Evolution = packet.ReadByte() == 0x01 ? true : false;

                    return new Struct(packet.ReadInteger(), (SpellSlot) packet.ReadByte());
                }
Пример #17
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;
 }
Пример #18
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct
                    {
                        NetworkId = packet.ReadInteger(6),
                        YesVotes = packet.ReadByte(10),
                        NoVotes = packet.ReadByte(11),
                        MaxVotes = packet.ReadByte(12),
                        Team = (GameObjectTeam) packet.ReadByte(13)
                    };

                    //byte unknown = packet.ReadByte(5); //Not sure what this is

                    return result;
                }
Пример #19
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct
                    {
                        TooEarly = Convert.ToBoolean(packet.ReadByte(5)),
                        YesVotes = packet.ReadByte(9),
                        NoVotes = packet.ReadByte(10),
                        Team = (GameObjectTeam) packet.ReadByte(11)
                    };

                    return result;
                }
Пример #20
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    result.NetworkId = packet.ReadInteger(2);
                    result.Unit = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(result.NetworkId);
                    result.Slot = (SpellSlot) packet.ReadByte();
                    result.PointsLeft = packet.ReadByte();
                    result.Level = packet.ReadByte();
                    return result;
                }
Пример #21
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    result.NetworkId = packet.ReadInteger(1);
                    result.Unit = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(result.NetworkId);
                    result.Slot = (SpellSlot) (packet.ReadByte());
                    result.UnknownByte = packet.ReadByte(); // 0, 1C, 48
                    result.UnknownByte2 = packet.ReadByte(); //usually 2
                    result.SpellString = packet.ReadString(11);
                    return result;
                }
Пример #22
0
 /// <summary>
 /// Decodes the specified data.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <returns>Struct.</returns>
 public static Struct Decoded(byte[] data)
 {
     var packet = new GamePacket(data);
     var result = new Struct();
     
     result.NetworkId = packet.ReadInteger(2);
     result.FromInventorySlot = packet.ReadByte();
     result.FromSpellSlot = (SpellSlot) (result.FromInventorySlot + (byte) SpellSlot.Item1);
     result.ToInventorySlot = packet.ReadByte();
     result.ToSpellSlot = (SpellSlot) (result.ToInventorySlot + (byte) SpellSlot.Item1);
     return result;
 }
Пример #23
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;
 }
Пример #24
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());
 }
Пример #25
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;
 }
Пример #26
0
                /// <summary>
                /// Decodes the specified data.
                /// </summary>
                /// <param name="data">The data.</param>
                /// <returns>Struct.</returns>
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);
                    var result = new Struct();

                    result.NetworkId = packet.ReadInteger(1);
                    result.Unit = ObjectManager.GetUnitByNetworkId<Obj_AI_Base>(result.NetworkId);
                    result.InventorySlot = packet.ReadByte();
                    result.SpellSlot = (SpellSlot) (result.InventorySlot + (byte) SpellSlot.Item1);
                    return result;
                }
Пример #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.FromSlotByte = packet.ReadByte();
     result.ToSlotByte = packet.ReadByte();
     return result;
 }
Пример #28
0
		public static void Game_OnProcessPacket(GamePacketEventArgs args)
		{
			try
			{
				if (Orbwalker.ActiveMode.ToString() == "Combo" && args.PacketData[0] == 101 && Q.IsReady())
				{
					GamePacket gamePacket = new GamePacket(args.PacketData);
					gamePacket.Position = 5L;
					int num = (int)gamePacket.ReadByte();
					int networkId = gamePacket.ReadInteger();
					int num2 = gamePacket.ReadInteger();
					if (ObjectManager.Player.NetworkId == num2)
					{
						Obj_AI_Hero unitByNetworkId = ObjectManager.GetUnitByNetworkId<Obj_AI_Hero>(networkId);
						if (num == 12 || num == 3)
						{
							Q.Cast(unitByNetworkId.ServerPosition, false);
						}
					}
				}
			}
			catch (Exception ex)
			{
				Console.WriteLine(ex.ToString());
			}
		}
Пример #29
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;
 }
Пример #30
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;
             }
         }
     }
 }
Пример #31
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;
                }
Пример #32
0
                public static Struct Decoded(byte[] data)
                {
                    var packet = new GamePacket(data);

                    packet.Position = 5;
                    return(new Struct(
                               packet.ReadFloat(), packet.ReadFloat(), packet.ReadInteger(), (PingType)packet.ReadByte()));
                }