Fishing rework and additions.
Contributed by CostyKiller.
This commit is contained in:
@@ -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