- Timestamp:
- Jan 16, 2012 7:56:19 AM (4 months ago)
- Location:
- trunk/L2J_DataPack
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
dist/game/data/scripts/instances/Kamaloka/Kamaloka.java (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/L2J_DataPack
- Property svn:mergeinfo changed
/branches/unstable/L2J_DataPack_BETA merged: 8407-8426,8428-8480,8482-8491,8493-8588,8590-8629
- Property svn:mergeinfo changed
-
trunk/L2J_DataPack/dist/game/data/scripts/instances/Kamaloka/Kamaloka.java
r8406 r8630 440 440 if (party == null) 441 441 { 442 player.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.NOT_IN_PARTY_CANT_ENTER));442 player.sendPacket(SystemMessageId.NOT_IN_PARTY_CANT_ENTER); 443 443 return false; 444 444 } … … 446 446 if (party.getLeader() != player) 447 447 { 448 player.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER));448 player.sendPacket(SystemMessageId.ONLY_PARTY_LEADER_CAN_ENTER); 449 449 return false; 450 450 } … … 452 452 if (party.getMemberCount() > MAX_PARTY_SIZE[index]) 453 453 { 454 player.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER));454 player.sendPacket(SystemMessageId.PARTY_EXCEEDED_THE_LIMIT_CANT_ENTER); 455 455 return false; 456 456 } … … 488 488 { 489 489 // find instance with same name (kamaloka or labyrinth) 490 // TODO: Zoey76: Don't use instance name, use other system. 490 491 if (!instanceName.equals(InstanceManager.getInstance().getInstanceIdName(id))) 491 492 continue; … … 579 580 || world.templateId != templateId) 580 581 { 581 player.sendPacket(SystemMessage .getSystemMessage(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER));582 player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER); 582 583 return; 583 584 } … … 600 601 } 601 602 // 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)) 643 604 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; 645 643 } 646 644 … … 661 659 662 660 SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.INSTANT_ZONE_S1_RESTRICTED); 663 sm.add String(InstanceManager.getInstance().getInstanceIdName(world.templateId));661 sm.addInstanceName(world.templateId); 664 662 665 663 // set instance reenter time for all allowed players … … 824 822 if (player.isInParty() && player.getParty().isLeader(player)) 825 823 return "32496.htm"; 826 else 827 return "32496-no.htm"; 828 } 829 824 return "32496-no.htm"; 825 } 830 826 return ""; 831 827 }
Note: See TracChangeset
for help on using the changeset viewer.
