From 31c22adb307342cc5f70d01fbc7fc2693e1f4666 Mon Sep 17 00:00:00 2001
From: Zoey76 <zoey_76@msn.com>
Date: Mon, 3 Mar 2014 17:09:56 +0000
Subject: [PATCH] BETA: Datapack part for [L6453].

---
 .../game/data/scripts/ai/npc/AvantGarde/AvantGarde.java     | 6 ++++--
 .../scripts/handlers/admincommandhandlers/AdminReload.java  | 6 +++---
 .../scripts/handlers/admincommandhandlers/AdminSpawn.java   | 2 +-
 .../data/scripts/handlers/telnethandlers/ReloadHandler.java | 2 +-
 .../data/scripts/quests/SagasScripts/SagasSuperClass.java   | 2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AvantGarde/AvantGarde.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AvantGarde/AvantGarde.java
index 96dc4c3f1c..12ee07de34 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AvantGarde/AvantGarde.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AvantGarde/AvantGarde.java
@@ -22,6 +22,8 @@ import com.l2jserver.gameserver.network.serverpackets.AcquireSkillList;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
 import com.l2jserver.gameserver.util.Util;
 
+import custom.Validators.SubClassSkills;
+
 /**
  * Avant-Garde AI.<br>
  * Sub-Class Certification system, skill learning and certification canceling.<br>
@@ -167,10 +169,10 @@ public class AvantGarde extends AbstractNpcAI
 				}
 				else
 				{
-					QuestState st = player.getQuestState("SubClassSkills");
+					QuestState st = player.getQuestState(SubClassSkills.class.getSimpleName());
 					if (st == null)
 					{
-						st = QuestManager.getInstance().getQuest("SubClassSkills").newQuestState(player);
+						st = QuestManager.getInstance().getQuest(SubClassSkills.class.getSimpleName()).newQuestState(player);
 					}
 					
 					int activeCertifications = 0;
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
index 5d8bf589b4..2f28dc0f4a 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java
@@ -112,8 +112,8 @@ public class AdminReload implements IAdminCommandHandler
 					}
 					else
 					{
-						QuestManager.getInstance().reloadAllQuests();
-						activeChar.sendMessage("All Quests have been reloaded.");
+						QuestManager.getInstance().reloadAllScripts();
+						activeChar.sendMessage("All scripts have been reloaded.");
 						AdminTable.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Quests.");
 					}
 					break;
@@ -121,7 +121,7 @@ public class AdminReload implements IAdminCommandHandler
 				case "walker":
 				{
 					WalkingManager.getInstance().load();
-					activeChar.sendMessage("All Walkers have been reloaded");
+					activeChar.sendMessage("All walkers have been reloaded");
 					AdminTable.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded Walkers.");
 					break;
 				}
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSpawn.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSpawn.java
index e4512c0b47..c562b4f1f1 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSpawn.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSpawn.java
@@ -242,7 +242,7 @@ public class AdminSpawn implements IAdminCommandHandler
 			RaidBossSpawnManager.getInstance().load();
 			AutoSpawnHandler.getInstance().reload();
 			SevenSigns.getInstance().spawnSevenSignsNPC();
-			QuestManager.getInstance().reloadAllQuests();
+			QuestManager.getInstance().reloadAllScripts();
 			AdminTable.getInstance().broadcastMessageToGMs("NPC Respawn completed!");
 		}
 		else if (command.startsWith("admin_spawn_monster") || command.startsWith("admin_spawn"))
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/telnethandlers/ReloadHandler.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/telnethandlers/ReloadHandler.java
index 8948154008..246222dd55 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/telnethandlers/ReloadHandler.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/telnethandlers/ReloadHandler.java
@@ -76,7 +76,7 @@ public class ReloadHandler implements ITelnetHandler
 				{
 					_print.print("Reloading npc templates... ");
 					NpcData.getInstance().load();
-					QuestManager.getInstance().reloadAllQuests();
+					QuestManager.getInstance().reloadAllScripts();
 					_print.println("done");
 				}
 				else if (type.equals("html"))
diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/SagasScripts/SagasSuperClass.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/SagasScripts/SagasSuperClass.java
index 5f5e89ee88..78f3258b38 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/SagasScripts/SagasSuperClass.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/SagasScripts/SagasSuperClass.java
@@ -1011,7 +1011,7 @@ public class SagasSuperClass extends Quest
 			{
 				continue;
 			}
-			QuestManager.getInstance().removeQuest(script);
+			QuestManager.getInstance().removeScript(script);
 		}
 		_scripts.clear();
 		return super.unload();
-- 
GitLab