Addition of fishing zones.
Addition of fish exp and sp. Give exp and sp after fishing. Missing baits added to L2PcInstance. Contributed by darky999.
This commit is contained in:
@ -11961,11 +11961,13 @@ public final class L2PcInstance extends L2Playable
|
||||
case 7808: // purple for beginners
|
||||
case 7809: // yellow for beginners
|
||||
case 8486: // prize-winning for beginners
|
||||
case 45495: // normal Bait
|
||||
return 0;
|
||||
case 8485: // prize-winning luminous
|
||||
case 8506: // green luminous
|
||||
case 8509: // purple luminous
|
||||
case 8512: // yellow luminous
|
||||
case 8484: // prize-winning fishing lure
|
||||
return 2;
|
||||
default:
|
||||
return 1;
|
||||
@ -12253,6 +12255,7 @@ public final class L2PcInstance extends L2Playable
|
||||
_lure = null;
|
||||
// Ends fishing
|
||||
broadcastPacket(new ExFishingEnd(win, this));
|
||||
addExpAndSp(_fish.getExp(), _fish.getSp()); // Reward Player with Exp and Sp
|
||||
sendPacket(SystemMessageId.YOU_REEL_YOUR_LINE_IN_AND_STOP_FISHING);
|
||||
setIsImmobilized(false);
|
||||
stopLookingForFishTask();
|
||||
|
@ -43,6 +43,8 @@ public class L2Fish implements Cloneable
|
||||
private final double _gutsCheckProbability;
|
||||
private final double _cheatingProb;
|
||||
private final int _fishGrade;
|
||||
private static long _fishExp;
|
||||
private static long _fishSp;
|
||||
|
||||
public L2Fish(StatsSet set)
|
||||
{
|
||||
@ -63,6 +65,8 @@ public class L2Fish implements Cloneable
|
||||
_gutsCheckProbability = set.getDouble("gutsCheckProbability"); // TODO: Support needed.
|
||||
_cheatingProb = set.getDouble("cheatingProb"); // TODO: Support needed.
|
||||
_fishGrade = getGradeId(set.getString("fishGrade"));
|
||||
_fishExp = set.getLong("fishExp");
|
||||
_fishSp = set.getLong("fishSp");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -222,6 +226,22 @@ public class L2Fish implements Cloneable
|
||||
_fishGroup = fg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fish Exp.
|
||||
*/
|
||||
public Long getExp()
|
||||
{
|
||||
return _fishExp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the fish Sp.
|
||||
*/
|
||||
public Long getSp()
|
||||
{
|
||||
return _fishSp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name the Group Name.
|
||||
* @return the fish Group Id.
|
||||
|
Reference in New Issue
Block a user