Fixed inability to calculate olympiad rewards.
This commit is contained in:
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -36,7 +36,6 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||||
import com.l2jmobius.gameserver.model.base.ClassId;
|
import com.l2jmobius.gameserver.model.base.ClassId;
|
||||||
import com.l2jmobius.gameserver.model.entity.Hero;
|
|
||||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -172,25 +171,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1036,14 +1036,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.Location;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -136,25 +135,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1041,14 +1041,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.Location;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -136,25 +135,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1041,14 +1041,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.Location;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -136,25 +135,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1041,14 +1041,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,6 @@ import com.l2jmobius.gameserver.model.Location;
|
|||||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.CompetitionType;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
import com.l2jmobius.gameserver.model.olympiad.Olympiad;
|
||||||
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
import com.l2jmobius.gameserver.model.olympiad.OlympiadGameManager;
|
||||||
@@ -136,25 +135,13 @@ public final class OlyManager extends AbstractNpcAI implements IBypassHandler
|
|||||||
}
|
}
|
||||||
case "calculatePoints":
|
case "calculatePoints":
|
||||||
{
|
{
|
||||||
final int points = Olympiad.getInstance().getOlympiadTradePoint(player, false);
|
if (Olympiad.getInstance().getOlympiadTradePoint(player, false) > 0)
|
||||||
if (points == 0)
|
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateNoEnough.html";
|
htmltext = "OlyManager-calculateEnough.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";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "OlyManager-calculateEnough.html";
|
htmltext = "OlyManager-calculateNoEnough.html";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -1041,14 +1041,8 @@ public class Olympiad extends ListenersContainer
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int points = 0;
|
|
||||||
|
|
||||||
// Hero point bonus
|
// Hero point bonus
|
||||||
if (Hero.getInstance().isHero(player.getObjectId()) || Hero.getInstance().isUnclaimedHero(player.getObjectId()))
|
int points = player.isHero() || Hero.getInstance().isUnclaimedHero(player.getObjectId()) ? Config.ALT_OLY_HERO_POINTS : 0;
|
||||||
{
|
|
||||||
points += Config.ALT_OLY_HERO_POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Rank point bonus
|
// Rank point bonus
|
||||||
switch (_noblesRank.get(objId))
|
switch (_noblesRank.get(objId))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user