Jump to content

Recommended Posts

Posted

Hi ppl , i use this pach for my server Hi5 

Index: dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java
===================================================================
--- dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java	(revision 8869)
+++ dist/game/data/scripts/handlers/bypasshandlers/OlympiadObservation.java	(working copy)
@@ -16,6 +16,7 @@
 
 import java.util.logging.Level;
 
+import com.l2jserver.Config;
 import com.l2jserver.gameserver.handler.IBypassHandler;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
@@ -121,7 +122,33 @@
 									StringUtil.append(list, "&$1718;"); // Standby
 								}
 								
-								StringUtil.append(list, "   ", task.getGame().getPlayerNames()[0], "  :  ", task.getGame().getPlayerNames()[1]);
+								if (Config.ALT_OLY_ANTI_FEED)
+								{
+									if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE)
+									{
+										StringUtil.append(list,
+											"   ",
+											task.getGame().getPlayerNames()[0],
+											"  :  ",
+											task.getGame().getPlayerNames()[1]);
+									}
+									else
+									{
+										StringUtil.append(list,
+											"   ",
+											Config.ALT_OLY_ANTI_FEED_NAME,
+											"  :  ",
+											Config.ALT_OLY_ANTI_FEED_NAME);
+									}
+								}
+								else
+								{
+									StringUtil.append(list,
+										"   ",
+										task.getGame().getPlayerNames()[0],
+										"  :  ",
+										task.getGame().getPlayerNames()[1]);
+								}
 							}
 							else
 							{
@@ -156,7 +183,33 @@
 									StringUtil.append(list, "&$1718;"); // Standby
 								}
 								
-								StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]);
+								if (Config.ALT_OLY_ANTI_FEED)
+								{
+									if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE)
+									{
+										StringUtil.append(list,
+											"</td><td>",
+											task.getGame().getPlayerNames()[0],
+											" ",
+											task.getGame().getPlayerNames()[1]);
+									}
+									else
+									{
+										StringUtil.append(list,
+											"</td><td>",
+											Config.ALT_OLY_ANTI_FEED_NAME,
+											" ",
+											Config.ALT_OLY_ANTI_FEED_NAME);
+									}
+								}
+								else
+								{
+									StringUtil.append(list,
+										"</td><td>",
+										task.getGame().getPlayerNames()[0],
+										" ",
+										task.getGame().getPlayerNames()[1]);
+								}
 							}
 							else
 							{
@@ -187,7 +240,33 @@
 								StringUtil.append(list, "&$1718;"); // Standby
 							}
 							
-							StringUtil.append(list, "</td><td>", task.getGame().getPlayerNames()[0], " ", task.getGame().getPlayerNames()[1]);
+							if (Config.ALT_OLY_ANTI_FEED)
+							{
+								if (activeChar.isGM() && Config.ALT_OLY_ANTI_FEED_GM_SEE)
+								{
+									StringUtil.append(list,
+										"</td><td>",
+										task.getGame().getPlayerNames()[0],
+										" ",
+										task.getGame().getPlayerNames()[1]);
+								}
+								else
+								{
+									StringUtil.append(list,
+										"</td><td>",
+										Config.ALT_OLY_ANTI_FEED_NAME,
+										" ",
+										Config.ALT_OLY_ANTI_FEED_NAME);
+								}
+							}
+							else
+							{
+								StringUtil.append(list,
+									"</td><td>",
+									task.getGame().getPlayerNames()[0],
+									" ",
+									task.getGame().getPlayerNames()[1]);
+							}
 						}
 						else
 						{

But i cant find this line : StringUtil.append(list, "   ", task.getGame().getPlayerNames()[0], "  :  ", task.getGame().getPlayerNames()[1]); 

 

My OlympiadObservation:

* Copyright (C) 2004-2013 L2J DataPack
 * 
 * This file is part of L2J DataPack.
 * 
 * L2J DataPack 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 3 of the License, or
 * (at your option) any later version.
 * 
 * L2J DataPack 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, see <http://www.gnu.org/licenses/>.
 */
package handlers.bypasshandlers;

import java.util.logging.Level;

import com.l2jserver.gameserver.handler.IBypassHandler;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.olympiad.Olympiad;
import com.l2jserver.gameserver.model.olympiad.OlympiadGameManager;
import com.l2jserver.gameserver.model.olympiad.OlympiadGameTask;
import com.l2jserver.gameserver.model.olympiad.OlympiadManager;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.ExOlympiadMatchList;

/**
 * @author DS
 */
public class OlympiadObservation implements IBypassHandler
{
	private static final String[] COMMANDS =
	{
		"watchmatch",
		"arenachange"
	};
	
	@Override
	public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
	{
		try
		{
			final L2Npc olymanager = activeChar.getLastFolkNPC();
			
			if (command.startsWith(COMMANDS[0])) // list
			{
				activeChar.sendPacket(new ExOlympiadMatchList());
			}
			else
			{
				if ((olymanager == null) || !(olymanager instanceof L2OlympiadManagerInstance))
				{
					return false;
				}
				
				if (!activeChar.inObserverMode() && !activeChar.isInsideRadius(olymanager, 300, false, false))
				{
					return false;
				}
				
				if (OlympiadManager.getInstance().isRegisteredInComp(activeChar))
				{
					activeChar.sendPacket(SystemMessageId.WHILE_YOU_ARE_ON_THE_WAITING_LIST_YOU_ARE_NOT_ALLOWED_TO_WATCH_THE_GAME);
					return false;
				}
				
				if (!Olympiad.getInstance().inCompPeriod())
				{
					activeChar.sendPacket(SystemMessageId.THE_OLYMPIAD_GAME_IS_NOT_CURRENTLY_IN_PROGRESS);
					return false;
				}
				
				if (activeChar.isOnEvent())
				{
					activeChar.sendMessage("You can not observe games while registered on an event");
					return false;
				}
				
				final int arenaId = Integer.parseInt(command.substring(12).trim());
				final OlympiadGameTask nextArena = OlympiadGameManager.getInstance().getOlympiadTask(arenaId);
				if (nextArena != null)
				{
					activeChar.enterOlympiadObserverMode(nextArena.getZone().getSpawns().get(0), arenaId);
					activeChar.setInstanceId(OlympiadGameManager.getInstance().getOlympiadTask(arenaId).getZone().getInstanceId());
				}
			}
			return true;
			
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Exception in " + getClass().getSimpleName(), e);
		}
		return false;
	}
	
	@Override
	public final String[] getBypassList()
	{
		return COMMANDS;
	}
}

Ty ppl for all.!!!

 

Happy 2014

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...