- Хроники
- Fafurion
- Исходники
- Присутствуют
- Сборка
- овер
Собственно перевел сервер с 166 на 196 протокол (фафурион), после этого при попытке входа в игру просто висит черный экран. Проверил большинство пакетов, задействованных при входе в игру и не нашел в них никаких изменений. Возможно какой-то пакет который раньше необязательно было отправлять теперь обязателен или еще какая хрень. Буду рад если кто поможет, заранее всем спасибо.
Код:
public static void onEnterWorld(Player activeChar)
{
boolean first = activeChar.entering;
activeChar.sendPacket(ExLightingCandleEvent.DISABLED);
//TODO: activeChar.sendPacket(new ExChannlChatEnterWorld(activeChar));
//TODO: activeChar.sendPacket(new ExChannlChatPlegeInfo(activeChar));
activeChar.sendPacket(new ExEnterWorldPacket());
activeChar.sendPacket(ExConnectedTimeAndGettableReward.STATIC);
activeChar.sendPacket(new ExPeriodicHenna(activeChar));
activeChar.sendPacket(new HennaInfoPacket(activeChar));
List<Castle> castleList = ResidenceHolder.getInstance().getResidenceList(Castle.class);
for(Castle c : castleList)
activeChar.sendPacket(new ExCastleState(c));
activeChar.sendSkillList();
activeChar.sendPacket(new EtcStatusUpdatePacket(activeChar));
activeChar.sendPacket(new UIPacket(activeChar));
activeChar.sendPacket(new ExUserInfoInvenWeight(activeChar));
activeChar.sendPacket(new ExUserInfoEquipSlot(activeChar));
activeChar.sendPacket(new ExUserInfoCubic(activeChar));
activeChar.sendPacket(new ExUserInfoAbnormalVisualEffect(activeChar));
// Send SubClass Info
//player.sendPacket(new ExSubjobInfo(player, SubclassInfoType.NO_CHANGES));
activeChar.sendPacket(SystemMsg.WELCOME_TO_THE_WORLD_OF_LINEAGE_II);
double mpCostDiff = activeChar.getMPCostDiff(Skill.SkillMagicType.PHYSIC);
if(mpCostDiff != 0)
activeChar.sendPacket(new ExChangeMPCost(Skill.SkillMagicType.PHYSIC, mpCostDiff));
mpCostDiff = activeChar.getMPCostDiff(Skill.SkillMagicType.MAGIC);
if(mpCostDiff != 0)
activeChar.sendPacket(new ExChangeMPCost(Skill.SkillMagicType.MAGIC, mpCostDiff));
mpCostDiff = activeChar.getMPCostDiff(Skill.SkillMagicType.MUSIC);
if(mpCostDiff != 0)
activeChar.sendPacket(new ExChangeMPCost(Skill.SkillMagicType.MUSIC, mpCostDiff));
activeChar.sendPacket(new QuestListPacket(activeChar));
activeChar.initActiveAutoShots();
activeChar.sendPacket(new ExGetBookMarkInfoPacket(activeChar));
activeChar.sendItemList(false);
activeChar.sendPacket(new ExAdenaInvenCount(activeChar));
activeChar.sendPacket(new ShortCutInitPacket(activeChar));
activeChar.sendPacket(new ExBasicActionList(activeChar));
activeChar.getMacroses().sendMacroses();
Announcements.getInstance().showAnnouncements(activeChar);
if(first)
{
activeChar.setOnlineStatus(true);
if(activeChar.getPlayerAccess().GodMode && !Config.SHOW_GM_LOGIN && !Config.EVERYBODY_HAS_ADMIN_RIGHTS)
{
activeChar.setGMInvisible(true);
activeChar.startAbnormalEffect(AbnormalEffect.STEALTH);
}
activeChar.setNonAggroTime(Long.MAX_VALUE);
activeChar.setNonPvpTime(System.currentTimeMillis() + Config.NONPVP_TIME_ONTELEPORT);
if(activeChar.isInBuffStore())
{
activeChar.setPrivateStoreType(Player.STORE_PRIVATE_NONE);
}
else if(activeChar.isInStoreMode())
{
if(!TradeHelper.validateStore(activeChar))
{
activeChar.setPrivateStoreType(Player.STORE_PRIVATE_NONE);
activeChar.storePrivateStore();
}
}
activeChar.setRunning();
activeChar.standUp();
activeChar.spawnMe();
activeChar.startTimers();
}
activeChar.sendPacket(new ExBR_PremiumStatePacket(activeChar, activeChar.hasPremiumAccount()));
activeChar.sendPacket(new ExSetCompassZoneCode(activeChar));
//TODO: Исправить посылаемые данные.
activeChar.sendPacket(new MagicAndSkillList(activeChar, 3503292, 730502));
activeChar.sendPacket(new ExStorageMaxCountPacket(activeChar));
activeChar.getAttendanceRewards().onEnterWorld();
activeChar.sendPacket(new ExReceiveShowPostFriend(activeChar));
if(Config.ALLOW_WORLD_CHAT)
activeChar.sendPacket(new ExWorldChatCnt(activeChar));
if(Config.EX_USE_PRIME_SHOP)
{
activeChar.sendPacket(new ExBR_NewIConCashBtnWnd(activeChar));
activeChar.sendPacket(new ReciveVipInfo(activeChar));
}
activeChar.sendPacket(new ExElementalSpiritInfo(activeChar, 0));
if(!Config.EX_COSTUME_DISABLE)
activeChar.sendPacket(new ExCostumeShortcutList(activeChar));
checkNewMail(activeChar);
if(first)
activeChar.getListeners().onEnter();
activeChar.checkAndDeleteOlympiadItems();
if(activeChar.getClan() != null)
{
activeChar.getClan().loginClanCond(activeChar, true);
activeChar.sendPacket(activeChar.getClan().listAll());
activeChar.sendPacket(new PledgeSkillListPacket(activeChar.getClan()));
}
else
activeChar.sendPacket(new ExPledgeCount(0));
// engage and notify Partner
if(first && Config.ALLOW_WEDDING)
{
CoupleManager.getInstance().engage(activeChar);
CoupleManager.getInstance().notifyPartner(activeChar);
}
if(first)
{
activeChar.getFriendList().notifyFriends(true);
//activeChar.restoreDisableSkills(); Зачем дважды ресторить откат скиллов?
}
activeChar.checkHpMessages(activeChar.getMaxHp(), activeChar.getCurrentHp());
activeChar.checkDayNightMessages();
if(Config.SHOW_HTML_WELCOME)
{
String html = HtmCache.getInstance().getHtml("welcome.htm", activeChar);
HtmlMessage msg = new HtmlMessage(5);
msg.setHtml(HtmlUtils.bbParse(html));
activeChar.sendPacket(msg);
}
if(Config.PETITIONING_ALLOWED)
PetitionManager.getInstance().checkPetitionMessages(activeChar);
if(!first)
{
CreatureSkillCast skillCast = activeChar.getSkillCast(SkillCastingType.NORMAL);
if(skillCast.isCastingNow())
{
Creature castingTarget = skillCast.getTarget();
SkillEntry castingSkillEntry = skillCast.getSkillEntry();
long animationEndTime = skillCast.getAnimationEndTime();
if(castingSkillEntry != null && !castingSkillEntry.getTemplate().isNotBroadcastable() && castingTarget != null && castingTarget.isCreature() && animationEndTime > 0)
activeChar.sendPacket(new MagicSkillUse(activeChar, castingTarget, castingSkillEntry.getId(), castingSkillEntry.getLevel(), (int) (animationEndTime - System.currentTimeMillis()), 0, SkillCastingType.NORMAL));
}
skillCast = activeChar.getSkillCast(SkillCastingType.NORMAL_SECOND);
if(skillCast.isCastingNow())
{
Creature castingTarget = skillCast.getTarget();
SkillEntry castingSkillEntry = skillCast.getSkillEntry();
long animationEndTime = skillCast.getAnimationEndTime();
if(castingSkillEntry != null && !castingSkillEntry.getTemplate().isNotBroadcastable() && castingTarget != null && castingTarget.isCreature() && animationEndTime > 0)
activeChar.sendPacket(new MagicSkillUse(activeChar, castingTarget, castingSkillEntry.getId(), castingSkillEntry.getLevel(), (int) (animationEndTime - System.currentTimeMillis()), 0, SkillCastingType.NORMAL_SECOND));
}
if(activeChar.isInBoat())
activeChar.sendPacket(activeChar.getBoat().getOnPacket(activeChar, activeChar.getInBoatPosition()));
if(activeChar.getMovement().isMoving() || activeChar.getMovement().isFollow())
activeChar.sendPacket(activeChar.movePacket());
if(activeChar.getMountNpcId() != 0)
activeChar.sendPacket(new RidePacket(activeChar));
if(activeChar.isFishing())
activeChar.getFishing().stop();
}
activeChar.entering = false;
if(activeChar.isSitting())
activeChar.sendPacket(new ChangeWaitTypePacket(activeChar, ChangeWaitTypePacket.WT_SITTING));
if(activeChar.isInStoreMode())
activeChar.sendPacket(activeChar.getPrivateStoreMsgPacket(activeChar));
activeChar.unsetVar("offline");
activeChar.unsetVar("offlinebuff");
activeChar.unsetVar("offlinebuff_price");
activeChar.unsetVar("offlinebuff_skills");
activeChar.unsetVar("offlinebuff_title");
OfflineBufferManager.getInstance().getBuffStores().remove(activeChar.getObjectId());
// на всякий случай
activeChar.sendActionFailed();
if(first && activeChar.isGM() && Config.SAVE_GM_EFFECTS && activeChar.getPlayerAccess().CanUseGMCommand)
{
//silence
if(activeChar.getVarBoolean("gm_silence"))
{
activeChar.setMessageRefusal(true);
activeChar.sendPacket(SystemMsg.MESSAGE_REFUSAL_MODE);
}
//invul
if(activeChar.getVarBoolean("gm_invul"))
{
activeChar.getFlags().getInvulnerable().start();
activeChar.startAbnormalEffect(AbnormalEffect.INVINCIBILITY);
activeChar.sendMessage(activeChar.getName() + " is now immortal.");
}
//undying
if(activeChar.getVarBoolean("gm_undying"))
{
activeChar.setGMUndying(true);
activeChar.sendMessage("Undying state has been enabled.");
}
//gmspeed
activeChar.setGmSpeed(activeChar.getVarInt("gm_gmspeed", 0));
}
PlayerMessageStack.getInstance().CheckMessages(activeChar);
IntObjectPair<OnAnswerListener> entry = activeChar.getAskListener(false);
if(entry != null && entry.getValue() instanceof ReviveAnswerListener)
activeChar.sendPacket(new ConfirmDlgPacket(SystemMsg.C1_IS_MAKING_AN_ATTEMPT_TO_RESURRECT_YOU_IF_YOU_CHOOSE_THIS_PATH_S2_EXPERIENCE_WILL_BE_RETURNED_FOR_YOU, 0).addString("Other player").addString("some"));
if(!first)
{
//Персонаж вылетел во время просмотра
if(activeChar.isInObserverMode())
{
if(activeChar.getObserverMode() == Player.OBSERVER_LEAVING)
activeChar.returnFromObserverMode();
else
activeChar.leaveObserverMode();
}
else if(activeChar.isVisible())
World.showObjectsToPlayer(activeChar);
final List<Servitor> servitors = activeChar.getServitors();
for(Servitor servitor : servitors)
activeChar.sendPacket(new MyPetSummonInfoPacket(servitor));
if(activeChar.isInParty())
{
Party party = activeChar.getParty();
Player leader = party.getPartyLeader();
if(leader != null) // некрасиво, но иначе NPE.
{
//sends new member party window for all members
//we do all actions before adding member to a list, this speeds things up a little
activeChar.sendPacket(new PartySmallWindowAllPacket(party, leader, activeChar));
RelationChangedPacket rcp = new RelationChangedPacket();
for(Player member : party.getPartyMembers())
{
if(member != activeChar)
{
activeChar.sendPacket(new PartySpelledPacket(member, true));
for(Servitor servitor : servitors)
activeChar.sendPacket(new PartySpelledPacket(servitor, true));
rcp.add(member, activeChar);
for(Servitor servitor : member.getServitors())
rcp.add(servitor, activeChar);
for(Servitor servitor : servitors)
servitor.broadcastCharInfoImpl(activeChar, NpcInfoType.VALUES);
}
}
activeChar.sendPacket(rcp);
// Если партия уже в СС, то вновь прибывшем посылаем пакет открытия окна СС
if(party.isInCommandChannel())
activeChar.sendPacket(ExOpenMPCCPacket.STATIC);
}
}
activeChar.sendActiveAutoShots();
for(Abnormal e : activeChar.getAbnormalList())
{
if(e.getSkill().isToggle() && !e.getSkill().isNotBroadcastable())
activeChar.sendPacket(new MagicSkillLaunchedPacket(activeChar.getObjectId(), e.getSkill().getId(), e.getSkill().getLevel(), activeChar, SkillCastingType.NORMAL));
}
activeChar.broadcastCharInfo();
}
if(activeChar.isDead())
activeChar.sendPacket(new DiePacket(activeChar));
activeChar.updateAbnormalIcons();
activeChar.updateStats();
if(Config.ALT_PCBANG_POINTS_ENABLED)
{
if(!Config.ALT_PCBANG_POINTS_ONLY_PREMIUM || activeChar.hasPremiumAccount())
activeChar.sendPacket(new ExPCCafePointInfoPacket(activeChar, 0, 1, 2, 12));
}
activeChar.checkLevelUpReward(true);
if(first)
{
activeChar.useTriggers(activeChar, TriggerType.ON_ENTER_WORLD, null, null, 0);
for(ListenerHook hook : ListenerHook.getGlobalListenerHooks(ListenerHookType.PLAYER_ENTER_GAME))
hook.onPlayerEnterGame(activeChar);
if(Config.ALLOW_IP_LOCK && Config.AUTO_LOCK_IP_ON_LOGIN)
GameServer.getInstance().getAuthServerCommunication().sendPacket(new ChangeAllowedIp(activeChar.getAccountName(), activeChar.getIP()));
if(Config.ALLOW_HWID_LOCK && Config.AUTO_LOCK_HWID_ON_LOGIN)
{
GameClient client = activeChar.getNetConnection();
if(client != null)
GameServer.getInstance().getAuthServerCommunication().sendPacket(new ChangeAllowedHwid(activeChar.getAccountName(), client.getHWID()));
}
}
activeChar.getInventory().checkItems();
}
private static void checkNewMail(Player activeChar)
{
activeChar.sendPacket(new ExUnReadMailCount(activeChar));
for(Mail mail : MailDAO.getInstance().getReceivedMailByOwnerId(activeChar.getObjectId()))
{
if(mail.isUnread())
{
activeChar.sendPacket(ExNoticePostArrived.STATIC_FALSE);
break;
}
}
}