All pastes #639803 Raw Edit

TvT Revert

public java v1 · immutable
#639803 ·published 2007-07-30 21:28 UTC
rendered paste body
Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/L2Character.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/L2Character.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/L2Character.java	(working copy)@@ -534,8 +534,6 @@ 		if (Config.DEBUG)             _log.fine(this.getName()+" doAttack: target="+target); -		TvTEvent.onActivity(this);- 		if (isAlikeDead() || target == null || (this instanceof L2NpcInstance && target.isAlikeDead())                 || (this instanceof L2PcInstance && target.isDead() && !target.isFakeDeath())                 || !getKnownList().knowsObject(target)@@ -1110,8 +1108,6 @@ 			return; 		} -		TvTEvent.onActivity(this);- 		if (isSkillDisabled(skill.getId())) 		{ 			if (this instanceof L2PcInstance)Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/actor/instance/L2TvTEventNpcInstance.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/actor/instance/L2TvTEventNpcInstance.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/actor/instance/L2TvTEventNpcInstance.java	(working copy)@@ -1,20 +1,3 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */ package net.sf.l2j.gameserver.model.actor.instance;  import net.sf.l2j.Config;Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEvent.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEvent.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEvent.java	(working copy)@@ -1,23 +1,7 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */ package net.sf.l2j.gameserver.model.entity;  import net.sf.l2j.Config;+import net.sf.l2j.util.Rnd; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.datatables.NpcTable;@@ -35,13 +19,7 @@ import net.sf.l2j.gameserver.serverpackets.StatusUpdate; import net.sf.l2j.gameserver.serverpackets.SystemMessage; import net.sf.l2j.gameserver.templates.L2NpcTemplate;-import net.sf.l2j.util.Rnd; -/**- * TvTEvent class- *- * @author FBIagent- */ public class TvTEvent { 	enum EventState@@ -128,36 +106,6 @@         _npcSpawn.stopRespawn();         _npcSpawn = null; 		_lastNpcSpawn = null;-		-		for (byte i=0;i<2;i++)-		{-			for (String playerName : _teams[i].getParticipatedPlayerNames())-			{-				L2PcInstance playerInstance = _teams[i].getPlayerInstance(playerName);-				-				if (playerInstance == null || playerInstance.isOnline() == 0)-					_teams[i].removePlayer(playerName);-			}-		}--		int teamOnePlayerCount = _teams[0].getParticipatedPlayerCount();-		int teamTwoPlayerCount = _teams[1].getParticipatedPlayerCount();-		int playerCountDifference = Math.abs(teamOnePlayerCount - teamTwoPlayerCount);-		byte rest = (byte)(getParticipatedPlayersCount() % 2);--		if ((rest == 0 && playerCountDifference > 0) || (rest != 0 && playerCountDifference > 1))-		{-			byte teamIdWithMorePlayers = (byte)(teamOnePlayerCount > teamTwoPlayerCount ? 0 : 1);-			byte teamIdWithLesserPlayers = (byte)(teamIdWithMorePlayers == 0 ? 1 : 0);--			for (int i=0;i<playerCountDifference;i++)-			{-				L2PcInstance playerInstance = _teams[teamIdWithMorePlayers].getRandomPlayerInstance();-					-				_teams[teamIdWithMorePlayers].removePlayer(playerInstance.getName());-				_teams[teamIdWithLesserPlayers].addPlayer(playerInstance);-			}-		}  		// not enought participants 		if (_teams[0].getParticipatedPlayerCount() < Config.TVT_EVENT_MIN_PLAYERS_IN_TEAMS || _teams[1].getParticipatedPlayerCount() < Config.TVT_EVENT_MIN_PLAYERS_IN_TEAMS)@@ -175,7 +123,7 @@ 		{ 			for (String playerName : team.getParticipatedPlayerNames()) 			{-				L2PcInstance playerInstance = team.getPlayerInstance(playerName);+				L2PcInstance playerInstance = team.getParticipatedPlayers().get(playerName);  				if (playerInstance == null) 					continue;@@ -181,11 +129,10 @@ 					continue;  				// implements Runnable and starts itself in constructor-				new TvTEventTeleporter(playerInstance, team.getCoordinates(), false, false);+				new TvTEventTeleporter(playerInstance, team.getCoordinates(), false); 			} 		}-		-		new TvTEventInactiveCheck();+ 		return true; 	} @@ -204,8 +151,10 @@ 				setState(EventState.REWARDING); 				return "Nobody"; 			}+ 			Announcements.getInstance().announceToAll("TvT Event: Both teams are at a tie, next killing team win!"); 		}+ 		while (_teams[0].getPoints() == _teams[1].getPoints()) 		{ 			try@@ -223,7 +172,7 @@  		for (String playerName : team.getParticipatedPlayerNames()) 		{-			L2PcInstance playerInstance = team.getPlayerInstance(playerName);+			L2PcInstance playerInstance = team.getParticipatedPlayers().get(playerName);  			if (playerInstance == null) 				continue;@@ -278,7 +227,7 @@ 		{ 			for (String playerName : team.getParticipatedPlayerNames()) 			{-				L2PcInstance playerInstance = team.getPlayerInstance(playerName);+				L2PcInstance playerInstance = team.getParticipatedPlayers().get(playerName);  				if (playerInstance == null) 					continue;@@ -283,7 +232,7 @@ 				if (playerInstance == null) 					continue; -				new TvTEventTeleporter(playerInstance, Config.TVT_EVENT_PARTICIPATION_NPC_COORDINATES, false, false);+				new TvTEventTeleporter(playerInstance, Config.TVT_EVENT_PARTICIPATION_NPC_COORDINATES, false); 			} 		} @@ -326,28 +275,6 @@ 	}  	/**-	 * Called when player cast or attack-	 * Updates the activity of a TvTEvent participant-	 */-	public static void onActivity(L2Character character)-	{-		if (!isStarted())-			return;--		if (!(character instanceof L2PcInstance))-			return;-		-		String playerName = character.getName();--		byte teamId = getParticipantTeamId(playerName);-		-		if (teamId == -1)-			return;-		-		_teams[teamId].updatePlayerLastActivity(playerName);-	}-	-	/** 	 * Called when a player logs in 	 */ 	public static void onLogin(L2PcInstance playerInstance)@@ -361,7 +288,7 @@ 			return;  		_teams[teamId].addPlayer(playerInstance);-		new TvTEventTeleporter(playerInstance, _teams[teamId].getCoordinates(), true, false);+		new TvTEventTeleporter(playerInstance, _teams[teamId].getCoordinates(), true); 	}  	/**@@ -465,7 +392,7 @@ 			_teams[killerTeamId].increasePoints();  		if (killedTeamId != -1)-			new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getCoordinates(), false, false);+			new TvTEventTeleporter(killedPlayerInstance, _teams[killedTeamId].getCoordinates(), false); 	}  	private static void setState(EventState state)@@ -572,9 +499,4 @@ 	{ 		return new int[]{_teams[0].getParticipatedPlayerCount(), _teams[1].getParticipatedPlayerCount()}; 	}-	-	public static TvTEventTeam[] getTeams()-	{-		return _teams;-	} }Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventInactiveCheck.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventInactiveCheck.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventInactiveCheck.java	(working copy)@@ -1,71 +0,0 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */-package net.sf.l2j.gameserver.model.entity;--import net.sf.l2j.Config;-import net.sf.l2j.gameserver.ThreadPoolManager;-import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;-import net.sf.l2j.gameserver.model.entity.TvTEvent;-import net.sf.l2j.gameserver.model.entity.TvTEventTeam;--/**- * Check if players in TvT event are inactive, i don't thing the methods need comments- *- * @author FBIagent- */-public class TvTEventInactiveCheck implements Runnable-{-	public TvTEventInactiveCheck()-	{-		ThreadPoolManager.getInstance().scheduleGeneral(this, 30000);-	}--	public void run()-	{-		while (TvTEvent.isStarted())-		{			-			TvTEventTeam[] teams = TvTEvent.getTeams();-			-			for (byte i=0;i<2;i++)-			{-				for (String playerName : teams[i].getParticipatedPlayerNames())-				{-					long lastActivity = teams[i].getPlayerLastActivity(playerName);-					-					if (lastActivity + 30000 < System.currentTimeMillis())-					{-						L2PcInstance playerInstance = teams[i].getPlayerInstance(playerName);--						if (playerInstance == null)-							continue;-						-						teams[i].removePlayer(playerName);-						new TvTEventTeleporter(playerInstance, Config.TVT_EVENT_PARTICIPATION_NPC_COORDINATES, true, true);-					}-				}-			}-			-			try-			{-				Thread.sleep(1000);-			}-			catch (InterruptedException ie)-			{}-		}-	}-}Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeam.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeam.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeam.java	(working copy)@@ -1,20 +1,3 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */ package net.sf.l2j.gameserver.model.entity;  import java.util.Map;@@ -22,7 +5,6 @@  import javolution.util.FastMap; -import net.sf.l2j.util.Rnd; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;  public class TvTEventTeam@@ -30,8 +12,7 @@ 	private String _name; 	private int[] _coordinates = new int[3]; 	private short _points;-	private Map<String, L2PcInstance> _participatedPlayersInstances = new FastMap<String, L2PcInstance>();-	private Map<String, Long> _participatedPlayersLastActivities = new FastMap<String, Long>();+	private Map<String, L2PcInstance> _participatedPlayers = new FastMap<String, L2PcInstance>(); 	private Vector<String> _participatedPlayerNames = new Vector<String>();  	public TvTEventTeam(String name, int[] coordinates)@@ -46,12 +27,11 @@ 		if (playerInstance == null) 			return false; -		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{ 			String playerName = playerInstance.getName(); -			_participatedPlayersInstances.put(playerName, playerInstance);-			_participatedPlayersLastActivities.put(playerName, (long)0);+			_participatedPlayers.put(playerName, playerInstance); 			 			if (!_participatedPlayerNames.contains(playerName)) 				_participatedPlayerNames.add(playerName);@@ -62,10 +42,9 @@  	public void removePlayer(String playerName) 	{-		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{-			_participatedPlayersInstances.remove(playerName);-			_participatedPlayersLastActivities.remove(playerName);+			_participatedPlayers.remove(playerName); 			_participatedPlayerNames.remove(playerName); 		} 	}@@ -77,11 +56,9 @@ 	 	public void cleanMe() 	{-		_participatedPlayersInstances.clear();-		_participatedPlayersLastActivities.clear();+		_participatedPlayers.clear(); 		_participatedPlayerNames.clear();-		_participatedPlayersInstances = new FastMap<String, L2PcInstance>();-		_participatedPlayersLastActivities = new FastMap<String, Long>();+		_participatedPlayers = new FastMap<String, L2PcInstance>(); 		_participatedPlayerNames = new Vector<String>(); 		_points = 0; 	}@@ -90,7 +67,7 @@ 	{ 		boolean containsPlayer; -		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{ 			containsPlayer = _participatedPlayerNames.contains(playerName); 		}@@ -97,14 +74,6 @@  		return containsPlayer; 	}-	-	public void updatePlayerLastActivity(String playerName)-	{-		synchronized (_participatedPlayersLastActivities)-		{-			_participatedPlayersLastActivities.put(playerName, System.currentTimeMillis());-		}-	}  	public String getName() 	{@@ -121,13 +90,13 @@ 		return _points; 	} -	public Map<String, L2PcInstance> getParticipatedPlayerInstances()+	public Map<String, L2PcInstance> getParticipatedPlayers() 	{ 		Map<String, L2PcInstance> participatedPlayers = null; -		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{-			participatedPlayers = _participatedPlayersInstances;+			participatedPlayers = _participatedPlayers; 		}  		return participatedPlayers;@@ -133,18 +102,6 @@ 		return participatedPlayers; 	} -	public Map<String, Long> getParticipatedPlayersLastActivities()-	{-		Map<String, Long> participatedPlayersLastActivities = null;--		synchronized (_participatedPlayersInstances)-		{-			participatedPlayersLastActivities = _participatedPlayersLastActivities;-		}--		return participatedPlayersLastActivities;-	}-	 	public Vector<String> getParticipatedPlayerNames() 	{ 		Vector<String> participatedPlayerNames = null;@@ -149,7 +106,7 @@ 	{ 		Vector<String> participatedPlayerNames = null; -		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{ 			participatedPlayerNames = _participatedPlayerNames; 		}@@ -161,9 +118,9 @@ 	{ 		int participatedPlayerCount; -		synchronized (_participatedPlayersInstances)+		synchronized (_participatedPlayers) 		{-			participatedPlayerCount = _participatedPlayersInstances.size();+			participatedPlayerCount = _participatedPlayers.size(); 		}  		return participatedPlayerCount;@@ -168,40 +125,4 @@  		return participatedPlayerCount; 	}--	public L2PcInstance getPlayerInstance(String playerName)-	{-		L2PcInstance playerInstance = null;-		-		synchronized (_participatedPlayersInstances)-		{-			playerInstance = _participatedPlayersInstances.get(playerName);-		}-		-		return playerInstance;-	}--	public long getPlayerLastActivity(String playerName)-	{-		long lastActivity = 0;-		-		synchronized (_participatedPlayersInstances)-		{-			lastActivity = _participatedPlayersLastActivities.get(playerName);-		}-		-		return lastActivity;-	}--	public L2PcInstance getRandomPlayerInstance()-	{-		String playerName = null;--		synchronized (_participatedPlayersInstances)-		{-			 playerName = _participatedPlayerNames.get(Rnd.get(_participatedPlayerNames.size()));-		}--		return getPlayerInstance(playerName);-	} }Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeleporter.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeleporter.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTEventTeleporter.java	(working copy)@@ -1,20 +1,3 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */ package net.sf.l2j.gameserver.model.entity;  import net.sf.l2j.Config;@@ -19,24 +2,20 @@  import net.sf.l2j.Config; import net.sf.l2j.gameserver.ThreadPoolManager;-import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2Effect; import net.sf.l2j.gameserver.model.L2Summon;-//import net.sf.l2j.gameserver.model.entity.TvTEvent;+import net.sf.l2j.gameserver.model.entity.TvTEvent; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;-import net.sf.l2j.gameserver.serverpackets.Ride;  public class TvTEventTeleporter implements Runnable {-	private L2PcInstance _playerInstance = null;+	private L2PcInstance _playerInstance; 	private int[] _coordinates = new int[3];-	boolean _removeCauseInactivity = false; -	public TvTEventTeleporter(L2PcInstance playerInstance, int[] coordinates, boolean noDelay, boolean removeCauseInactivity)+	public TvTEventTeleporter(L2PcInstance playerInstance, int[] coordinates, boolean reAdd) 	{ 		_playerInstance = playerInstance; 		_coordinates = coordinates;-		_removeCauseInactivity = removeCauseInactivity;  		// in config as seconds 		long delay = (TvTEvent.isStarted() ? Config.TVT_EVENT_RESPAWN_TELEPORT_DELAY : Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY) * 1000;@@ -41,7 +20,7 @@ 		// in config as seconds 		long delay = (TvTEvent.isStarted() ? Config.TVT_EVENT_RESPAWN_TELEPORT_DELAY : Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY) * 1000; -		if (noDelay)+		if (reAdd) 			delay = 0;  		ThreadPoolManager.getInstance().scheduleGeneral(this, delay);@@ -51,17 +30,6 @@ 	{ 		if (_playerInstance == null) 			return;--		if (_playerInstance.isMounted())-		{-			if (_playerInstance.isFlying())-				_playerInstance.removeSkill(SkillTable.getInstance().getInfo(4289, 1));--			Ride dismount = new Ride(_playerInstance.getObjectId(), Ride.ACTION_DISMOUNT, 0);-			_playerInstance.broadcastPacket(dismount);-			_playerInstance.setMountType(0);-			_playerInstance.setMountObjectID(0);-		} 		 		L2Summon summon = _playerInstance.getPet(); 	   @@ -73,11 +41,6 @@ 			if (effect != null) 				effect.exit(); 		}-		-		if (TvTEvent.isStarted() && !_removeCauseInactivity)-			_playerInstance.setTeam(TvTEvent.getParticipantTeamId(_playerInstance.getName())+1);-		else-			_playerInstance.setTeam(0);  		_playerInstance.doRevive(); 		_playerInstance.setCurrentCp(_playerInstance.getMaxCp());@@ -84,11 +47,13 @@ 		_playerInstance.setCurrentHp(_playerInstance.getMaxHp()); 		_playerInstance.setCurrentMp(_playerInstance.getMaxMp()); 		_playerInstance.teleToLocation(_coordinates[0], _coordinates[1], _coordinates[2], false);+		+		if (TvTEvent.isStarted())+			_playerInstance.setTeam(TvTEvent.getParticipantTeamId(_playerInstance.getName())+1);+		else+			_playerInstance.setTeam(0);+		 		_playerInstance.broadcastStatusUpdate(); 		_playerInstance.broadcastUserInfo();--		String playerName = _playerInstance.getName();--		TvTEvent.getTeams()[TvTEvent.getParticipantTeamId(playerName)].updatePlayerLastActivity(playerName); 	} }Index: C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTManager.java===================================================================--- C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTManager.java	(revision 1059)+++ C:/Documents and Settings/Administrator/My Documents/eclipse/workspace/L2_GameServer_It_tvt_rewert/java/net/sf/l2j/gameserver/model/entity/TvTManager.java	(working copy)@@ -1,20 +1,3 @@-/* This program is free software; you can redistribute it and/or modify- * it under the terms of the GNU General Public License as published by- * the Free Software Foundation; either version 2, or (at your option)- * any later version.- *- * This program is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the- * GNU General Public License for more details.- *- * You should have received a copy of the GNU General Public License- * along with this program; if not, write to the Free Software- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA- * 02111-1307, USA.- *- * http://www.gnu.org/copyleft/gpl.html- */ package net.sf.l2j.gameserver.model.entity;  import net.sf.l2j.Config;@@ -51,7 +34,7 @@  		for (;;) 		{-			waiter(Config.TVT_EVENT_INTERVAL * 60000L); // in config given as minutes 60*1000 = 60000+			waiter(Config.TVT_EVENT_INTERVAL * 60 * 1000); // in config given as minutes 			 			if (!TvTEvent.startParticipation()) 			{@@ -62,7 +45,7 @@ 			else 				Announcements.getInstance().announceToAll("TvT Event: Registration opened for " + Config.TVT_EVENT_PARTICIPATION_TIME +  " minute(s)."); -			waiter(Config.TVT_EVENT_PARTICIPATION_TIME * 60000L); // in config given as minutes+			waiter(Config.TVT_EVENT_PARTICIPATION_TIME * 60 * 1000); // in config given as minutes  			if (!TvTEvent.startFight()) 			{@@ -73,7 +56,7 @@ 			else 				Announcements.getInstance().announceToAll("TvT Event: Teleport participants to team spot in " + Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY + " second(s)."); -			waiter(Config.TVT_EVENT_RUNNING_TIME * 60000L); // in config given as minutes+			waiter(Config.TVT_EVENT_RUNNING_TIME * 60 * 1000); // in config given as minutes 			Announcements.getInstance().announceToAll("TvT Event: Event finish. Team \"" + TvTEvent.calculateRewards() + "\" wins."); 			Announcements.getInstance().announceToAll("TvT Event: Teleport back to registration npc in " + Config.TVT_EVENT_START_LEAVE_TELEPORT_DELAY + " second(s)."); 			TvTEvent.stopFight();