Ahmed 17 anni fa
parent
commit
6f2633df6c

+ 7 - 0
L2_GameServer_T1/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java

@@ -90,6 +90,12 @@ public class L2NpcBufferInstance extends L2NpcInstance
 
     		for (String buffGroupList : buffGroupArray)
     		{
+    			if (buffGroupList == null)
+            	{
+            		_log.warning("NPC Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected.");
+            		return;
+            	}
+    			
     			int buffGroup = Integer.parseInt(buffGroupList);
 
     			int[] npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup);
@@ -97,6 +103,7 @@ public class L2NpcBufferInstance extends L2NpcInstance
     			if (npcBuffGroupInfo == null)
     			{
     				_log.warning("NPC Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + playerInstance.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!");
+    				return;
     			}
 
     			int skillId = npcBuffGroupInfo[0];

+ 7 - 0
L2_GameServer_T1/java/net/sf/l2j/gameserver/model/actor/instance/L2OlympiadManagerInstance.java

@@ -167,12 +167,19 @@ public class L2OlympiadManagerInstance extends L2FolkInstance
         	NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
         	String[] params = command.split(" ");
         	
+        	if (params[1] == null)
+        	{
+        		_log.warning("Olympiad Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected.");
+        		return;
+        	}
         	int buffGroup = Integer.parseInt(params[1]);
+
     		int[] npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup);
     		
     		if (npcBuffGroupInfo == null)
     		{
     			_log.warning("Olympiad Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + player.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!");
+    			return;
     		}
     		
     		int skillId = npcBuffGroupInfo[0];