Store olympiad rewards in character variables.
This commit is contained in:
@@ -135,7 +135,7 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
||||
}
|
||||
case "calculatePoints":
|
||||
{
|
||||
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||
if (player.getVariables().getInt(Olympiad.UNCLAIMED_OLYMPIAD_POINTS_VAR, 0) > 0)
|
||||
{
|
||||
htmltext = "OlyManager-calculateEnough.html";
|
||||
}
|
||||
@@ -149,9 +149,10 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
||||
{
|
||||
if (player.isInventoryUnder80(false))
|
||||
{
|
||||
final int tradePoints = Olympiad.getInstance().getOlympiadTradePoint(player, true);
|
||||
final int tradePoints = player.getVariables().getInt(Olympiad.UNCLAIMED_OLYMPIAD_POINTS_VAR, 0);
|
||||
if (tradePoints > 0)
|
||||
{
|
||||
player.getVariables().remove(Olympiad.UNCLAIMED_OLYMPIAD_POINTS_VAR);
|
||||
giveItems(player, Config.ALT_OLY_COMP_RITEM, tradePoints * Config.ALT_OLY_MARK_PER_POINT);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user