AntiFeedManager checks for TvT.
Contributed by Trance.
This commit is contained in:
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -138,6 +140,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -146,6 +150,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -153,6 +162,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -819,6 +833,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -138,6 +140,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -146,6 +150,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -153,6 +162,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -819,6 +833,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_2.5_Underground/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -138,6 +140,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -146,6 +150,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -153,6 +162,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -819,6 +833,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_3.0_Helios/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -138,6 +140,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -146,6 +150,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -153,6 +162,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -819,6 +833,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -136,6 +138,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -144,6 +148,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -151,6 +160,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -817,6 +831,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -136,6 +138,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -144,6 +148,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -151,6 +160,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -817,6 +831,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -136,6 +138,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -144,6 +148,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -151,6 +160,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -817,6 +831,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,9 +22,11 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -136,6 +138,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -144,6 +148,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -151,6 +160,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -817,6 +831,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
33
L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
33
L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/custom/events/TeamVsTeam/registration-ip.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -22,8 +22,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
import org.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||||
import org.l2jmobius.gameserver.enums.Team;
|
import org.l2jmobius.gameserver.enums.Team;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||||
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
import org.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||||
import org.l2jmobius.gameserver.model.CommandChannel;
|
import org.l2jmobius.gameserver.model.CommandChannel;
|
||||||
@@ -142,6 +144,8 @@ public class TvT extends Event
|
|||||||
case "Participate":
|
case "Participate":
|
||||||
{
|
{
|
||||||
if (canRegister(player))
|
if (canRegister(player))
|
||||||
|
{
|
||||||
|
if ((Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP == 0) || AntiFeedManager.getInstance().tryAddPlayer(AntiFeedManager.L2EVENT_ID, player, Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP))
|
||||||
{
|
{
|
||||||
PLAYER_LIST.add(player);
|
PLAYER_LIST.add(player);
|
||||||
PLAYER_SCORES.put(player, 0);
|
PLAYER_SCORES.put(player, 0);
|
||||||
@@ -150,6 +154,11 @@ public class TvT extends Event
|
|||||||
htmltext = "registration-success.html";
|
htmltext = "registration-success.html";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
htmltext = "registration-ip.html";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
htmltext = "registration-failed.html";
|
htmltext = "registration-failed.html";
|
||||||
}
|
}
|
||||||
@@ -157,6 +166,11 @@ public class TvT extends Event
|
|||||||
}
|
}
|
||||||
case "CancelParticipation":
|
case "CancelParticipation":
|
||||||
{
|
{
|
||||||
|
// Remove the player from the IP count
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().removePlayer(AntiFeedManager.L2EVENT_ID, player);
|
||||||
|
}
|
||||||
PLAYER_LIST.remove(player);
|
PLAYER_LIST.remove(player);
|
||||||
PLAYER_SCORES.remove(player);
|
PLAYER_SCORES.remove(player);
|
||||||
removeListeners(player);
|
removeListeners(player);
|
||||||
@@ -821,6 +835,12 @@ public class TvT extends Event
|
|||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Register the event at AntiFeedManager and clean it for just in case if the event is already registered
|
||||||
|
if (Config.DUALBOX_CHECK_MAX_L2EVENT_PARTICIPANTS_PER_IP > 0)
|
||||||
|
{
|
||||||
|
AntiFeedManager.getInstance().registerEvent(AntiFeedManager.L2EVENT_ID);
|
||||||
|
AntiFeedManager.getInstance().clear(AntiFeedManager.L2EVENT_ID);
|
||||||
|
}
|
||||||
// Clear player lists.
|
// Clear player lists.
|
||||||
PLAYER_LIST.clear();
|
PLAYER_LIST.clear();
|
||||||
PLAYER_SCORES.clear();
|
PLAYER_SCORES.clear();
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
<html>
|
||||||
|
<title>TvT Event</title>
|
||||||
|
<body>
|
||||||
|
<center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0 width=290 background=L2UI_CH3.refinewnd_back_Pattern>
|
||||||
|
<tr>
|
||||||
|
<td valign=top align=center>
|
||||||
|
<table border=0 cellpadding=0 cellspacing=0>
|
||||||
|
<tr>
|
||||||
|
<td width=256 height=185 background="L2UI_CT1.HtmlWnd_DF_TextureKnight"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align=center fixwidth=290>
|
||||||
|
<font name="hs15" color="CDB67F">Team vs Team</font><br1>
|
||||||
|
<img src="L2UI_CH3.herotower_deco" width=256 height=32>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<table width=210 height=95 border=0>
|
||||||
|
<tr>
|
||||||
|
<td width=210 align="center"><font color="CDB67F">Too many registrations.</font></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in New Issue
Block a user