Dropped the use of GameTimeController for spawn protection.

This commit is contained in:
MobiusDev
2018-04-18 01:54:52 +00:00
parent 999f8d09ac
commit a05027021a
28 changed files with 150 additions and 231 deletions

View File

@@ -715,14 +715,14 @@ UnstuckInterval = 300
# Default: 0
TeleportWatchdogTimeout = 0
# After a player teleports, this is the time the player is protected.
# After a player spawns, this is the time the player is protected.
# This time is in seconds, leave it at 0 if you want this feature disabled.
# Retail (Since GE): 600 (10 minutes)
# Default: 600
PlayerSpawnProtection = 600
# Teleport spawn protection time. It will protect the player in the
# teleport spawn for the given time. 0 to disable feature
# After a player teleports, this is the time the player is protected.
# This time is in seconds, leave it at 0 if you want this feature disabled.
PlayerTeleportProtection = 0
# If enabled, players respawn in town on different locations defined in zone.xml for given town.

View File

@@ -130,7 +130,7 @@ public class FindPvP implements IBypassHandler
}
activeChar.teleToLocation((mostPvP.getX() + Rnd.get(300)) - 150, (mostPvP.getY() + Rnd.get(300)) - 150, mostPvP.getZ());
activeChar.setProtection(true);
activeChar.setSpawnProtection(true);
if (!activeChar.isGM())
{
activeChar.setPvpFlagLasts(System.currentTimeMillis() + Config.PVP_PVP_TIME);