/// <summary> /// GameOnOnGameLoad - Load Every Plugin/Addon /// </summary> /// <param name="args"></param> private static void GameOnOnGameLoad(EventArgs args) { #region Subscriptions Game.PrintChat( "<font color='#0993F9'>[SurvivorSeries AIO]</font> <font color='#FF8800'>Successfully Loaded.</font>"); Game.PrintChat("<font color='#b756c5'>[SurvivorSeries] NEWS: </font>" + SSNews); #endregion RootMenu = new RootMenu("SurvivorSeries AIO"); #region Utility Loads new VersionCheck.VersionCheck().UpdateCheck(); SpellCast.RootConfig = RootMenu; ChampionFactory.Load(ObjectManager.Player.ChampionName, RootMenu); ActivatorFactory.Create(ObjectManager.Player.ChampionName, RootMenu); AutoLevelerFactory.Create(ObjectManager.Player.ChampionName, RootMenu); #endregion }
private const double REFRESH_RATE = 16.666; // 60 fps public bool initialize(ENetAddress address, string baseKey) { if (enet_initialize() < 0) { return(false); } _server = enet_host_create(&address, new IntPtr(32), new IntPtr(32), 0, 0); if (_server == null) { return(false); } var key = System.Convert.FromBase64String(baseKey); if (key.Length <= 0) return(false); fixed(byte *s = key) { _blowfish = BlowFishCS.BlowFishCS.BlowFishCreate(s, new IntPtr(16)); } PacketHandlerManager.getInstace().InitHandlers(this); map = new SummonersRift(this); PacketNotifier.setMap(map); //TODO: better lua implementation var id = 1; foreach (var p in Config.players) { var player = new ClientInfo(p.Value.rank, ((p.Value.team.ToLower() == "blue") ? TeamId.TEAM_BLUE : TeamId.TEAM_PURPLE), p.Value.ribbon, p.Value.icon); player.setName(p.Value.name); player.setSkinNo(p.Value.skin); player.userId = id; // same as StartClient.bat id++; player.setSummoners(strToId(p.Value.summoner1), strToId(p.Value.summoner2)); Champion c = ChampionFactory.getChampionFromType(p.Value.champion, map, GetNewNetID(), (int)player.userId); var pos = c.getRespawnPosition(); c.setPosition(pos.Item1, pos.Item2); c.setTeam((p.Value.team.ToLower() == "blue") ? TeamId.TEAM_BLUE : TeamId.TEAM_PURPLE); c.levelUp(); player.setChampion(c); var pair = new Pair <uint, ClientInfo>(); pair.Item2 = player; players.Add(pair); } // Uncomment the following to get 2-players /*ClientInfo* player2 = new ClientInfo("GOLD", TEAM_PURPLE); * player2->setName("tseT"); * Champion* c2 = ChampionFactory::getChampionFromType("Ezreal", map, GetNewNetID()); * c2->setPosition(100.f, 273.55f); * c2->setTeam(1); * map->addObject(c2); * player2->setChampion(c2); * player2->setSkinNo(4); * player2->userId = 2; // same as StartClient.bat * player2->setSummoners(SPL_Ignite, SPL_Flash); * * players.push_back(player2);*/ return(_isAlive = true); }