Advertisement
LIONN

Olympiad Participation Related

Apr 18th, 2013
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.37 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P L2jFanatic_GameServer
  3. Index: head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java
  4. ===================================================================
  5. --- head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java   (revision 26)
  6. +++ head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java   (working copy)
  7. @@ -420,6 +420,21 @@
  8.         }
  9.        
  10.         /** Begin Olympiad Restrictions */
  11. +       if(Config.OLY_PARTICIPATION_BY_PVP || Config.OLY_PARTICIPATION_BY_PK)
  12. +       {
  13. +           String count = String.valueOf(Config.OLY_PARTICIPATION_COUNT);
  14. +           if(Config.OLY_PARTICIPATION_BY_PVP && noble.getPvpKills() <= Config.OLY_PARTICIPATION_COUNT)
  15. +           {
  16. +               noble.sendMessage("Cant register when you have less than " + count + " Pvp Kills.");
  17. +               return false;
  18. +           }
  19. +           else if(Config.OLY_PARTICIPATION_BY_PK && noble.getPkKills() <= Config.OLY_PARTICIPATION_COUNT)
  20. +           {
  21. +               noble.sendMessage("Cant register when you have less than " + count + " Pk Kills.");
  22. +               return false;
  23. +           }
  24. +       }
  25. +
  26.         if (noble.getBaseClass() != noble.getClassId().getId())
  27.         {
  28.             sm = new SystemMessage(SystemMessageId.YOU_CANT_JOIN_THE_OLYMPIAD_WITH_A_SUB_JOB_CHARACTER);
  29. Index: config/head/olympiad.properties
  30. ===================================================================
  31. --- config/head/olympiad.properties (revision 26)
  32. +++ config/head/olympiad.properties (working copy)
  33. @@ -100,4 +100,11 @@
  34.  # es. 2weeks-->AltOlyPeriod=WEEK and AltOlyPeriodMultiplier=2
  35.  AltOlyUseCustomPeriodSettings = False
  36.  AltOlyPeriod = MONTH
  37. -AltOlyPeriodMultiplier = 1
  38. \ No newline at end of file
  39. +AltOlyPeriodMultiplier = 1
  40. +
  41. +# Basic requirements to participate in the Olympic game
  42. +# Options: None, All, Pvp, PK
  43. +OlympiadParticipationRelated = None
  44. +# Sets the amount required to participate in the Olympics game.
  45. +# Note: Only Works if OlympiadParticipationRelated equals All, Pvp or PK!
  46. +OlympiadPartipationCount = 100
  47. Index: head-src/com/l2jfrozen/Config.java
  48. ===================================================================
  49. --- head-src/com/l2jfrozen/Config.java  (revision 29)
  50. +++ head-src/com/l2jfrozen/Config.java  (working copy)
  51. @@ -2584,6 +2584,10 @@
  52.     public static boolean ALT_OLY_USE_CUSTOM_PERIOD_SETTINGS;
  53.     public static OlympiadPeriod ALT_OLY_PERIOD;
  54.     public static int ALT_OLY_PERIOD_MULTIPLIER;
  55. +
  56. +   public static boolean OLY_PARTICIPATION_BY_PVP;
  57. +   public static boolean OLY_PARTICIPATION_BY_PK;
  58. +   public static int OLY_PARTICIPATION_COUNT;
  59.     //============================================================
  60.    
  61.     public static void loadOlympConfig()
  62. @@ -2640,7 +2644,9 @@
  63.             ALT_OLY_PERIOD = OlympiadPeriod.valueOf(OLYMPSetting.getProperty("AltOlyPeriod", "MONTH"));
  64.             ALT_OLY_PERIOD_MULTIPLIER = Integer.parseInt(OLYMPSetting.getProperty("AltOlyPeriodMultiplier", "1"));
  65.            
  66. -          
  67. +           OLY_PARTICIPATION_BY_PVP = OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("pvp") || OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("all");
  68. +           OLY_PARTICIPATION_BY_PK = OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("pk") || OLYMPSetting.getProperty("OlympiadParticipationRelated", "All").equalsIgnoreCase("all");
  69. +           OLY_PARTICIPATION_COUNT = Integer.parseInt(OLYMPSetting.getProperty("OlympiadPartipationCount", "100"));
  70.         }
  71.         catch(Exception e)
  72.         {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement