Disconnect player after being dead for 1 hour.
Contributed by nasseka.
This commit is contained in:
@@ -799,6 +799,10 @@ MaxFreeTeleportLevel = 76
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1881,6 +1882,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 76);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 76);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5075,6 +5076,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10213,6 +10219,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -799,6 +799,10 @@ MaxFreeTeleportLevel = 76
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1901,6 +1902,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 76);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 76);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5077,6 +5078,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10216,6 +10222,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -799,6 +799,10 @@ MaxFreeTeleportLevel = 76
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1914,6 +1915,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5079,6 +5080,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10218,6 +10224,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -775,6 +775,10 @@ MaxFreeTeleportLevel = 76
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1895,6 +1896,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5075,6 +5076,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10232,6 +10238,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -775,6 +775,10 @@ MaxFreeTeleportLevel = 94
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1904,6 +1905,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -351,6 +351,7 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5093,6 +5094,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10257,6 +10263,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -775,6 +775,10 @@ MaxFreeTeleportLevel = 94
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1911,6 +1912,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5106,6 +5107,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10270,6 +10276,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -795,6 +795,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1950,6 +1951,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5107,6 +5108,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10276,6 +10282,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -308,6 +308,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1961,6 +1962,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -364,6 +364,7 @@ import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookR
|
|||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5048,6 +5049,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10298,6 +10304,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1935,6 +1936,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -361,6 +361,7 @@ import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
|||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5069,6 +5070,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10405,6 +10411,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1937,6 +1938,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
+9
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
+11
@@ -367,6 +367,7 @@ import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
|||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5086,6 +5087,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10432,6 +10438,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: True
|
||||||
|
DisconnectAfterDeath = True
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1937,6 +1938,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +566,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SystemMessageId.SIXTY_MIN_HAVE_PASSED_AFTER_THE_DEATH_OF_YOUR_CHARACTER_SO_YOU_WERE_DISCONNECTED_FROM_THE_GAME));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +594,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCoun
|
|||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5119,6 +5120,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10482,6 +10488,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -809,6 +809,10 @@ MaxFreeTeleportLevel = 99
|
|||||||
# Default: 1
|
# Default: 1
|
||||||
DeleteCharAfterDays = 1
|
DeleteCharAfterDays = 1
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: True
|
||||||
|
DisconnectAfterDeath = True
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -301,6 +301,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1937,6 +1938,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +566,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SystemMessageId.SIXTY_MIN_HAVE_PASSED_AFTER_THE_DEATH_OF_YOUR_CHARACTER_SO_YOU_WERE_DISCONNECTED_FROM_THE_GAME));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +594,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -368,6 +368,7 @@ import org.l2jmobius.gameserver.network.serverpackets.limitshop.ExBloodyCoinCoun
|
|||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoPlayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AutoUseTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5147,6 +5148,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10510,6 +10516,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -797,6 +797,11 @@ AltRecommend = False
|
|||||||
# Default: 7
|
# Default: 7
|
||||||
DeleteCharAfterDays = 7
|
DeleteCharAfterDays = 7
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class Config
|
|||||||
public static boolean FREE_TELEPORTING;
|
public static boolean FREE_TELEPORTING;
|
||||||
public static boolean ALT_RECOMMEND;
|
public static boolean ALT_RECOMMEND;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1887,6 +1888,7 @@ public class Config
|
|||||||
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
||||||
ALT_RECOMMEND = characterConfig.getBoolean("AltRecommend", false);
|
ALT_RECOMMEND = characterConfig.getBoolean("AltRecommend", false);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 7);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 7);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "highfive");
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "highfive");
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||||
import org.l2jmobius.gameserver.enums.PlayerCondOverride;
|
import org.l2jmobius.gameserver.enums.PlayerCondOverride;
|
||||||
@@ -133,6 +134,7 @@ import org.l2jmobius.gameserver.model.stats.Stat;
|
|||||||
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -482,6 +484,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -490,6 +498,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
region.removeFromZones(this);
|
region.removeFromZones(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5014,6 +5015,11 @@ public class Player extends Playable
|
|||||||
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10123,6 +10129,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
updateEffectIcons();
|
updateEffectIcons();
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -814,6 +814,11 @@ AltRecommend = False
|
|||||||
# Default: 7
|
# Default: 7
|
||||||
DeleteCharAfterDays = 7
|
DeleteCharAfterDays = 7
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ public class Config
|
|||||||
public static boolean FREE_TELEPORTING;
|
public static boolean FREE_TELEPORTING;
|
||||||
public static boolean ALT_RECOMMEND;
|
public static boolean ALT_RECOMMEND;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1951,6 +1952,7 @@ public class Config
|
|||||||
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
||||||
ALT_RECOMMEND = characterConfig.getBoolean("AltRecommend", false);
|
ALT_RECOMMEND = characterConfig.getBoolean("AltRecommend", false);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 7);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 7);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "highfive");
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "highfive");
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.cache.RelationCache;
|
|||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.FlyType;
|
import org.l2jmobius.gameserver.enums.FlyType;
|
||||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||||
@@ -138,6 +139,7 @@ import org.l2jmobius.gameserver.model.stats.Stat;
|
|||||||
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -512,6 +514,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -520,6 +528,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
region.removeFromZones(this);
|
region.removeFromZones(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -326,6 +326,7 @@ import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5346,6 +5347,11 @@ public class Player extends Playable
|
|||||||
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10647,6 +10653,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
updateEffectIcons();
|
updateEffectIcons();
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -833,6 +833,11 @@ FreeTeleporting = False
|
|||||||
# Default: 7
|
# Default: 7
|
||||||
DeleteCharAfterDays = 7
|
DeleteCharAfterDays = 7
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
# In that case he will not receive any Exp/SP from party and is not counted for party bonus.
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ public class Config
|
|||||||
public static int MAX_PETITIONS_PENDING;
|
public static int MAX_PETITIONS_PENDING;
|
||||||
public static boolean FREE_TELEPORTING;
|
public static boolean FREE_TELEPORTING;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1951,6 +1952,7 @@ public class Config
|
|||||||
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
MAX_PETITIONS_PENDING = characterConfig.getInt("MaxPetitionsPending", 25);
|
||||||
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
FREE_TELEPORTING = characterConfig.getBoolean("FreeTeleporting", false);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import org.l2jmobius.gameserver.cache.RelationCache;
|
|||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.enums.CategoryType;
|
import org.l2jmobius.gameserver.enums.CategoryType;
|
||||||
import org.l2jmobius.gameserver.enums.FlyType;
|
import org.l2jmobius.gameserver.enums.FlyType;
|
||||||
import org.l2jmobius.gameserver.enums.InstanceType;
|
import org.l2jmobius.gameserver.enums.InstanceType;
|
||||||
@@ -138,6 +139,7 @@ import org.l2jmobius.gameserver.model.stats.Stat;
|
|||||||
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
import org.l2jmobius.gameserver.model.stats.functions.AbstractFunction;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractNpcInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@@ -513,6 +515,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -521,6 +529,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
region.removeFromZones(this);
|
region.removeFromZones(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -331,6 +331,7 @@ import org.l2jmobius.gameserver.network.serverpackets.TradeStart;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5236,6 +5237,11 @@ public class Player extends Playable
|
|||||||
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
setKarma(getKarma() < 200 ? 0 : (int) (getKarma() - (getKarma() / 4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10530,6 +10536,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
updateEffectIcons();
|
updateEffectIcons();
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,6 +719,10 @@ MaxNewbieBuffLevel = 0
|
|||||||
# Default: 3
|
# Default: 3
|
||||||
DeleteCharAfterDays = 3
|
DeleteCharAfterDays = 3
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int MAX_NEWBIE_BUFF_LEVEL;
|
public static int MAX_NEWBIE_BUFF_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1849,6 +1850,7 @@ public class Config
|
|||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5051,6 +5052,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10118,6 +10124,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,6 +719,10 @@ MaxNewbieBuffLevel = 0
|
|||||||
# Default: 3
|
# Default: 3
|
||||||
DeleteCharAfterDays = 3
|
DeleteCharAfterDays = 3
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int MAX_NEWBIE_BUFF_LEVEL;
|
public static int MAX_NEWBIE_BUFF_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1853,6 +1854,7 @@ public class Config
|
|||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -349,6 +349,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5051,6 +5052,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10118,6 +10124,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,6 +719,10 @@ MaxNewbieBuffLevel = 0
|
|||||||
# Default: 3
|
# Default: 3
|
||||||
DeleteCharAfterDays = 3
|
DeleteCharAfterDays = 3
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int MAX_NEWBIE_BUFF_LEVEL;
|
public static int MAX_NEWBIE_BUFF_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1853,6 +1854,7 @@ public class Config
|
|||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
+9
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -140,6 +141,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -565,6 +567,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -587,6 +595,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommi
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5036,6 +5037,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10104,6 +10110,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,6 +719,10 @@ MaxNewbieBuffLevel = 0
|
|||||||
# Default: 3
|
# Default: 3
|
||||||
DeleteCharAfterDays = 3
|
DeleteCharAfterDays = 3
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int MAX_NEWBIE_BUFF_LEVEL;
|
public static int MAX_NEWBIE_BUFF_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1853,6 +1854,7 @@ public class Config
|
|||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
+9
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -141,6 +142,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -566,6 +568,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -588,6 +596,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
+11
@@ -353,6 +353,7 @@ import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.Elemental
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5063,6 +5064,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10143,6 +10149,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -735,6 +735,10 @@ MaxNewbieBuffLevel = 0
|
|||||||
# Default: 3
|
# Default: 3
|
||||||
DeleteCharAfterDays = 3
|
DeleteCharAfterDays = 3
|
||||||
|
|
||||||
|
# Disconnect player after being dead for 1 hour.
|
||||||
|
# Default: False
|
||||||
|
DisconnectAfterDeath = False
|
||||||
|
|
||||||
|
|
||||||
# PARTY XP DISTRIBUTION
|
# PARTY XP DISTRIBUTION
|
||||||
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
# With "auto method" member is cut from Exp/SP distribution when his share is lower than party bonus acquired for him (30% for 2 member party).
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ public class Config
|
|||||||
public static int MAX_FREE_TELEPORT_LEVEL;
|
public static int MAX_FREE_TELEPORT_LEVEL;
|
||||||
public static int MAX_NEWBIE_BUFF_LEVEL;
|
public static int MAX_NEWBIE_BUFF_LEVEL;
|
||||||
public static int DELETE_DAYS;
|
public static int DELETE_DAYS;
|
||||||
|
public static boolean DISCONNECT_AFTER_DEATH;
|
||||||
public static String PARTY_XP_CUTOFF_METHOD;
|
public static String PARTY_XP_CUTOFF_METHOD;
|
||||||
public static double PARTY_XP_CUTOFF_PERCENT;
|
public static double PARTY_XP_CUTOFF_PERCENT;
|
||||||
public static int PARTY_XP_CUTOFF_LEVEL;
|
public static int PARTY_XP_CUTOFF_LEVEL;
|
||||||
@@ -1862,6 +1863,7 @@ public class Config
|
|||||||
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
MAX_FREE_TELEPORT_LEVEL = characterConfig.getInt("MaxFreeTeleportLevel", 99);
|
||||||
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
MAX_NEWBIE_BUFF_LEVEL = characterConfig.getInt("MaxNewbieBuffLevel", 0);
|
||||||
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
DELETE_DAYS = characterConfig.getInt("DeleteCharAfterDays", 1);
|
||||||
|
DISCONNECT_AFTER_DEATH = characterConfig.getBoolean("DisconnectAfterDeath", true);
|
||||||
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
PARTY_XP_CUTOFF_METHOD = characterConfig.getString("PartyXpCutoffMethod", "level").toLowerCase();
|
||||||
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
PARTY_XP_CUTOFF_PERCENT = characterConfig.getDouble("PartyXpCutoffPercent", 3);
|
||||||
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
PARTY_XP_CUTOFF_LEVEL = characterConfig.getInt("PartyXpCutoffLevel", 20);
|
||||||
|
|||||||
+9
@@ -50,6 +50,7 @@ import org.l2jmobius.gameserver.ai.CtrlIntention;
|
|||||||
import org.l2jmobius.gameserver.cache.RelationCache;
|
import org.l2jmobius.gameserver.cache.RelationCache;
|
||||||
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
import org.l2jmobius.gameserver.data.xml.CategoryData;
|
||||||
import org.l2jmobius.gameserver.data.xml.NpcData;
|
import org.l2jmobius.gameserver.data.xml.NpcData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.SendMessageLocalisationData;
|
||||||
import org.l2jmobius.gameserver.data.xml.SkillData;
|
import org.l2jmobius.gameserver.data.xml.SkillData;
|
||||||
import org.l2jmobius.gameserver.data.xml.TransformData;
|
import org.l2jmobius.gameserver.data.xml.TransformData;
|
||||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||||
@@ -141,6 +142,7 @@ import org.l2jmobius.gameserver.model.stats.MoveType;
|
|||||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||||
|
import org.l2jmobius.gameserver.network.Disconnection;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
import org.l2jmobius.gameserver.network.serverpackets.Attack;
|
||||||
@@ -566,6 +568,12 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
* <font color=#FF0000><b><u>Caution</u>: This method DOESN'T SEND Server->Client packets to players</b></font>
|
||||||
*/
|
*/
|
||||||
public void onDecay()
|
public void onDecay()
|
||||||
|
{
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && isPlayer())
|
||||||
|
{
|
||||||
|
Disconnection.of(getActingPlayer()).deleteMe().defaultSequence(new SystemMessage(SendMessageLocalisationData.getLocalisation(getActingPlayer(), "60 min. have passed after the death of your character, so you were disconnected from the game.")));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
decayMe();
|
decayMe();
|
||||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||||
@@ -588,6 +596,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
onCreatureSkillFinishCast = null;
|
onCreatureSkillFinishCast = null;
|
||||||
onCreatureSkillUse = null;
|
onCreatureSkillUse = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSpawn()
|
public void onSpawn()
|
||||||
|
|||||||
+11
@@ -353,6 +353,7 @@ import org.l2jmobius.gameserver.network.serverpackets.elementalspirits.Elemental
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.vip.ReceiveVipInfo;
|
||||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||||
|
import org.l2jmobius.gameserver.taskmanager.DecayTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.ItemsAutoDestroyTaskManager;
|
||||||
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
import org.l2jmobius.gameserver.taskmanager.PlayerAutoSaveTaskManager;
|
||||||
@@ -5063,6 +5064,11 @@ public class Player extends Playable
|
|||||||
setReputation(newRep < -20 ? newRep : 0);
|
setReputation(newRep < -20 ? newRep : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().add(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10143,6 +10149,11 @@ public class Player extends Playable
|
|||||||
{
|
{
|
||||||
super.doRevive();
|
super.doRevive();
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH)
|
||||||
|
{
|
||||||
|
DecayTaskManager.getInstance().cancel(this);
|
||||||
|
}
|
||||||
|
|
||||||
sendPacket(new EtcStatusUpdate(this));
|
sendPacket(new EtcStatusUpdate(this));
|
||||||
_revivePet = false;
|
_revivePet = false;
|
||||||
_reviveRequested = 0;
|
_reviveRequested = 0;
|
||||||
|
|||||||
+5
@@ -89,6 +89,11 @@ public class DecayTaskManager implements Runnable
|
|||||||
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
delay += Config.SPOILED_CORPSE_EXTEND_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Config.DISCONNECT_AFTER_DEATH && creature.isPlayer())
|
||||||
|
{
|
||||||
|
delay = 3600; // 1 hour
|
||||||
|
}
|
||||||
|
|
||||||
// Add to decay schedules.
|
// Add to decay schedules.
|
||||||
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
DECAY_SCHEDULES.put(creature, System.currentTimeMillis() + (delay * 1000));
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user