Fixed put on armour task being inconsistent.

This commit is contained in:
NewGarbo 2015-10-29 13:44:11 +00:00
parent 0c5e34ad84
commit 66a4b148e1

View File

@ -179,8 +179,6 @@ public class TutorialGettingStarted extends Tutorial
final String oldTerritory = event.getLastTerritory();
final String newTerritory = event.getNewTerritory();
System.out.println(oldTerritory + ", " + newTerritory);
if (isInTutorial(player) && newTerritory.contains("Spawn") && get(player).hasFinishedTask(getTask("Viewing Clan Info")) && !get(player).hasFinishedTask(getTask("Leave Spawn")))
{
finishTask(player, "Leave Spawn");
@ -207,44 +205,6 @@ public class TutorialGettingStarted extends Tutorial
return true;
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryClick(final InventoryClickEvent event)
{
if (event.getWhoClicked() instanceof Player)
{
final Player player = (Player) event.getWhoClicked();
if (isInTutorial(player) && get(player).hasFinishedTask(getTask("Buy Armor")) && !get(player).hasFinishedTask(getTask("Equip Armor")))
{
final ClientClass clientclass = _clansManager.getClassManager().Get(player);
if (clientclass != null && clientclass.GetGameClass() != null)
{
finishTask(player, "Equip Armor");
}
}
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onInteract(final PlayerInteractEvent event)
{
if (event.getAction().name().contains("RIGHT_CLICK"))
{
final Player player = event.getPlayer();
if (isInTutorial(player) && get(player).hasFinishedTask(getTask("Buy Armor")) && !get(player).hasFinishedTask(getTask("Equip Armor")))
{
final ClientClass clientclass = _clansManager.getClassManager().Get(player);
if (clientclass != null && clientclass.GetGameClass() != null)
{
finishTask(player, "Equip Armor");
}
}
}
}
@EventHandler(priority = EventPriority.MONITOR)
public void onSkillTriggered(final SkillTriggerEvent event)
{
@ -261,15 +221,28 @@ public class TutorialGettingStarted extends Tutorial
{
if (event.getType().equals(UpdateType.SEC))
{
for (final TutorialClient tut : _inTutorial.values())
for (final TutorialClient client : _inTutorial.values())
{
if (isInTutorial(tut.getPlayer()) && get(tut.getPlayer()).hasFinishedTask(getTask("Use An Ability")) && !get(tut.getPlayer()).hasFinishedTask(getTask("Class Customization")))
if (isInTutorial(client.getPlayer()))
{
final ClientClass clientclass = _clansManager.getClassManager().Get(tut.getPlayer());
if (clientclass != null && clientclass.GetSavingCustomBuild() != null)
if (get(client.getPlayer()).hasFinishedTask(getTask("Use An Ability")) && !get(client.getPlayer()).hasFinishedTask(getTask("Class Customization")))
{
finishTask(tut.getPlayer(), "Class Customization");
final ClientClass clientclass = _clansManager.getClassManager().Get(client.getPlayer());
if (clientclass != null && clientclass.GetSavingCustomBuild() != null)
{
finishTask(client.getPlayer(), "Class Customization");
}
}
if (client.hasFinishedTask(getTask("Buy Armor")) && !client.hasFinishedTask(getTask("Equip Armor")))
{
final ClientClass clientclass = _clansManager.getClassManager().Get(client.getPlayer());
if (clientclass != null && clientclass.GetGameClass() != null)
{
finishTask(client.getPlayer(), "Equip Armor");
}
}
}
}