Config.java
Код:
public static float RATE_XP;
public static float RATE_SP;
+ public static float SATURDAY_RATE_XP;
+ public static float SATURDAY_RATE_SP;
RATE_XP = Float.parseFloat(server.getProperty("RateXp", "1."));
RATE_SP = Float.parseFloat(server.getProperty("RateSp", "1."));
+ SATURDAY_RATE_XP = Float.parseFloat(server.getProperty("SaturDayXp", "2."));
+ SATURDAY_RATE_SP = Float.parseFloat(server.getProperty("SaturDaySp", "2."));
Config.properties
# =================================================================
# RATES
# =================================================================
# Rate control
RateXp = 1.
RateSp = 1.
+ SaturDayXp = 2.
+ SaturDaySp = 2.
L2Npc.java
Код:
_ /**
_ * Return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by _RATE_XP).<BR><BR>
_ */
_ public int getExpReward()
_ {
_ return (int) (getTemplate().rewardExp * Config.RATE_XP);
_ }
+ private int Savvato()
+ {
+ return Calendar.SATURDAY;
+ }
+ /**
+ * Return the Exp Reward of this L2Npc contained in the L2NpcTemplate (modified by +RATE_XP).<BR><BR>
+ */
+ public int getExpReward()
+ {
+ if(Savvato() != 0)
+ return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_XP);
+ else
+ return (int) (getTemplate().rewardExp * Config.RATE_XP);
+
+ }
_ /**
_ * Return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by _RATE_SP).<BR><BR>
_ */
_ public int getSpReward()
_ {
_ return (int) (getTemplate().rewardSp * Config.RATE_SP);
_ }
+ /**
+ * Return the SP Reward of this L2Npc contained in the L2NpcTemplate (modified by +RATE_SP).<BR><BR>
+ */
+ public int getSpReward()
+ {
+ if(Savvato() != 0)
+ return (int) (getTemplate().rewardExp * Config.SATURDAY_RATE_SP);
+ else
+ return (int) (getTemplate().rewardSp * Config.RATE_SP);
+ }
Помогите Сюда Же добавить Двойной дроб-Спойл.