public override void run() { L2Player player = getClient().CurrentPlayer; player.TotalRestore(); player.sendPacket(new SystemMessage(34)); AnnouncementManager.Instance.OnEnter(player); if (player.TelbookLimit > 0) { player.sendPacket(new ExGetBookMarkInfo(player.TelbookLimit, player.Telbook)); } //навешиваем статы уже одетых предметов foreach (L2Item item in player.Inventory.Items.Values) { if (item._isEquipped == 0) { continue; } item.notifyStats(player); } player.StartRegeneration(); // player.sendItemList(false); //player.Vitality = 20000; player.sendPacket(new FriendList()); player.sendQuestList(); player.updateSkillList(); player.updateReuse(); if (player.ClanId > 0) { ClanTable.getInstance().apply(player); } player.sendPacket(new ExStorageMaxCount(player)); // player.sendPacket(new ExBasicActionList()); // NpcTable.getInstance().spawnNpc("grandmaster_ramos", player.X, player.Y, player.Z, player.Heading); player.sendActionFailed(); GameTime.Instance.EnterWorld(player); L2World.Instance.RealiseEntry(player, null, true); player.timer(); L2World.Instance.GetRegion(player.X, player.Y).checkZones(player, true); player.sendPacket(new UserInfo(player)); player.sendPacket(new UserInfo(player)); //player.sendPacket(new ShortCutInit(player)); player.StartAI(); player.RequestPing(); }
public override void run() { L2Player player = Client.CurrentPlayer; L2Clan clan = ClanTable.getInstance().getClan(_clanId); if (clan != null) { player.sendPacket(new PledgeInfo(clan.ClanID, clan.Name, clan.AllianceName)); } }
public void SiegeEnd(bool trigger) { isActive = false; Message("Siege of " + name + " is over."); if (trigger) { Message("Nobody won! " + name + " belong to NPC until next siege."); } else { double dmg = 0; int tmClanId = 0; foreach (int clanId in clanDamage.Keys) { if (clanDamage[clanId] > dmg) { dmg = clanDamage[clanId]; tmClanId = clanId; } } if (tmClanId > 0) { L2Clan cl = ClanTable.getInstance().getClan(tmClanId); Message("Now its belong to: '" + cl.Name + "' until next siege."); bool captured = false; //todo if (captured) { cl.UpdatePledgeNameValue(ReputationCapture); //Your clan has added $1s points to its clan reputation score. cl.broadcastToMembers(new SystemMessage(1781).addNumber(ReputationCapture)); } else { cl.UpdatePledgeNameValue(ReputationNothing); //Your clan's newly acquired contested clan hall has added $s1 points to your clan's reputation score. cl.broadcastToMembers(new SystemMessage(1774).addNumber(ReputationNothing)); } } else { Message("Nobody won! " + name + " belong to NPC until next siege."); trigger = true; } } foreach (L2Character o in mobActive) { ((L2Character)o).DeleteByForce(); } }
public void Start() { Console.Title = "L2dotNET Gameserver"; CLogger.form(); Cfg.init("all"); CharTemplateTable.Instance.Initialize(); NetworkBlock.Instance.Initialize(); GameTime.Instance.Initialize(); IdFactory.Instance.Initialize(); L2World.Instance.Initialize(); MapRegionTable.Instance.Initialize(); ZoneTable.Instance.Initialize(); NpcTable.Instance.Initialize(); NpcData.getInstance(); // SpawnTable.getInstance(); // TSkillTable.getInstance(); ItemTable.getInstance(); ItemHandler.getInstance(); MultiSell.getInstance(); Capsule.getInstance(); RecipeTable.getInstance(); AIManager.getInstance(); BlowFishKeygen.GenerateKeys(); CLogger.info("Generated 20 Blowfish Keys"); AdminAccess.Instance.Initialize();; QuestManager.getInstance(); AnnouncementManager.Instance.Initialize(); AllianceTable.getInstance(); ClanTable.getInstance(); CLogger.info("NpcServer: "); StaticObjTable.Instance.Initialize(); MonsterRace.Instance.Initialize(); // SpawnTable.getInstance().Spawn(); StructureTable.Instance.Initialize(); HtmCache.Instance.Initialize(); AuthThread.Instance.Initialize(); // GeoData.getInstance(); CLogger.extra_info("Listening Gameservers on port " + Cfg.SERVER_PORT); _listener = new TcpListener(IPAddress.Any, Cfg.SERVER_PORT); _listener.Start(); TcpClient clientSocket = default(TcpClient); while (true) { clientSocket = _listener.AcceptTcpClient(); Accept(clientSocket); } }