Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: head-src/com/l2jfrozen/gameserver/handler.voicedcommandhandlers/FarmPvpCmd.java
- ===================================================================
- --- head-src/com/l2jfrozen/gameserver/handler.voicedcommandhandlers/FarmPvpCmd.java (revision 774)
- +++ head-src/com/l2jfrozen/gameserver/handler.voicedcommandhandlers/FarmPvpCmd.java (working copy)
- @@ -23,1 +30,1 @@
- import com.l2jfrozen.Config;
- +import com.l2jfrozen.gameserver.GameTimeController;
- +import com.l2jfrozen.gameserver.ai.CtrlIntention;
- import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
- import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +import com.l2jfrozen.gameserver.network.serverpackets.MagicSkillUser;
- import com.l2jfrozen.gameserver.network.serverpackets.SetupGauge;
- import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
- +import com.l2jfrozen.gameserver.util.Broadcast;
- @@ -114,9 +121,21 @@
- - SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 15000);
- - activeChar.sendPacket(sg);
- - sg = null;
- - activeChar.setIsImobilised(true);
- -
- - ThreadPoolManager.getInstance().scheduleGeneral(new teleportTask(activeChar, placex, placey, placez, message), 15000);
- -
- - return true;
- + int teleportTimer = activeChar.getAccessLevel().isGm() ? 1000 : Config.UNSTUCK_INTERVAL * 1000;
- +
- + activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- +
- + //SoE Animation section
- + activeChar.setTarget(activeChar);
- + activeChar.disableAllSkills();
- +
- + MagicSkillUser msk = new MagicSkillUser(activeChar, 1050, 1, teleportTimer, 0);
- + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, msk, 810000/*900*/);
- + SetupGauge sg = new SetupGauge(0, teleportTimer);
- + activeChar.sendPacket(sg);
- + msk = null;
- + sg = null;
- + //End SoE Animation section
- +
- + EscapeFinalizer ef = new EscapeFinalizer(activeChar, placex, placey, placez, message);
- + // continue execution later
- + activeChar.setSkillCast(ThreadPoolManager.getInstance().scheduleGeneral(ef, teleportTimer));
- + activeChar.setSkillCastEndTime(10 + GameTimeController.getGameTicks() + teleportTimer / GameTimeController.MILLIS_IN_TICK);
- + ef = null;
- +
- + return true;
- }
- @@ -145,5 +145,43 @@
- - class teleportTask implements Runnable
- + static class EscapeFinalizer implements Runnable
- @@ -153,9 +153,83 @@
- - teleportTask(L2PcInstance activeChar, int x, int y, int z, String message)
- + EscapeFinalizer(L2PcInstance activeChar, int x, int y, int z, String message)
- @@ -166,17 +168,13 @@
- if(_activeChar == null)
- - return;
- -
- + return;
- +
- + if(_activeChar.isDead())
- + return;
- +
- + _activeChar.enableAllSkills();
- + _activeChar.sendMessage(_message);
- - _activeChar.sendMessage(_message);
- - _activeChar.setIsImobilised(false);
- \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment