Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- Index: java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java (revision 1)
- +++ java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameTask.java (working copy)
- @@ -187,6 +187,12 @@
- // Game start, port players to arena
- case GAME_STARTED:
- {
- + if (_game.checkDualbox())
- + {
- + _state = GameState.CLEANUP;
- + break;
- + }
- +
- if (!startGame())
- {
- _state = GameState.GAME_STOPPED;
- Index: java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java (revision 1)
- +++ java/net/sf/l2j/gameserver/model/olympiad/AbstractOlympiadGame.java (working copy)
- @@ -430,4 +430,6 @@
- protected abstract int getDivider();
- protected abstract int[][] getReward();
- +
- + protected abstract boolean checkDualbox();
- }
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (revision 1)
- +++ java/net/sf/l2j/gameserver/model/olympiad/OlympiadGameNormal.java (working copy)
- @@ -513,6 +513,22 @@
- }
- + @Override
- + protected boolean checkDualbox()
- + {
- + String ip1 = _playerOne.player.getClient().getConnection().getInetAddress().getHostAddress();
- + String ip2 = _playerTwo.player.getClient().getConnection().getInetAddress().getHostAddress();
- +
- + if (ip1.equals(ip2))
- + {
- + _playerOne.player.sendMessage("[Duabox Protection]: Seu adversario [" + _playerTwo.player.getName() + "] possui o mesmo ip que o seu!");
- + _playerTwo.player.sendMessage("[Duabox Protection]: Seu adversario [" + _playerOne.player.getName() + "] possui o mesmo ip que o seu!");
- + return true;
- + }
- +
- + return false;
- + }
- @Override
- public final void resetDamage()
- {
- _damageP1 = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement