HuntPass improvements.

Contributed by Index.
This commit is contained in:
MobiusDevelopment 2022-07-26 23:48:05 +00:00
parent 023e077489
commit 2d4b9fbabb
4 changed files with 28 additions and 6 deletions

View File

@ -179,10 +179,17 @@ public class HuntPass
{
final int seasonPasspoint = 1;
int calculate = seasonPasspoint + getPoints();
if ((getPoints() == Config.HUNT_PASS_POINTS_FOR_STEP))
boolean hasNewLevel = false;
int calculateMe = getPoints();
while (calculateMe >= Config.HUNT_PASS_POINTS_FOR_STEP)
{
calculateMe = calculateMe - Config.HUNT_PASS_POINTS_FOR_STEP;
setCurrentStep(getCurrentStep() + 1);
hasNewLevel = true;
}
if (hasNewLevel)
{
calculate %= Config.HUNT_PASS_POINTS_FOR_STEP;
setCurrentStep(getCurrentStep() + 1);
setRewardAlert(true);
_user.sendPacket(new HuntPassSimpleInfo(_user));
}

View File

@ -94,7 +94,11 @@ public class RequestHuntPassReward implements IClientIncomingPacket
}
huntpass.addSayhaTime(calc);
player.addItem("HuntPassReward", reward, player, true);
if (reward.getId() != 72286) // Sayha's Grace Sustention Points
{
player.addItem("HuntPassReward", reward, player, true);
}
final SystemMessage msg = new SystemMessage(SystemMessageId.SAYHA_S_GRACE_SUSTENTION_POINTS_RECEIVED_S1);
msg.addInt((int) (count));
player.sendPacket(msg);

View File

@ -179,10 +179,17 @@ public class HuntPass
{
final int seasonPasspoint = 1;
int calculate = seasonPasspoint + getPoints();
if ((getPoints() == Config.HUNT_PASS_POINTS_FOR_STEP))
boolean hasNewLevel = false;
int calculateMe = getPoints();
while (calculateMe >= Config.HUNT_PASS_POINTS_FOR_STEP)
{
calculateMe = calculateMe - Config.HUNT_PASS_POINTS_FOR_STEP;
setCurrentStep(getCurrentStep() + 1);
hasNewLevel = true;
}
if (hasNewLevel)
{
calculate %= Config.HUNT_PASS_POINTS_FOR_STEP;
setCurrentStep(getCurrentStep() + 1);
setRewardAlert(true);
_user.sendPacket(new HuntPassSimpleInfo(_user));
}

View File

@ -94,7 +94,11 @@ public class RequestHuntPassReward implements IClientIncomingPacket
}
huntpass.addSayhaTime(calc);
player.addItem("HuntPassReward", reward, player, true);
if (reward.getId() != 72286) // Sayha's Grace Sustention Points
{
player.addItem("HuntPassReward", reward, player, true);
}
final SystemMessage msg = new SystemMessage(SystemMessageId.YOU_RECEIVED_S1_SAYHA_S_GRACE_SUSTENTION_POINTS);
msg.addInt((int) (count));
player.sendPacket(msg);