Fixed visible GM characters.

This commit is contained in:
MobiusDevelopment
2019-08-17 23:03:45 +00:00
parent bfeaf1cd7c
commit e8987367c0
28 changed files with 575 additions and 616 deletions
@@ -10459,6 +10459,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -154,7 +154,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -168,17 +168,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -216,7 +209,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -421,7 +413,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10466,6 +10466,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -159,7 +159,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -173,17 +173,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -221,7 +214,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10468,6 +10468,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -159,7 +159,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -173,17 +173,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -221,7 +214,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10458,6 +10458,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -159,7 +159,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -173,17 +173,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -221,7 +214,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10448,6 +10448,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -157,7 +157,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -171,17 +171,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -219,7 +212,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10451,8 +10451,11 @@ public class PlayerInstance extends Playable
// send info to nearby players // send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player -> World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{ {
sendInfo(player); sendInfo(player);
}
}); });
} }
@@ -157,7 +157,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -171,17 +171,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -219,7 +212,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10457,8 +10457,11 @@ public class PlayerInstance extends Playable
// send info to nearby players // send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player -> World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{ {
sendInfo(player); sendInfo(player);
}
}); });
} }
@@ -157,7 +157,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -171,17 +171,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -219,7 +212,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -426,7 +418,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -585,8 +585,6 @@ public class EnterWorld extends GameClientPacket
private void EnterGM(PlayerInstance player) private void EnterGM(PlayerInstance player)
{ {
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -628,7 +626,6 @@ public class EnterWorld extends GameClientPacket
GmListTable.getInstance().addGm(player, true); GmListTable.getInstance().addGm(player, true);
} }
} }
}, 15);
if (Config.GM_SPECIAL_EFFECT) if (Config.GM_SPECIAL_EFFECT)
{ {
@@ -17,7 +17,6 @@
package org.l2jmobius.gameserver.network.clientpackets; package org.l2jmobius.gameserver.network.clientpackets;
import org.l2jmobius.Config; import org.l2jmobius.Config;
import org.l2jmobius.commons.concurrent.ThreadPool;
import org.l2jmobius.commons.network.PacketReader; import org.l2jmobius.commons.network.PacketReader;
import org.l2jmobius.gameserver.LoginServerThread; import org.l2jmobius.gameserver.LoginServerThread;
import org.l2jmobius.gameserver.SevenSigns; import org.l2jmobius.gameserver.SevenSigns;
@@ -149,6 +148,8 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
{ {
@@ -163,17 +164,10 @@ public class EnterWorld implements IClientIncomingPacket
} }
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -210,7 +204,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(); player.refreshOverloaded();
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -434,7 +427,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10394,6 +10394,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -423,7 +415,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10401,6 +10401,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -423,7 +415,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10386,6 +10386,15 @@ public class PlayerInstance extends Playable
{ {
sendPacket(new ExStartScenePlayer(_movieHolder.getMovie())); sendPacket(new ExStartScenePlayer(_movieHolder.getMovie()));
} }
// send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{
sendInfo(player);
}
});
} }
@Override @Override
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -425,7 +417,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10416,8 +10416,11 @@ public class PlayerInstance extends Playable
// send info to nearby players // send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player -> World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{ {
sendInfo(player); sendInfo(player);
}
}); });
} }
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -425,7 +417,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10416,8 +10416,11 @@ public class PlayerInstance extends Playable
// send info to nearby players // send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player -> World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{ {
sendInfo(player); sendInfo(player);
}
}); });
} }
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -425,7 +417,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();
@@ -10416,8 +10416,11 @@ public class PlayerInstance extends Playable
// send info to nearby players // send info to nearby players
World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player -> World.getInstance().forEachVisibleObject(this, PlayerInstance.class, player ->
{
if (isVisibleFor(player))
{ {
sendInfo(player); sendInfo(player);
}
}); });
} }
@@ -156,7 +156,7 @@ public class EnterWorld implements IClientIncomingPacket
client.setClientTracert(tracert); client.setClientTracert(tracert);
player.broadcastUserInfo(); player.spawnMe(player.getX(), player.getY(), player.getZ());
// Restore to instanced area if enabled // Restore to instanced area if enabled
if (Config.RESTORE_PLAYER_INSTANCE) if (Config.RESTORE_PLAYER_INSTANCE)
@@ -170,17 +170,10 @@ public class EnterWorld implements IClientIncomingPacket
vars.remove("INSTANCE_RESTORE"); vars.remove("INSTANCE_RESTORE");
} }
// if (World.getInstance().findObject(player.getObjectId()) != null)
// {
// LOGGER.warning("User already exists in Object ID map! User " + player.getName() + " is a character clone.");
// }
player.updatePvpTitleAndColor(false); player.updatePvpTitleAndColor(false);
// Apply special GM properties to the GM when entering // Apply special GM properties to the GM when entering
if (player.isGM()) if (player.isGM())
{
ThreadPool.schedule(() -> // Needs a small delay.
{ {
gmStartupProcess: gmStartupProcess:
{ {
@@ -218,7 +211,6 @@ public class EnterWorld implements IClientIncomingPacket
player.refreshOverloaded(true); player.refreshOverloaded(true);
} }
} }
}, 15);
if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel())) if (Config.GM_STARTUP_AUTO_LIST && AdminData.getInstance().hasAccess("admin_gmliston", player.getAccessLevel()))
{ {
@@ -425,7 +417,6 @@ public class EnterWorld implements IClientIncomingPacket
player.setSpawnProtection(true); player.setSpawnProtection(true);
} }
player.spawnMe(player.getX(), player.getY(), player.getZ());
player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading())); player.sendPacket(new ExRotation(player.getObjectId(), player.getHeading()));
player.getInventory().applyItemSkills(); player.getInventory().applyItemSkills();