Fishing rework and additions.
Contributed by CostyKiller.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./xsd/Fishing.xsd">
|
||||
<baitDistance min="90" max="250" />
|
||||
<xpRate min="1" max="1" /> <!-- XP modifiction rate -->
|
||||
<spRate min="1" max="1" /> <!-- SP modifiction rate -->
|
||||
<xpRate min="1" max="1" /> <!-- XP modification rate -->
|
||||
<spRate min="1" max="1" /> <!-- SP modification rate -->
|
||||
<baits>
|
||||
<bait itemId="46737" minPlayerLevel="95" chance="40" timeMin="105000" waitMin="15000"> <!-- Practice Bait -->
|
||||
<catch itemId="46736" chance="70" multiplier="1" /> <!-- Practice Fish -->
|
||||
@@ -47,13 +47,13 @@
|
||||
<catch itemId="47550" chance="70" multiplier="1" /> <!-- Ugly Fish -->
|
||||
<catch itemId="47551" chance="25" multiplier="1" /> <!-- Nimble Fish -->
|
||||
<catch itemId="47552" chance="3" multiplier="1" /> <!-- Powerful Fish -->
|
||||
<catch itemId="47554" chance="2" multiplier="1" /> <!-- Purplish Box -->
|
||||
<catch itemId="47555" chance="2" multiplier="1" /> <!-- Purplish Box -->
|
||||
</bait>
|
||||
<bait itemId="81146" minPlayerLevel="99" chance="40" timeMin="105000" waitMin="15000"> <!-- Santiago's Bait -->
|
||||
<catch itemId="47550" chance="70" multiplier="1476" /> <!-- Ugly Fish -->
|
||||
<catch itemId="47551" chance="25" multiplier="1804" /> <!-- Nimble Fish -->
|
||||
<catch itemId="47552" chance="3" multiplier="1968" /> <!-- Powerful Fish -->
|
||||
<catch itemId="47554" chance="2" multiplier="1" /> <!-- Reddish Box -->
|
||||
<catch itemId="81144" chance="2" multiplier="1" /> <!-- Santiago's Star Energy Pack -->
|
||||
</bait>
|
||||
</baits>
|
||||
<rods>
|
||||
@@ -61,6 +61,7 @@
|
||||
<rod itemId="45494" /> <!-- Sturdy Fishing Rod -->
|
||||
<rod itemId="46738" /> <!-- Practice Fishing Rod -->
|
||||
<rod itemId="46740" /> <!-- Reward Fishing Rod - 7-day -->
|
||||
<rod itemId="46286" reduceFishingTime="100000" xpMultiplier="2.5" spMultiplier="2.5" /> <!-- Christmas Fishing Rod -->
|
||||
<rod itemId="27632" reduceFishingTime="95000" xpMultiplier="1.5" spMultiplier="1.5" /> <!-- Fancy Fishing Rod -->
|
||||
<rod itemId="27633" reduceFishingTime="95000" xpMultiplier="1.5" spMultiplier="1.5" /> <!-- Fancy Fishing Rod - 1-day -->
|
||||
<rod itemId="27635" reduceFishingTime="95000" xpMultiplier="1.5" spMultiplier="1.5" /> <!-- Fancy Fishing Rod - 7-day -->
|
||||
|
@@ -55,7 +55,7 @@ public class FishShots implements IItemHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
||||
if (player.isChargedShot(ShotType.FISH_SOULSHOTS) || player.isChargedShot(ShotType.GOLD_FISH_SOULSHOTS))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -73,7 +73,15 @@ public class FishShots implements IItemHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
player.chargeShot(ShotType.FISH_SOULSHOTS);
|
||||
if (item.getId() == 29186) // Gold Fish Shot
|
||||
{
|
||||
player.chargeShot(ShotType.GOLD_FISH_SOULSHOTS);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.chargeShot(ShotType.FISH_SOULSHOTS);
|
||||
}
|
||||
|
||||
player.destroyItemWithoutTrace("Consume", item.getObjectId(), 1, null, false);
|
||||
final WorldObject oldTarget = player.getTarget();
|
||||
player.setTarget(player);
|
||||
|
@@ -991,8 +991,13 @@
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="material" val="PAPER" />
|
||||
<set name="weight" val="1" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="price" val="500" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="etcitem_type" val="SOULSHOT" />
|
||||
<set name="handler" val="FishShots" />
|
||||
<skills>
|
||||
<skill id="28186" level="1" /> <!-- Gold Fishing Shot -->
|
||||
</skills>
|
||||
</item>
|
||||
<item id="29187" name="Fishing XP Box" additionalName="Lv. 85 - 94" type="EtcItem">
|
||||
<!-- Box that contains Fishing Scroll: XP (Lv. 85 to 94). There's a chance to obtain a Shining Fishing Box. -->
|
||||
|
@@ -621,30 +621,47 @@
|
||||
<item id="47554" name="Reddish Box" type="EtcItem">
|
||||
<!-- Double-click to obtain an item. -->
|
||||
<set name="icon" val="icon.etc_treasure_box_i03" />
|
||||
<set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
|
||||
<set name="default_action" val="PEEL" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="weight" val="10" />
|
||||
<set name="is_tradable" val="false" />
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="default_action" val="PEEL" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="handler" val="ItemSkills" />
|
||||
<set name="material" val="FISH" />
|
||||
<skills>
|
||||
<skill id="18663" level="1" /> <!-- Bluish Box -->
|
||||
</skills>
|
||||
<set name="extractableCountMin" val="1" />
|
||||
<set name="extractableCountMax" val="1" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="39720" min="1" max="1" chance="27" /> <!-- Maphr's Luck Potion -->
|
||||
<item id="45494" min="1" max="1" chance="3" /> <!-- Sturdy Fishing Rod -->
|
||||
<item id="38154" min="50" max="50" chance="65" /> <!-- Fishing Shot -->
|
||||
<item id="8034" min="1" max="1" chance="5" /> <!-- Rainbow Springs Clan Hall War Decree -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="47555" name="Purplish Box" type="EtcItem">
|
||||
<!-- Double-click to obtain an item. -->
|
||||
<set name="icon" val="icon.etc_treasure_box_i04" />
|
||||
<set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
|
||||
<set name="default_action" val="PEEL" />
|
||||
<set name="immediate_effect" val="true" />
|
||||
<set name="weight" val="10" />
|
||||
<set name="is_tradable" val="false" />
|
||||
<set name="is_dropable" val="false" />
|
||||
<set name="is_sellable" val="false" />
|
||||
<set name="is_stackable" val="true" />
|
||||
<set name="material" val="FISH" />
|
||||
<set name="extractableCountMin" val="1" />
|
||||
<set name="extractableCountMax" val="1" />
|
||||
<set name="handler" val="ExtractableItems" />
|
||||
<capsuled_items>
|
||||
<item id="38154" min="50" max="50" chance="16.666666666667" /> <!-- Fishing Shot -->
|
||||
<item id="39720" min="1" max="1" chance="16.666666666667" /> <!-- Freya's Luck Potion -->
|
||||
<item id="8034" min="1" max="1" chance="16.666666666667" /> <!-- Rainbow Springs Clan Hall War Decree -->
|
||||
<item id="47556" min="1" max="1" chance="16.666666666667" /> <!-- Stardust -->
|
||||
<item id="45494" min="1" max="1" chance="16.666666666667" /> <!-- Sturdy Fishing Rod -->
|
||||
<item id="48065" min="1" max="1" chance="16.666666666667" /> <!-- Zodiac Cube Fragment -->
|
||||
</capsuled_items>
|
||||
</item>
|
||||
<item id="47556" name="Stardust" type="EtcItem">
|
||||
<!-- Ingredient needed to exchange Elementary Seed Bracelet. -->
|
||||
|
@@ -25,7 +25,8 @@ public enum ShotType
|
||||
SPIRITSHOTS,
|
||||
BLESSED_SOULSHOTS,
|
||||
BLESSED_SPIRITSHOTS,
|
||||
FISH_SOULSHOTS;
|
||||
FISH_SOULSHOTS,
|
||||
GOLD_FISH_SOULSHOTS;
|
||||
|
||||
private final int _mask;
|
||||
|
||||
|
@@ -20,6 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.data.xml.ExperienceData;
|
||||
import org.l2jmobius.gameserver.data.xml.FishingData;
|
||||
import org.l2jmobius.gameserver.enums.PartySmallWindowUpdateType;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
@@ -28,7 +29,6 @@ import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.Pet;
|
||||
import org.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLevelChanged;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.SubClassHolder;
|
||||
import org.l2jmobius.gameserver.model.item.instance.Item;
|
||||
import org.l2jmobius.gameserver.model.item.type.WeaponType;
|
||||
@@ -60,8 +60,6 @@ public class PlayerStat extends PlayableStat
|
||||
public static final int MAX_VITALITY_POINTS = 140000;
|
||||
public static final int MIN_VITALITY_POINTS = 0;
|
||||
|
||||
private static final int FANCY_FISHING_ROD_SKILL = 21484;
|
||||
|
||||
public PlayerStat(Player player)
|
||||
{
|
||||
super(player);
|
||||
@@ -126,18 +124,12 @@ public class PlayerStat extends PlayableStat
|
||||
{
|
||||
if (player.isFishing())
|
||||
{
|
||||
// rod fishing skills
|
||||
// rod fishing bonus
|
||||
final Item rod = player.getActiveWeaponInstance();
|
||||
if ((rod != null) && (rod.getItemType() == WeaponType.FISHINGROD) && (rod.getItem().getAllSkills() != null))
|
||||
if ((rod != null) && (rod.getItemType() == WeaponType.FISHINGROD))
|
||||
{
|
||||
for (ItemSkillHolder s : rod.getItem().getAllSkills())
|
||||
{
|
||||
if (s.getSkill().getId() == FANCY_FISHING_ROD_SKILL)
|
||||
{
|
||||
bonusExp *= 1.5;
|
||||
bonusSp *= 1.5;
|
||||
}
|
||||
}
|
||||
bonusExp *= FishingData.getInstance().getRodData(rod.getItem().getId()).getXpMultiplier();
|
||||
bonusSp *= FishingData.getInstance().getRodData(rod.getItem().getId()).getSpMultiplier();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -239,7 +239,7 @@ public class Fishing
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_player.isChargedShot(ShotType.FISH_SOULSHOTS))
|
||||
if (!_player.isChargedShot(ShotType.FISH_SOULSHOTS) || !_player.isChargedShot(ShotType.GOLD_FISH_SOULSHOTS))
|
||||
{
|
||||
_player.rechargeShots(false, false, true);
|
||||
}
|
||||
@@ -275,6 +275,10 @@ public class Fishing
|
||||
{
|
||||
chance *= 2;
|
||||
}
|
||||
else if (_player.isChargedShot(ShotType.GOLD_FISH_SOULSHOTS))
|
||||
{
|
||||
chance = 100;
|
||||
}
|
||||
|
||||
if (Rnd.get(100) <= chance)
|
||||
{
|
||||
@@ -320,7 +324,14 @@ public class Fishing
|
||||
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1);
|
||||
msg.addItemName(fishingCatchData.getItemId());
|
||||
_player.sendPacket(msg);
|
||||
_player.unchargeShot(ShotType.FISH_SOULSHOTS);
|
||||
if (_player.isChargedShot(ShotType.GOLD_FISH_SOULSHOTS))
|
||||
{
|
||||
_player.unchargeShot(ShotType.GOLD_FISH_SOULSHOTS);
|
||||
}
|
||||
else
|
||||
{
|
||||
_player.unchargeShot(ShotType.FISH_SOULSHOTS);
|
||||
}
|
||||
_player.rechargeShots(false, false, true);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user