Command Post instance cleanup.

This commit is contained in:
MobiusDevelopment
2021-12-22 23:19:38 +00:00
parent 595a4831ca
commit 74a110a5cd
10 changed files with 2060 additions and 2130 deletions

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}

View File

@@ -132,7 +132,9 @@ public class CommandPost extends AbstractInstance
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
if (event.contains("enterInstance"))
switch (event)
{
case "enterInstance":
{
final Party party = player.getParty();
if (player.isInParty())
@@ -187,8 +189,9 @@ public class CommandPost extends AbstractInstance
{
startQuestTimer("check_status", 3000, null, player);
}
break;
}
else if (event.equals("check_status"))
case "check_status":
{
final Instance world = player.getInstanceWorld();
if (!isInInstance(world))
@@ -343,10 +346,10 @@ public class CommandPost extends AbstractInstance
}
case 7:
{
if (world.getAliveNpcs(GROUP_4).isEmpty())
{
System.out.println("Status is 7.");
}
// if (world.getAliveNpcs(GROUP_4).isEmpty())
// {
// System.out.println("Status is 7.");
// }
startQuestTimer("check_status", 3000, null, player);
break;
@@ -356,6 +359,8 @@ public class CommandPost extends AbstractInstance
startQuestTimer("check_status", 3000, null, player);
}
}
break;
}
}
return null;
}
@@ -366,27 +371,12 @@ public class CommandPost extends AbstractInstance
final Instance world = npc.getInstanceWorld();
if (world != null)
{
npc.setInvul(false);
npc.setTargetable(true);
if (CommonUtil.contains(GROUP_1, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
world.setStatus(4);
}
else if (CommonUtil.contains(GROUP_2, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_3, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
else if (CommonUtil.contains(GROUP_4, npc.getId()))
{
npc.setInvul(false);
npc.setTargetable(true);
}
}
super.onMoveFinished(npc);
}
@@ -395,6 +385,8 @@ public class CommandPost extends AbstractInstance
public String onEnterZone(Creature creature, ZoneType zone)
{
final Instance world = creature.getInstanceWorld();
if (world != null)
{
switch (zone.getId())
{
case 25901:
@@ -423,6 +415,7 @@ public class CommandPost extends AbstractInstance
break;
}
}
}
return super.onEnterZone(creature, zone);
}