Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- ### Eclipse Workspace Patch 1.0
- #P L2JHellasD
- Index: sql/game/admin_command_access_rights.sql
- ===================================================================
- --- sql/game/admin_command_access_rights.sql (revision 176)
- +++ sql/game/admin_command_access_rights.sql (working copy)
- @@ -103,6 +103,9 @@
- -- DELETE
- ('admin_delete','1'),
- +-- DEPORT
- +('admin_deport','1'),
- +
- -- DISCONNECT
- ('admin_character_disconnect','1'),
- @@ -331,6 +334,9 @@
- ('admin_manor_save','1'),
- ('admin_manor_disable','1'),
- +-- MASSHERO
- +('admin_masshero','1'),
- +
- -- MENU
- ('admin_char_manage','1'),
- ('admin_teleport_character_to_menu','1'),
- @@ -402,6 +408,8 @@
- ('admin_quest_reload','1'),
- ('admin_script_load','1'),
- +-- RECALL ALL
- +('admin_recallall', '1'),
- -- REPAIR CHAR
- ('admin_restore','1'),
- ('admin_repair','1'),
- #P L2jHellasC
- Index: java/com/l2jhellas/gameserver/handler/AdminCommandHandler.java
- ===================================================================
- --- java/com/l2jhellas/gameserver/handler/AdminCommandHandler.java (revision 176)
- +++ java/com/l2jhellas/gameserver/handler/AdminCommandHandler.java (working copy)
- @@ -47,6 +47,7 @@
- registerAdminCommandHandler(new AdminCreateItem());
- registerAdminCommandHandler(new AdminCursedWeapons());
- registerAdminCommandHandler(new AdminDelete());
- + registerAdminCommandHandler(new AdminDeport());
- registerAdminCommandHandler(new AdminDisconnect());
- registerAdminCommandHandler(new AdminDoorControl());
- registerAdminCommandHandler(new AdminEditChar());
- @@ -69,6 +70,7 @@
- registerAdminCommandHandler(new AdminLogin());
- registerAdminCommandHandler(new AdminMammon());
- registerAdminCommandHandler(new AdminManor());
- + registerAdminCommandHandler(new AdminMassHero());
- registerAdminCommandHandler(new AdminMenu());
- registerAdminCommandHandler(new AdminMobGroup());
- registerAdminCommandHandler(new AdminMonsterRace());
- @@ -77,7 +79,7 @@
- registerAdminCommandHandler(new AdminPForge());
- registerAdminCommandHandler(new AdminPledge());
- registerAdminCommandHandler(new AdminPolymorph());
- registerAdminCommandHandler(new AdminQuest());
- + registerAdminCommandHandler(new AdminRecallAll());
- registerAdminCommandHandler(new AdminRepairChar());
- registerAdminCommandHandler(new AdminRes());
- registerAdminCommandHandler(new AdminRideWyvern());
- Index: java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminMassHero.java
- ===================================================================
- --- java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminMassHero.java (revision 0)
- +++ java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminMassHero.java (working copy)
- @@ -0,0 +1,48 @@
- +package com.l2jhellas.gameserver.handler.admincommandhandlers;
- +
- +import java.util.logging.Logger;
- +
- +import com.l2jhellas.gameserver.handler.IAdminCommandHandler;
- +import com.l2jhellas.gameserver.model.L2World;
- +import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jhellas.gameserver.network.serverpackets.SocialAction;
- +
- +public class AdminMassHero implements IAdminCommandHandler
- +{
- + protected static final Logger _log = Logger.getLogger(AdminMassHero.class.getName());
- +
- + @Override
- + public String[] getAdminCommandList()
- + {
- + return ADMIN_COMMANDS;
- + }
- +
- + @Override
- + public boolean useAdminCommand(String command, L2PcInstance activeChar)
- + {
- + if(activeChar == null)
- + return false;
- +
- + if(command.startsWith("admin_masshero"))
- + {
- + for(L2PcInstance player : L2World.getInstance().getAllPlayers())
- + {
- + if(player instanceof L2PcInstance)
- + {
- + /* Check to see if the player already is Hero and if aren't in Olympiad Mode */
- + if(!player.isHero() || !player.isInOlympiadMode())
- + {
- + player.setHero(true);
- + player.sendMessage("Admin is rewarding all online players with Hero Status.");
- + player.broadcastPacket(new SocialAction(player.getObjectId(), 16));
- + player.broadcastUserInfo();
- + }
- + player = null;
- + }
- + }
- + }
- + return true;
- + }
- +
- + private static String[] ADMIN_COMMANDS = { "admin_masshero" };
- +}
- \ No newline at end of file
- Index: java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminRecallAll.java
- ===================================================================
- --- java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminRecallAll.java (revision 0)
- +++ java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminRecallAll.java (working copy)
- @@ -0,0 +1,36 @@
- +package com.l2jhellas.gameserver.handler.admincommandhandlers;
- +
- +import com.l2jhellas.gameserver.handler.IAdminCommandHandler;
- +import com.l2jhellas.gameserver.model.L2World;
- +import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
- +
- +
- +
- +public class AdminRecallAll implements IAdminCommandHandler
- +{
- + private static final String[] ADMIN_COMMANDS = { "admin_recallall" };
- +
- + private void teleportTo(L2PcInstance activeChar, int x, int y, int z)
- + {
- +
- + activeChar.teleToLocation(x, y, z, false);
- +
- + }
- + @Override
- +public boolean useAdminCommand(String command, L2PcInstance activeChar)
- + {
- + if (command.startsWith("admin_recallall"))
- + {
- + for(L2PcInstance players :L2World.getInstance().getAllPlayers())
- + {
- + teleportTo(players, activeChar.getX(), activeChar.getY(), activeChar.getZ());
- + }
- + }
- + return false;
- + }
- + @Override
- +public String[] getAdminCommandList()
- + {
- + return ADMIN_COMMANDS;
- + }
- +}
- \ No newline at end of file
- Index: java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminDeport.java
- ===================================================================
- --- java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminDeport.java (revision 0)
- +++ java/com/l2jhellas/gameserver/handler/admincommandhandlers/AdminDeport.java (working copy)
- @@ -0,0 +1,33 @@
- +package com.l2jhellas.gameserver.handler.admincommandhandlers;
- +
- +import com.l2jhellas.gameserver.handler.IAdminCommandHandler;
- +import com.l2jhellas.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class AdminDeport implements IAdminCommandHandler
- +{
- + private static String[] _adminCommands =
- + {
- + "admin_deport"
- + };
- +
- + @Override
- + public boolean useAdminCommand(String command, L2PcInstance activeChar)
- + {
- +
- + if(activeChar.getTarget() instanceof L2PcInstance)
- + {
- + if(command.startsWith("admin_deport"))
- + {
- + ((L2PcInstance) activeChar.getTarget()).teleToLocation(82698, 148638, -3473); // Location Giran
- + }
- + }
- + return false;
- +
- + }
- +
- + @Override
- + public String[] getAdminCommandList()
- + {
- + return _adminCommands;
- + }
- +}
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement