public override void Read() { ClientBuild = _worldPacket.ReadUInt32(); DataBuild = _worldPacket.ReadUInt32(); uint hotfixCount = _worldPacket.ReadUInt32(); for (var i = 0; i < hotfixCount; ++i) { Hotfixes.Add(_worldPacket.ReadInt32()); } }
public override void Read() { uint hotfixCount = _worldPacket.ReadUInt32(); //if (hotfixCount > Global.DB2Mgr.GetHotfixData().Count) //throw PacketArrayMaxCapacityException(hotfixCount, sDB2Manager.GetHotfixData().size()); for (var i = 0; i < hotfixCount; ++i) { Hotfixes.Add(_worldPacket.ReadUInt64()); } }
public override void Read() { ClientBuild = _worldPacket.ReadUInt32(); DataBuild = _worldPacket.ReadUInt32(); uint hotfixCount = _worldPacket.ReadUInt32(); for (var i = 0; i < hotfixCount; ++i) { HotfixRecord hotfixRecord = new HotfixRecord(); hotfixRecord.Read(_worldPacket); Hotfixes.Add(hotfixRecord); } }
static void Main(string[] args) { Bootstrap.Init(); Hacks.UseGameObjectCache = true; Events.OnLoad += (sender, loadArgs) => { if (Game.MapId != GameMapId.SummonersRift) { // halt return; } SessionBasedData.LoadTick = ObjectManager.Get <Obj_AI_Minion>().Any(m => m.CharData.BaseSkinName.Contains("Minion")) ? Environment.TickCount - 190000 : Environment.TickCount; UniversalLeveler.Program.Init(); Hotfixes.Load(); Logging.Log("LOADED " + SessionBasedData.LoadTick); Game.OnUpdate += (updateArgs) => { if (Environment.TickCount - SessionBasedData.LoadTick > 15000) { Tree.Seed(); Tree.Water(); } else { Logging.Log("WAITING FOR GAME START"); } }; Game.OnEnd += endArgs => { Task.Run( async() => { await Task.Delay(5000); Game.Quit(); }); }; }; }
public static void Main() { if (Game.MapId != GameMapId.SummonersRift || Game.MapId == GameMapId.HowlingAbyss) { return; } Chat.Print("SharpAI has loaded!"); Bootstrap.Init(); r = new System.Random(); SessionBasedData.LoadTick = ObjectManager.Get <Obj_AI_Minion>().Any(m => m.CharData.BaseSkinName.Contains("Minion")) ? Environment.TickCount - 190000 : Environment.TickCount; Hotfixes.Load(); Logging.Log("LOADED " + SessionBasedData.LoadTick); Game.OnUpdate += (updateArgs) => { if (Environment.TickCount - SessionBasedData.LoadTick > 15000) { Tree.Seed(); Tree.Water(); } else { Logging.Log("WAITING FOR GAME START"); } }; var gameEndNotified = false; Game.OnTick += delegate { if (gameEndNotified) { return; } var nexus = ObjectManager.Get <Obj_HQ>(); if (nexus == null) { return; } if (nexus.Any(n => n.IsDead || n.Health.Equals(0))) { var win = ObjectManager.Get <Obj_HQ>().Any(n => n.Health.Equals(0)); OnGameEnd?.Invoke(win); gameEndNotified = true; } }; OnGameEnd += endArgs => { Task.Run( async() => { await Task.Delay(10000); Game.QuitGame(); }); }; }