Browse Source

BETA: Removing useless class and package.
* Minor NPE vulnerability fix.

Zoey76 12 years ago
parent
commit
250932f8e8

+ 0 - 35
L2J_Server_BETA/java/com/l2jserver/gameserver/model/quest/jython/QuestJython.java

@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2004-2013 L2J Server
- * 
- * This file is part of L2J Server.
- * 
- * L2J Server is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- * 
- * L2J Server is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.quest.jython;
-
-import com.l2jserver.gameserver.model.quest.Quest;
-
-public abstract class QuestJython extends Quest
-{
-	/**
-	 * Constructor used in jython files.
-	 * @param questId : int designating the ID of the quest
-	 * @param name : String designating the name of the quest
-	 * @param descr : String designating the description of the quest
-	 */
-	public QuestJython(int questId, String name, String descr)
-	{
-		super(questId, name, descr);
-	}
-}

+ 5 - 2
L2J_Server_BETA/java/com/l2jserver/gameserver/network/clientpackets/RequestAcquireSkill.java

@@ -499,9 +499,12 @@ public final class RequestAcquireSkill extends L2GameClientPacket
 			player.sendPacket(new ExStorageMaxCount(player));
 		}
 		// Notify scripts of the skill learn.
-		for (Quest quest : trainer.getTemplate().getEventQuests(QuestEventType.ON_SKILL_LEARN))
+		if (trainer.getTemplate().getEventQuests().containsKey(QuestEventType.ON_SKILL_LEARN))
 		{
-			quest.notifyAcquireSkill(trainer, player, skill, _skillType);
+			for (Quest quest : trainer.getTemplate().getEventQuests(QuestEventType.ON_SKILL_LEARN))
+			{
+				quest.notifyAcquireSkill(trainer, player, skill, _skillType);
+			}
 		}
 	}