Skip to content
Snippets Groups Projects
Commit 86eb97c0 authored by Kerberos's avatar Kerberos
Browse files

partial fix for #3415

parent ee95dfb8
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,7 @@ public class BeastSoulShot implements IItemHandler ...@@ -52,9 +52,7 @@ public class BeastSoulShot implements IItemHandler
return; return;
} }
else if (playable instanceof L2PcInstance) else if (playable instanceof L2PcInstance)
{
activeOwner = (L2PcInstance) playable; activeOwner = (L2PcInstance) playable;
}
if (activeOwner == null) if (activeOwner == null)
return; return;
......
...@@ -52,22 +52,18 @@ public class FishShots implements IItemHandler ...@@ -52,22 +52,18 @@ public class FishShots implements IItemHandler
L2Weapon weaponItem = activeChar.getActiveWeaponItem(); L2Weapon weaponItem = activeChar.getActiveWeaponItem();
if (weaponInst == null || weaponItem.getItemType() != L2WeaponType.ROD) if (weaponInst == null || weaponItem.getItemType() != L2WeaponType.ROD)
{
return; return;
}
if (weaponInst.getChargedFishshot()) if (weaponInst.getChargedFishshot())
{
// spirit shot is already active // spirit shot is already active
return; return;
}
int FishshotId = item.getItemId(); int FishshotId = item.getItemId();
int grade = weaponItem.getCrystalType(); int grade = weaponItem.getCrystalType();
long count = item.getCount(); 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) 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. //1479 - This fishing shot is not fit for the fishing pole crystal.
activeChar.sendPacket(new SystemMessage(SystemMessageId.WRONG_FISHINGSHOT_GRADE)); activeChar.sendPacket(new SystemMessage(SystemMessageId.WRONG_FISHINGSHOT_GRADE));
...@@ -75,17 +71,14 @@ public class FishShots implements IItemHandler ...@@ -75,17 +71,14 @@ public class FishShots implements IItemHandler
} }
if (count < 1) if (count < 1)
{
return; return;
}
weaponInst.setChargedFishshot(true); weaponInst.setChargedFishshot(true);
activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false); activeChar.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
L2Object oldTarget = activeChar.getTarget(); L2Object oldTarget = activeChar.getTarget();
activeChar.setTarget(activeChar); activeChar.setTarget(activeChar);
MagicSkillUse MSU = new MagicSkillUse(activeChar, SKILL_IDS[grade], 1, 0, 0); Broadcast.toSelfAndKnownPlayers(activeChar, new MagicSkillUse(activeChar, SKILL_IDS[grade], 1, 0, 0));
Broadcast.toSelfAndKnownPlayers(activeChar, MSU);
activeChar.setTarget(oldTarget); activeChar.setTarget(oldTarget);
} }
} }
...@@ -55,7 +55,6 @@ public class ScrollOfResurrection implements IItemHandler ...@@ -55,7 +55,6 @@ public class ScrollOfResurrection implements IItemHandler
int itemId = item.getItemId(); int itemId = item.getItemId();
//boolean blessedScroll = (itemId != 737); //boolean blessedScroll = (itemId != 737);
boolean humanScroll = (itemId == 3936 || itemId == 3959 || itemId == 737);
boolean petScroll = (itemId == 6387 || itemId == 737); boolean petScroll = (itemId == 6387 || itemId == 737);
// SoR Animation section // SoR Animation section
...@@ -83,7 +82,7 @@ public class ScrollOfResurrection implements IItemHandler ...@@ -83,7 +82,7 @@ public class ScrollOfResurrection implements IItemHandler
if (targetPlayer != null) if (targetPlayer != null)
castle = CastleManager.getInstance().getCastle(targetPlayer.getX(), targetPlayer.getY(), targetPlayer.getZ()); castle = CastleManager.getInstance().getCastle(targetPlayer.getX(), targetPlayer.getY(), targetPlayer.getZ());
else 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()) if (castle != null && castle.getSiege().getIsInProgress())
{ {
...@@ -125,7 +124,7 @@ public class ScrollOfResurrection implements IItemHandler ...@@ -125,7 +124,7 @@ public class ScrollOfResurrection implements IItemHandler
activeChar.sendPacket(new SystemMessage(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED)); // Resurrection is already been proposed. activeChar.sendPacket(new SystemMessage(SystemMessageId.RES_HAS_ALREADY_BEEN_PROPOSED)); // Resurrection is already been proposed.
condGood = false; condGood = false;
} }
else if (!humanScroll) else if (petScroll)
{ {
condGood = false; condGood = false;
activeChar.sendMessage("You do not have the correct scroll"); activeChar.sendMessage("You do not have the correct scroll");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment