Ignore:
Timestamp:
Jan 16, 2012 7:56:19 AM (4 months ago)
Author:
MELERIX
Message:

STABLE: Sync with BETA [8629]

Location:
trunk/L2J_DataPack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/L2J_DataPack

  • trunk/L2J_DataPack/dist/game/data/scripts/instances/Kamaloka/Kamaloka.java

    r8406 r8630  
    440440                if (party == null) 
    441441                { 
    442                         player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.NOT_IN_PARTY_CANT_ENTER)); 
     442                        player.sendPacket(SystemMessageId.NOT_IN_PARTY_CANT_ENTER); 
    443443                        return false; 
    444444                } 
     
    446446                if (party.getLeader() != player) 
    447447                { 
    448                         player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER)); 
     448                        player.sendPacket(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER); 
    449449                        return false; 
    450450                } 
     
    452452                if (party.getMemberCount() > MAX_PARTY_SIZE[index]) 
    453453                { 
    454                         player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER)); 
     454                        player.sendPacket(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER); 
    455455                        return false; 
    456456                } 
     
    488488                                { 
    489489                                        // find instance with same name (kamaloka or labyrinth) 
     490                                        // TODO: Zoey76: Don't use instance name, use other system. 
    490491                                        if (!instanceName.equals(InstanceManager.getInstance().getInstanceIdName(id))) 
    491492                                                continue; 
     
    579580                                        || world.templateId != templateId) 
    580581                        { 
    581                                 player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER)); 
     582                                player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER); 
    582583                                return; 
    583584                        } 
     
    600601                } 
    601602                // Creating new kamaloka instance 
    602                 else 
    603                 { 
    604                         if (!checkConditions(player, index)) 
    605                                 return; 
    606                          
    607                         // Creating dynamic instance without template 
    608                         final int instanceId = InstanceManager.getInstance().createDynamicInstance(null); 
    609                         final Instance inst = InstanceManager.getInstance().getInstance(instanceId); 
    610                         // set name for the kamaloka 
    611                         inst.setName(InstanceManager.getInstance().getInstanceIdName(templateId)); 
    612                         // set return location 
    613                         final int[] returnLoc = { player.getX(), player.getY(), player.getZ() }; 
    614                         inst.setSpawnLoc(returnLoc); 
    615                         // disable summon friend into instance 
    616                         inst.setAllowSummon(false); 
    617                         // set duration and empty destroy time 
    618                         inst.setDuration(DURATION[index] * 60000); 
    619                         inst.setEmptyDestroyTime(EMPTY_DESTROY_TIME * 60000); 
    620                          
    621                         // Creating new instanceWorld, using our instanceId and templateId 
    622                         world = new KamaWorld(); 
    623                         world.instanceId = instanceId; 
    624                         world.templateId = templateId; 
    625                         // set index for easy access to the arrays 
    626                         ((KamaWorld)world).index = index; 
    627                         InstanceManager.getInstance().addWorld(world); 
    628                         world.status = 0; 
    629                         // spawn npcs 
    630                         spawnKama((KamaWorld)world); 
    631                          
    632                         // and finally teleport party into instance 
    633                         final L2Party party = player.getParty(); 
    634                         for (L2PcInstance partyMember : party.getPartyMembers()) 
    635                         { 
    636                                 if (partyMember.getQuestState(qn) == null) 
    637                                         newQuestState(partyMember); 
    638                                 world.allowed.add(partyMember.getObjectId()); 
    639                                  
    640                                 removeBuffs(partyMember); 
    641                                 teleportPlayer(partyMember, TELEPORTS[index], instanceId); 
    642                         } 
     603                if (!checkConditions(player, index)) 
    643604                        return; 
    644                 } 
     605                 
     606                // Creating dynamic instance without template 
     607                final int instanceId = InstanceManager.getInstance().createDynamicInstance(null); 
     608                final Instance inst = InstanceManager.getInstance().getInstance(instanceId); 
     609                // set name for the kamaloka 
     610                inst.setName(InstanceManager.getInstance().getInstanceIdName(templateId)); 
     611                // set return location 
     612                final int[] returnLoc = { player.getX(), player.getY(), player.getZ() }; 
     613                inst.setSpawnLoc(returnLoc); 
     614                // disable summon friend into instance 
     615                inst.setAllowSummon(false); 
     616                // set duration and empty destroy time 
     617                inst.setDuration(DURATION[index] * 60000); 
     618                inst.setEmptyDestroyTime(EMPTY_DESTROY_TIME * 60000); 
     619                 
     620                // Creating new instanceWorld, using our instanceId and templateId 
     621                world = new KamaWorld(); 
     622                world.instanceId = instanceId; 
     623                world.templateId = templateId; 
     624                // set index for easy access to the arrays 
     625                ((KamaWorld)world).index = index; 
     626                InstanceManager.getInstance().addWorld(world); 
     627                world.status = 0; 
     628                // spawn npcs 
     629                spawnKama((KamaWorld)world); 
     630                 
     631                // and finally teleport party into instance 
     632                final L2Party party = player.getParty(); 
     633                for (L2PcInstance partyMember : party.getPartyMembers()) 
     634                { 
     635                        if (partyMember.getQuestState(qn) == null) 
     636                                newQuestState(partyMember); 
     637                        world.allowed.add(partyMember.getObjectId()); 
     638                         
     639                        removeBuffs(partyMember); 
     640                        teleportPlayer(partyMember, TELEPORTS[index], instanceId); 
     641                } 
     642                return; 
    645643        } 
    646644         
     
    661659                         
    662660                        SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_RESTRICTED); 
    663                         sm.addString(InstanceManager.getInstance().getInstanceIdName(world.templateId)); 
     661                        sm.addInstanceName(world.templateId); 
    664662                         
    665663                        // set instance reenter time for all allowed players 
     
    824822                        if (player.isInParty() && player.getParty().isLeader(player)) 
    825823                                return "32496.htm"; 
    826                         else 
    827                                 return "32496-no.htm"; 
    828                 } 
    829                  
     824                        return "32496-no.htm"; 
     825                } 
    830826                return ""; 
    831827        } 
Note: See TracChangeset for help on using the changeset viewer.