Fixed inability to calculate olympiad rewards.

This commit is contained in:
MobiusDev
2019-01-08 01:41:33 +00:00
parent 85401b7e89
commit 27322e4e87
20 changed files with 40 additions and 230 deletions

View File

@@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Hero;
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
@@ -136,25 +135,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
}
case "calculatePoints":
{
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
if (points == 0)
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
{
htmltext = "OlyManager-calculateNoEnough.html";
}
else if (points < 20)
{
if (Hero.getInstance().isUnclaimedHero(player.getObjectId()) || Hero.getInstance().isHero(player.getObjectId()))
{
htmltext = "OlyManager-calculateEnough.html";
}
else
{
htmltext = "OlyManager-calculateNoEnough.html";
}
htmltext = "OlyManager-calculateEnough.html";
}
else
{
htmltext = "OlyManager-calculateEnough.html";
htmltext = "OlyManager-calculateNoEnough.html";
}
break;
}

View File

@@ -1041,14 +1041,8 @@ public class Olympiad extends ListenersContainer
return 0;
}
int points = 0;
// Hero point bonus
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
{
points += Config.ALT_OLY_HERO_POINTS;
}
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
// Rank point bonus
switch (_noblesRank.get(objId))
{