Instances AI Failure on Player logout and login again!

Issue #243 resolved
ShinichiYao created an issue

For example: IceQueensCastleUltimateBattle

Player enter the instance, logout and login again. After that, ALL AI would not work on him.

This time no animations no on screen messages.

Which also means they can easily defeat Ultimate Freya with no AI no skills and no minions help!!!

Comments (8)

  1. ShinichiYao reporter

    Every instance has this issue. You should add them again:

            world.playersInside.add(player);
            world.addAllowed(player.getObjectId());
    
  2. ShinichiYao reporter

    No one even care about this huge bug?

    I try to add again playersInside but it cause normal player watch animation 2-3 times and lag if they died out and enter instance again.

  3. Gigiikun

    This should solve the problem:

    public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance)
        {
            final IQCNBWorld curworld = (IQCNBWorld) world;
            if (firstEntrance)
            {
                curworld.isHardMode = curworld.getTemplateId() == TEMPLATE_ID_ULTIMATE;
                if (!player.isInParty())
                {
                    managePlayerEnter(player, curworld);
                }
                else if (player.getParty().isInCommandChannel())
                {
                    for (L2PcInstance players : player.getParty().getCommandChannel().getMembers())
                    {
                        managePlayerEnter(players, curworld);
                    }
                }
                else
                {
                    for (L2PcInstance players : player.getParty().getMembers())
                    {
                        managePlayerEnter(players, curworld);
                    }
                }
            }
            else
            {
                Iterator<L2PcInstance> insideIterator = curworld.playersInside.iterator();
                while (insideIterator.hasNext())
                {
                    L2PcInstance insidePlayer = insideIterator.next();
                    if ((insidePlayer.getObjectId() == player.getObjectId()) && (insidePlayer != player))
                    {
                        insideIterator.remove();
                        curworld.playersInside.add(player);
                        break;
                    }
                }
                teleportPlayer(player, world.isStatus(4) ? BATTLE_PORT : ENTER_LOC[getRandom(ENTER_LOC.length)], world.getInstanceId());
            }
        }
    
  4. Log in to comment