From 86eb97c035cad301c3a16cbf6cae39979e5d114d Mon Sep 17 00:00:00 2001
From: Kerberos <Kerberos@5288da4f-0efc-0310-bd40-8d490a2659fa>
Date: Fri, 12 Jun 2009 15:56:18 +0000
Subject: [PATCH] partial fix for #3415

---
 .../scripts/handlers/itemhandlers/BeastSoulShot.java  |  2 --
 .../data/scripts/handlers/itemhandlers/FishShots.java | 11 ++---------
 .../handlers/itemhandlers/ScrollOfResurrection.java   |  5 ++---
 3 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/datapack_development/data/scripts/handlers/itemhandlers/BeastSoulShot.java b/datapack_development/data/scripts/handlers/itemhandlers/BeastSoulShot.java
index 10580ecba0..5c3fc77ccd 100644
--- a/datapack_development/data/scripts/handlers/itemhandlers/BeastSoulShot.java
+++ b/datapack_development/data/scripts/handlers/itemhandlers/BeastSoulShot.java
@@ -52,9 +52,7 @@ public class BeastSoulShot implements IItemHandler
 			return;
 		}
 		else if (playable instanceof L2PcInstance)
-		{
 			activeOwner = (L2PcInstance) playable;
-		}
 		
 		if (activeOwner == null)
 			return;
diff --git a/datapack_development/data/scripts/handlers/itemhandlers/FishShots.java b/datapack_development/data/scripts/handlers/itemhandlers/FishShots.java
index 2aaedd2063..2c8d2baf5a 100644
--- a/datapack_development/data/scripts/handlers/itemhandlers/FishShots.java
+++ b/datapack_development/data/scripts/handlers/itemhandlers/FishShots.java
@@ -52,22 +52,18 @@ public class FishShots implements IItemHandler
 		L2Weapon weaponItem = activeChar.getActiveWeaponItem();
 		
 		if (weaponInst == null || weaponItem.getItemType() != L2WeaponType.ROD)
-		{
 			return;
-		}
 		
 		if (weaponInst.getChargedFishshot())
-		{
 			// spirit shot is already active
 			return;
-		}
 		
 		int FishshotId = item.getItemId();
 		int grade = weaponItem.getCrystalType();
 		long count = item.getCount();
 		
 		if ((grade == L2Item.CRYSTAL_NONE && FishshotId != 6535) || (grade == L2Item.CRYSTAL_D && FishshotId != 6536) || (grade == L2Item.CRYSTAL_C && FishshotId != 6537) || (grade == L2Item.CRYSTAL_B && FishshotId != 6538)
-				|| (grade == L2Item.CRYSTAL_A && FishshotId != 6539) || (grade == L2Item.CRYSTAL_S && FishshotId != 6540) || (grade == L2Item.CRYSTAL_S80 && FishshotId != 6540))
+				|| (grade == L2Item.CRYSTAL_A && FishshotId != 6539) || (FishshotId != 6540 && grade == L2Item.CRYSTAL_S ))
 		{
 			//1479 - This fishing shot is not fit for the fishing pole crystal.
 			activeChar.sendPacket(new SystemMessage(SystemMessageId.WRONG_FISHINGSHOT_GRADE));
@@ -75,17 +71,14 @@ public class FishShots implements IItemHandler
 		}
 		
 		if (count < 1)
-		{
 			return;
-		}
 		
 		weaponInst.setChargedFishshot(true);
 		activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
 		L2Object oldTarget = activeChar.getTarget();
 		activeChar.setTarget(activeChar);
 		
-		MagicSkillUse MSU = new MagicSkillUse(activeChar, SKILL_IDS[grade], 1, 0, 0);
-		Broadcast.toSelfAndKnownPlayers(activeChar, MSU);
+		Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUse(activeChar, SKILL_IDS[grade], 1, 0, 0));
 		activeChar.setTarget(oldTarget);
 	}
 }
diff --git a/datapack_development/data/scripts/handlers/itemhandlers/ScrollOfResurrection.java b/datapack_development/data/scripts/handlers/itemhandlers/ScrollOfResurrection.java
index 3a035ec74b..c3a8dfa080 100644
--- a/datapack_development/data/scripts/handlers/itemhandlers/ScrollOfResurrection.java
+++ b/datapack_development/data/scripts/handlers/itemhandlers/ScrollOfResurrection.java
@@ -55,7 +55,6 @@ public class ScrollOfResurrection implements IItemHandler
 		
 		int itemId = item.getItemId();
 		//boolean blessedScroll = (itemId != 737);
-		boolean humanScroll = (itemId == 3936 || itemId == 3959 || itemId == 737);
 		boolean petScroll = (itemId == 6387 || itemId == 737);
 		
 		// SoR Animation section
@@ -83,7 +82,7 @@ public class ScrollOfResurrection implements IItemHandler
 				if (targetPlayer != null)
 					castle = CastleManager.getInstance().getCastle(targetPlayer.getX(), targetPlayer.getY(), targetPlayer.getZ());
 				else
-					castle = CastleManager.getInstance().getCastle(targetPet.getX(), targetPet.getY(), targetPet.getZ());
+					castle = CastleManager.getInstance().getCastle(targetPet.getOwner().getX(), targetPet.getOwner().getY(), targetPet.getOwner().getZ());
 				
 				if (castle != null && castle.getSiege().getIsInProgress())
 				{
@@ -125,7 +124,7 @@ public class ScrollOfResurrection implements IItemHandler
 							activeChar.sendPacket(new SystemMessage(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED)); // Resurrection is already been proposed.
 						condGood = false;
 					}
-					else if (!humanScroll)
+					else if (petScroll)
 					{
 						condGood = false;
 						activeChar.sendMessage("You do not have the correct scroll");
-- 
GitLab