Advertisement
horato

FailDPAio

Aug 22nd, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2J_DataPack_BETA
  3. Index: data/scripts/handlers/bypasshandlers/DrawHenna.java
  4. ===================================================================
  5. --- data/scripts/handlers/bypasshandlers/DrawHenna.java (revision 8223)
  6. +++ data/scripts/handlers/bypasshandlers/DrawHenna.java (working copy)
  7. @@ -17,6 +17,7 @@
  8. import com.l2jserver.gameserver.datatables.HennaTreeTable;
  9. import com.l2jserver.gameserver.handler.IBypassHandler;
  10. import com.l2jserver.gameserver.model.actor.L2Character;
  11. +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
  12. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  13. import com.l2jserver.gameserver.model.actor.instance.L2SymbolMakerInstance;
  14. import com.l2jserver.gameserver.network.serverpackets.HennaEquipList;
  15. @@ -30,7 +31,7 @@
  16.  
  17. public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
  18. {
  19. - if (!(target instanceof L2SymbolMakerInstance))
  20. + if (!(target instanceof L2SymbolMakerInstance) && !(target instanceof L2AioNpcInstance))
  21. return false;
  22.  
  23. activeChar.sendPacket(new HennaEquipList(activeChar, HennaTreeTable.getInstance().getAvailableHenna(activeChar.getClassId())));
  24. Index: data/scripts/handlers/bypasshandlers/OlympiadObservation.java
  25. ===================================================================
  26. --- data/scripts/handlers/bypasshandlers/OlympiadObservation.java (revision 8223)
  27. +++ data/scripts/handlers/bypasshandlers/OlympiadObservation.java (working copy)
  28. @@ -16,8 +16,10 @@
  29.  
  30. import java.util.logging.Level;
  31.  
  32. +import com.l2jserver.gameserver.Announcements;
  33. import com.l2jserver.gameserver.handler.IBypassHandler;
  34. import com.l2jserver.gameserver.model.actor.L2Character;
  35. +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
  36. import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
  37. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  38. import com.l2jserver.gameserver.model.entity.TvTEvent;
  39. @@ -47,9 +49,10 @@
  40. {
  41. try
  42. {
  43. - final boolean isManager = target instanceof L2OlympiadManagerInstance;
  44. + final boolean isManager = (target instanceof L2OlympiadManagerInstance) || (target instanceof L2AioNpcInstance);
  45. if (!isManager)
  46. {
  47. + Announcements.getInstance().announceToAll("q");
  48. // without npc command can be used only in observer mode on arena
  49. if (!activeChar.inObserverMode()
  50. || activeChar.isInOlympiadMode()
  51. Index: data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java
  52. ===================================================================
  53. --- data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java (revision 8223)
  54. +++ data/scripts/handlers/bypasshandlers/OlympiadManagerLink.java (working copy)
  55. @@ -28,6 +28,7 @@
  56. import com.l2jserver.gameserver.model.actor.L2Character;
  57. import com.l2jserver.gameserver.model.actor.L2Npc;
  58. import com.l2jserver.gameserver.model.actor.L2Summon;
  59. +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
  60. import com.l2jserver.gameserver.model.actor.instance.L2OlympiadManagerInstance;
  61. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  62. import com.l2jserver.gameserver.model.olympiad.CompetitionType;
  63. @@ -53,7 +54,9 @@
  64. "olympiaddesc",
  65. "olympiadnoble",
  66. "olybuff",
  67. - "olympiad"
  68. + "olympiad",
  69. + "ShowOlyManager",
  70. + "ShowOlyMonument"
  71. };
  72.  
  73. private static final String FEWER_THAN = "Fewer than " + String.valueOf(Config.ALT_OLY_REG_DISPLAY);
  74. @@ -62,16 +65,19 @@
  75.  
  76. public final boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
  77. {
  78. - if (!(target instanceof L2OlympiadManagerInstance))
  79. + if (!(target instanceof L2OlympiadManagerInstance) && !(target instanceof L2AioNpcInstance))
  80. return false;
  81. -
  82. +
  83. try
  84. {
  85. if (command.toLowerCase().startsWith(COMMANDS[0])) // desc
  86. {
  87. - int val = Integer.parseInt(command.substring(13,14));
  88. + int val = Integer.parseInt(command.substring(13, 14));
  89. String suffix = command.substring(14);
  90. - ((L2OlympiadManagerInstance)target).showChatWindow(activeChar, val, suffix);
  91. + if (target instanceof L2OlympiadManagerInstance)
  92. + ((L2OlympiadManagerInstance) target).showChatWindow(activeChar, val, suffix);
  93. + else if (target instanceof L2AioNpcInstance)
  94. + ((L2AioNpcInstance) target).showChatWindow(activeChar, val, suffix);
  95. }
  96. else if (command.toLowerCase().startsWith(COMMANDS[1])) // noble
  97. {
  98. Index: data/scripts/handlers/bypasshandlers/RemoveHennaList.java
  99. ===================================================================
  100. --- data/scripts/handlers/bypasshandlers/RemoveHennaList.java (revision 8223)
  101. +++ data/scripts/handlers/bypasshandlers/RemoveHennaList.java (working copy)
  102. @@ -17,6 +17,7 @@
  103. import com.l2jserver.gameserver.handler.IBypassHandler;
  104. import com.l2jserver.gameserver.model.L2HennaInstance;
  105. import com.l2jserver.gameserver.model.actor.L2Character;
  106. +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
  107. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  108. import com.l2jserver.gameserver.model.actor.instance.L2SymbolMakerInstance;
  109. import com.l2jserver.gameserver.network.serverpackets.HennaRemoveList;
  110. @@ -30,7 +31,7 @@
  111.  
  112. public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
  113. {
  114. - if (!(target instanceof L2SymbolMakerInstance))
  115. + if (!(target instanceof L2SymbolMakerInstance) && !(target instanceof L2AioNpcInstance))
  116. return false;
  117.  
  118. boolean hasHennas = false;
  119. Index: data/scripts/handlers/bypasshandlers/ClanWarehouse.java
  120. ===================================================================
  121. --- data/scripts/handlers/bypasshandlers/ClanWarehouse.java (revision 8223)
  122. +++ data/scripts/handlers/bypasshandlers/ClanWarehouse.java (working copy)
  123. @@ -19,6 +19,7 @@
  124. import com.l2jserver.gameserver.model.L2Clan;
  125. import com.l2jserver.gameserver.model.actor.L2Character;
  126. import com.l2jserver.gameserver.model.actor.L2Npc;
  127. +import com.l2jserver.gameserver.model.actor.instance.L2AioNpcInstance;
  128. import com.l2jserver.gameserver.model.actor.instance.L2ClanHallManagerInstance;
  129. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  130. import com.l2jserver.gameserver.model.actor.instance.L2WarehouseInstance;
  131. @@ -42,8 +43,9 @@
  132.  
  133. public boolean useBypass(String command, L2PcInstance activeChar, L2Character target)
  134. {
  135. - if (!(target instanceof L2WarehouseInstance) && !(target instanceof L2ClanHallManagerInstance))
  136. - return false;
  137. + if(!(target instanceof L2AioNpcInstance))
  138. + if (!(target instanceof L2WarehouseInstance) && !(target instanceof L2ClanHallManagerInstance))
  139. + return false;
  140.  
  141. if (activeChar.isEnchanting())
  142. return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement