Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P L2J_DataPack_BETA
- Index: data/scripts/handlers/bypasshandlers/DrawHenna.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/DrawHenna.java (revision 8223)
- +++ data/scripts/handlers/bypasshandlers/DrawHenna.java (working copy)
- @@ -17,6 +17,7 @@
- import com.l2jserver.gameserver.datatables.HennaTreeTable;
- import com.l2jserver.gameserver.handler.IBypassHandler;
- import com.l2jserver.gameserver.model.actor.L2Character;
- +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2SymbolMakerInstance;
- import com.l2jserver.gameserver.network.serverpackets.HennaEquipList;
- @@ -30,7 +31,7 @@
- public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
- {
- - if (!(target instanceof L2SymbolMakerInstance))
- + if (!(target instanceof L2SymbolMakerInstance) && !(target instanceof L2AioNpcInstance))
- return false;
- activeChar.sendPacket(new HennaEquipList(activeChar, HennaTreeTable.getInstance().getAvailableHenna(activeChar.getClassId())));
- Index: data/scripts/handlers/bypasshandlers/OlympiadObservation.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/OlympiadObservation.java (revision 8223)
- +++ data/scripts/handlers/bypasshandlers/OlympiadObservation.java (working copy)
- @@ -16,8 +16,10 @@
- import java.util.logging.Level;
- +import com.l2jserver.gameserver.Announcements;
- import com.l2jserver.gameserver.handler.IBypassHandler;
- import com.l2jserver.gameserver.model.actor.L2Character;
- +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.entity.TvTEvent;
- @@ -47,9 +49,10 @@
- {
- try
- {
- - final boolean isManager = target instanceof L2OlympiadManagerInstance;
- + final boolean isManager = (target instanceof L2OlympiadManagerInstance) || (target instanceof L2AioNpcInstance);
- if (!isManager)
- {
- + Announcements.getInstance().announceToAll("q");
- // without npc command can be used only in observer mode on arena
- if (!activeChar.inObserverMode()
- || activeChar.isInOlympiadMode()
- Index: data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java (revision 8223)
- +++ data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java (working copy)
- @@ -28,6 +28,7 @@
- import com.l2jserver.gameserver.model.actor.L2Character;
- import com.l2jserver.gameserver.model.actor.L2Npc;
- import com.l2jserver.gameserver.model.actor.L2Summon;
- +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.olympiad.CompetitionType;
- @@ -53,7 +54,9 @@
- "olympiaddesc",
- "olympiadnoble",
- "olybuff",
- - "olympiad"
- + "olympiad",
- + "ShowOlyManager",
- + "ShowOlyMonument"
- };
- private static final String FEWER_THAN = "Fewer than " + String.valueOf(Config.ALT_OLY_REG_DISPLAY);
- @@ -62,16 +65,19 @@
- public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
- {
- - if (!(target instanceof L2OlympiadManagerInstance))
- + if (!(target instanceof L2OlympiadManagerInstance) && !(target instanceof L2AioNpcInstance))
- return false;
- -
- +
- try
- {
- if (command.toLowerCase().startsWith(COMMANDS[0])) // desc
- {
- - int val = Integer.parseInt(command.substring(13,14));
- + int val = Integer.parseInt(command.substring(13, 14));
- String suffix = command.substring(14);
- - ((L2OlympiadManagerInstance)target).showChatWindow(activeChar, val, suffix);
- + if (target instanceof L2OlympiadManagerInstance)
- + ((L2OlympiadManagerInstance) target).showChatWindow(activeChar, val, suffix);
- + else if (target instanceof L2AioNpcInstance)
- + ((L2AioNpcInstance) target).showChatWindow(activeChar, val, suffix);
- }
- else if (command.toLowerCase().startsWith(COMMANDS[1])) // noble
- {
- Index: data/scripts/handlers/bypasshandlers/RemoveHennaList.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/RemoveHennaList.java (revision 8223)
- +++ data/scripts/handlers/bypasshandlers/RemoveHennaList.java (working copy)
- @@ -17,6 +17,7 @@
- import com.l2jserver.gameserver.handler.IBypassHandler;
- import com.l2jserver.gameserver.model.L2HennaInstance;
- import com.l2jserver.gameserver.model.actor.L2Character;
- +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2SymbolMakerInstance;
- import com.l2jserver.gameserver.network.serverpackets.HennaRemoveList;
- @@ -30,7 +31,7 @@
- public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
- {
- - if (!(target instanceof L2SymbolMakerInstance))
- + if (!(target instanceof L2SymbolMakerInstance) && !(target instanceof L2AioNpcInstance))
- return false;
- boolean hasHennas = false;
- Index: data/scripts/handlers/bypasshandlers/ClanWarehouse.java
- ===================================================================
- --- data/scripts/handlers/bypasshandlers/ClanWarehouse.java (revision 8223)
- +++ data/scripts/handlers/bypasshandlers/ClanWarehouse.java (working copy)
- @@ -19,6 +19,7 @@
- import com.l2jserver.gameserver.model.L2Clan;
- import com.l2jserver.gameserver.model.actor.L2Character;
- import com.l2jserver.gameserver.model.actor.L2Npc;
- +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2ClanHallManagerInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.model.actor.instance.L2WarehouseInstance;
- @@ -42,8 +43,9 @@
- public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
- {
- - if (!(target instanceof L2WarehouseInstance) && !(target instanceof L2ClanHallManagerInstance))
- - return false;
- + if(!(target instanceof L2AioNpcInstance))
- + if (!(target instanceof L2WarehouseInstance) && !(target instanceof L2ClanHallManagerInstance))
- + return false;
- if (activeChar.isEnchanting())
- return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement