Fixed issue with players re-appearing after logging off.

Contributed by Sahar.
This commit is contained in:
MobiusDevelopment 2021-08-27 19:46:00 +00:00
parent caa5749e6d
commit da9b0b310e
21 changed files with 258 additions and 216 deletions

View File

@ -10929,16 +10929,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10952,6 +10942,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10936,16 +10936,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10959,6 +10949,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10938,16 +10938,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10961,6 +10951,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10919,16 +10919,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10942,6 +10932,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10909,16 +10909,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10932,6 +10922,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10912,16 +10912,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10935,6 +10925,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10918,16 +10918,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10941,6 +10931,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10928,16 +10928,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10951,6 +10941,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -11044,16 +11044,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -11067,6 +11057,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -11070,16 +11070,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -11093,6 +11083,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -11188,12 +11188,6 @@ public class PlayerInstance extends Playable
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// Make sure player variables are stored.
getVariables().storeMe();
// Make sure account variables are stored.
getAccountVariables().storeMe();
// Set the online Flag to True or False and update the characters table of the database with online status and lastAccess (called when login and logout)
try
{
@ -11288,6 +11282,12 @@ public class PlayerInstance extends Playable
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// Make sure player variables are stored.
getVariables().storeMe();
// Make sure account variables are stored.
getAccountVariables().storeMe();
// Stop the HP/MP/CP Regeneration task (scheduled tasks)
try
{
@ -11338,16 +11338,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -11361,6 +11351,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (Olympiad.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
Olympiad.getInstance().removeDisconnectedCompetitor(this);

View File

@ -11231,16 +11231,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -11254,6 +11244,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10840,16 +10840,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10863,6 +10853,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10840,16 +10840,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10863,6 +10853,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10826,16 +10826,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10849,6 +10839,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10853,16 +10853,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10876,6 +10866,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10853,16 +10853,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10876,6 +10866,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10798,16 +10798,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10821,6 +10811,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10836,16 +10836,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10859,6 +10849,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -10970,16 +10970,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -10993,6 +10983,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);

View File

@ -11036,16 +11036,6 @@ public class PlayerInstance extends Playable
// Remove from world regions zones
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
// If a Party is in progress, leave it (and festival party)
if (isInParty())
{
@ -11059,6 +11049,18 @@ public class PlayerInstance extends Playable
}
}
stopCubics();
// Remove the PlayerInstance from the world
try
{
decayMe();
}
catch (Exception e)
{
LOGGER.log(Level.SEVERE, "deleteMe()", e);
}
if (OlympiadManager.getInstance().isRegistered(this) || (getOlympiadGameId() != -1))
{
OlympiadManager.getInstance().removeDisconnectedCompetitor(this);