From 13afa62dd69f5205bc78174b4a4fee82d0c57453 Mon Sep 17 00:00:00 2001
From: Zoey76 <zoey_76@msn.com>
Date: Wed, 3 Apr 2013 03:58:31 +0000
Subject: [PATCH] BETA: Fixing fishing monsters.

Reported by: takhs7, d!go
---
 .../scripts/ai/group_template/WarriorFishingBlock.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/WarriorFishingBlock.java b/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/WarriorFishingBlock.java
index da09d9f195..4a4148c5ac 100644
--- a/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/WarriorFishingBlock.java
+++ b/L2J_DataPack_BETA/dist/game/data/scripts/ai/group_template/WarriorFishingBlock.java
@@ -21,6 +21,7 @@ package ai.group_template;
 import ai.npc.AbstractNpcAI;
 
 import com.l2jserver.gameserver.ai.CtrlEvent;
+import com.l2jserver.gameserver.model.L2Object;
 import com.l2jserver.gameserver.model.actor.L2Attackable;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -113,12 +114,14 @@ public class WarriorFishingBlock extends AbstractNpcAI
 			return null;
 		}
 		
-		if ((npc.getTarget() == null) || !npc.getTarget().isPlayer())
+		final L2Object target = npc.getTarget();
+		if ((target == null) || !target.isPlayer())
 		{
 			npc.deleteMe();
+			return null;
 		}
 		
-		final L2PcInstance player = npc.getTarget().getActingPlayer();
+		final L2PcInstance player = target.getActingPlayer();
 		final NpcSay say = new NpcSay(npc, Say2.NPC_ALL, NPC_STRINGS_ON_SPAWN[getRandom(NPC_STRINGS_ON_SPAWN.length)]);
 		say.addStringParameter(player.getName());
 		npc.broadcastPacket(say);
-- 
GitLab