Преглед изворни кода

BETA: Core part required for [DP8277]

Zoey76 пре 13 година
родитељ
комит
fa8c027a6f
1 измењених фајлова са 18 додато и 1 уклоњено
  1. 18 1
      L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java

+ 18 - 1
L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/Quest.java

@@ -75,6 +75,7 @@ public class Quest extends ManagedScript
 	private final String _descr;
 	private final byte _initialState = State.CREATED;
 	protected boolean _onEnterWorld = false;
+	private boolean _isCustom = false;
 	// NOTE: questItemIds will be overridden by child classes.  Ideally, it should be
 	// protected instead of public.  However, quest scripts written in Jython will
 	// have trouble with protected, as Jython only knows private and public...
@@ -110,7 +111,7 @@ public class Quest extends ManagedScript
 		
 		if (questId != 0)
 		{
-			QuestManager.getInstance().addQuest(Quest.this);
+			QuestManager.getInstance().addQuest(this);
 		}
 		else
 		{
@@ -1966,4 +1967,20 @@ public class Quest extends ManagedScript
 	{
 		return _onEnterWorld;
 	}
+	
+	/**
+	 * @param val if true the quest script will be set as custom quest.
+	 */
+	public void setIsCustom(boolean val)
+	{
+		_isCustom = val;
+	}
+	
+	/**
+	 * @return true if the quest script is a custom quest.
+	 */
+	public boolean isCustomQuest()
+	{
+		return _isCustom;
+	}
 }