Noticias:

Debes de estar registrado para poder ver el contenido indicado. Registrate o Conectate

Menú Principal

Puntos Máximos en Olimpiadas

Iniciado por Swarlog, Ago 19, 2022, 01:37 AM

Tema anterior - Siguiente tema

Swarlog

Index: /trunk/L2_GameServer/java/config/General.properties
===================================================================
--- /trunk/L2_GameServer/java/config/General.properties (revision 3516)
+++ /trunk/L2_GameServer/java/config/General.properties (revision 3540)
@@ -515,4 +515,8 @@
 AltOlyRank5Points = 20
 
+# Maximum points that player can gain/lose on a match.
+# Default: 10
+AltOlyMaxPoints = 10
+
 # Hero tables show last month's winners or current status.
 # Default: True
Index: /trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGame.java
===================================================================
--- /trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGame.java (revision 3490)
+++ /trunk/L2_GameServer/java/net/sf/l2j/gameserver/model/olympiad/OlympiadGame.java (revision 3540)
@@ -504,5 +504,5 @@
  final int playerOnePoints = playerOneStat.getInteger(POINTS);
  final int playerTwoPoints = playerTwoStat.getInteger(POINTS);
- final int pointDiff = Math.min(playerOnePoints, playerTwoPoints) / _div;
+ final int pointDiff = Math.min(Math.min(playerOnePoints, playerTwoPoints) / _div, Config.ALT_OLY_MAX_POINTS);
 
  // Check for if a player defaulted before battle started
@@ -511,5 +511,5 @@
  if (_playerOneDefaulted)
  {
- final int lostPoints = playerOnePoints / 3;
+ final int lostPoints = Math.min(playerOnePoints / 3, Config.ALT_OLY_MAX_POINTS);
  playerOneStat.set(POINTS, playerOnePoints - lostPoints);
  Olympiad.updateNobleStats(_playerOneID, playerOneStat);
@@ -531,5 +531,5 @@
  if (_playerTwoDefaulted)
  {
- final int lostPoints = playerTwoPoints / 3;
+ final int lostPoints = Math.min(playerTwoPoints / 3, Config.ALT_OLY_MAX_POINTS);
  playerTwoStat.set(POINTS, playerTwoPoints - lostPoints);
  Olympiad.updateNobleStats(_playerTwoID, playerTwoStat);
@@ -784,6 +784,6 @@
  _sm = new SystemMessage(SystemMessageId.THE_GAME_ENDED_IN_A_TIE);
  broadcastMessage(_sm, true);
- int pointOneDiff = playerOnePoints / 5;
- int pointTwoDiff = playerTwoPoints / 5;
+ final int pointOneDiff = Math.min(playerOnePoints / 5, Config.ALT_OLY_MAX_POINTS);
+ final int pointTwoDiff = Math.min(playerTwoPoints / 5, Config.ALT_OLY_MAX_POINTS);
  playerOneStat.set(POINTS, playerOnePoints - pointOneDiff);
  playerTwoStat.set(POINTS, playerTwoPoints - pointTwoDiff);
Index: /trunk/L2_GameServer/java/net/sf/l2j/Config.java
===================================================================
--- /trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 3516)
+++ /trunk/L2_GameServer/java/net/sf/l2j/Config.java (revision 3540)
@@ -456,4 +456,5 @@
  public static int ALT_OLY_RANK4_POINTS;
  public static int ALT_OLY_RANK5_POINTS;
+ public static int ALT_OLY_MAX_POINTS;
  public static boolean ALT_OLY_LOG_FIGHTS;
  public static boolean ALT_OLY_SHOW_MONTHLY_WINNERS;
@@ -1527,4 +1528,5 @@
  ALT_OLY_RANK4_POINTS = Integer.parseInt(General.getProperty("AltOlyRank4Points","35"));
  ALT_OLY_RANK5_POINTS = Integer.parseInt(General.getProperty("AltOlyRank5Points","20"));
+ ALT_OLY_MAX_POINTS = Integer.parseInt(General.getProperty("AltOlyMaxPoints","10"));
  ALT_OLY_LOG_FIGHTS = Boolean.parseBoolean(General.getProperty("AlyOlyLogFights","false"));
  ALT_OLY_SHOW_MONTHLY_WINNERS = Boolean.parseBoolean(General.getProperty("AltOlyShowMonthlyWinners","true"));

By Charus