}
int MyObjectId = activeChar.getObjectId();
Long MyStoreId = activeChar.getStoredId();
for(Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class))
{
activeChar.sendPacket(new ExCastleState(castle));
}
synchronized (_lock)
{
for (Player cha : GameObjectsStorage.getAllPlayersForIterate())
{
if (MyStoreId.equals(cha.getStoredId()))
{
continue;
}
try
{
if (cha.getObjectId() == MyObjectId)
{
_log.warn("Double EnterWorld for char: " + activeChar.getName());
cha.kick();
}
}
catch (Exception e)
{
_log.error("", e);
}
}
}
GameStats.incrementPlayerEnterGame();
boolean first = activeChar.entering;
if (first)
{
activeChar.setOnlineStatus(true);
if (activeChar.getPlayerAccess().GodMode && !Config.SHOW_GM_LOGIN)
{
activeChar.setInvisibleType(InvisibleType.NORMAL);
}
activeChar.setNonAggroTime(Long.MAX_VALUE);
activeChar.spawnMe();
if (activeChar.isInStoreMode())
{
if (!TradeHelper.checksIfCanOpenStore(activeChar, activeChar.getPrivateStoreType()))
{
activeChar.setPrivateStoreType(Player.STORE_PRIVATE_NONE);
activeChar.standUp();
activeChar.broadcastCharInfo();
}
}
activeChar.setRunning();
activeChar.standUp();
activeChar.startTimers();
}
activeChar.sendPacket(new ExBR_PremiumState(activeChar, activeChar.hasBonus()));
activeChar.getMacroses().sendUpdate(0x01, 0, true);
activeChar.sendPacket(new SSQInfo(), new HennaInfo(activeChar));
activeChar.sendItemList(false);
activeChar.sendPacket(new ShortCutInit(activeChar));
activeChar.sendPacket(new ShortCutInit(activeChar), new SkillList(activeChar), new SkillCoolTime(activeChar));
activeChar.sendPacket(new SkillCoolTime(activeChar));
//activeChar.sendPacket(new ExCastleState(_castle));
activeChar.sendPacket(new ExVitalityEffectInfo(activeChar));
for(Castle castle : ResidenceHolder.getInstance().getResidenceList(Castle.class))
{
activeChar.sendPacket(new ExCastleState(castle));
}
activeChar.sendPacket(SystemMsg.WELCOME_TO_THE_WORLD_OF_LINEAGE_II);
Announcements.getInstance().showAnnouncements(activeChar);
if (first)
{