diff --git a/trunk/dist/game/config/Custom.properties b/trunk/dist/game/config/Custom.properties index 33c5e8466d..6cab5e5cc0 100644 --- a/trunk/dist/game/config/Custom.properties +++ b/trunk/dist/game/config/Custom.properties @@ -33,11 +33,20 @@ ChampionHp = 8 # Hp Regen Multiplier for Champion mobs. ChampionHpRegen = 1.0 -# Standard rewards multiplier for Champion mobs. -ChampionRewards = 8 +# Exp/Sp rewards multiplier for Champion mobs. +ChampionRewardsExpSp = 8.0 -# Adena & Seal Stone rewards multiplier for Champion mobs. -ChampionAdenasRewards = 1.0 +# Standard rewards chance multiplier for Champion mobs. +ChampionRewardsChance = 8.0 + +# Standard rewards amount multiplier for Champion mobs. +ChampionRewardsAmount = 1.0 + +# Adena & Seal Stone rewards chance multiplier for Champion mobs. +ChampionAdenasRewardsChance = 1.0 + +# Adena & Seal Stone rewards amount multiplier for Champion mobs. +ChampionAdenasRewardsAmount = 1.0 # P. Attack and M. Attack bonus for Champion mobs. ChampionAtk = 1.0 diff --git a/trunk/dist/game/data/scripts/ai/npc/ForgeOfTheGods/TarBeetleSpawn.java b/trunk/dist/game/data/scripts/ai/npc/ForgeOfTheGods/TarBeetleSpawn.java index 4f695a6472..a97653e80c 100644 --- a/trunk/dist/game/data/scripts/ai/npc/ForgeOfTheGods/TarBeetleSpawn.java +++ b/trunk/dist/game/data/scripts/ai/npc/ForgeOfTheGods/TarBeetleSpawn.java @@ -245,7 +245,7 @@ public class TarBeetleSpawn implements IXmlReader } catch (Exception e) { - e.printStackTrace(); + LOGGER.warning(getClass().getSimpleName() + ": Could not refresh spawns!"); } } diff --git a/trunk/dist/game/data/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java b/trunk/dist/game/data/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java index 49f5bc3d25..6eb62d8ba9 100644 --- a/trunk/dist/game/data/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java +++ b/trunk/dist/game/data/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java @@ -104,7 +104,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI else { player.teleToLocation(TELEPORT); - player.getVariables().set(MONSTER_RETURN, String.valueOf(TELEPORTERS.get(npc.getId()))); + player.getVariables().set(MONSTER_RETURN, TELEPORTERS.get(npc.getId())); } return super.onTalk(npc, player); } diff --git a/trunk/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java b/trunk/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java index c358c265ea..7778272ce3 100644 --- a/trunk/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java +++ b/trunk/dist/game/data/scripts/conquerablehalls/FortressOfResistance/FortressOfResistance.java @@ -46,8 +46,7 @@ public final class FortressOfResistance extends ClanHallSiegeEngine { new Location(45109, 112124, -1900), // 30% new Location(47653, 110816, -2110), // 40% - new Location(47247, 109396, -2000) - // 30% + new Location(47247, 109396, -2000), // 30% }; private L2Spawn _nurka; @@ -86,8 +85,7 @@ public final class FortressOfResistance extends ClanHallSiegeEngine } catch (Exception e) { - _log.warning(getName() + ": Couldnt set the Bloody Lord Nurka spawn"); - e.printStackTrace(); + _log.warning(getName() + ": Couldn't set the Bloody Lord Nurka spawn!"); } } diff --git a/trunk/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java b/trunk/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java index 2e22007007..9f728a86ff 100644 --- a/trunk/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java +++ b/trunk/dist/game/data/scripts/conquerablehalls/RainbowSpringsChateau/RainbowSpringsChateau.java @@ -686,7 +686,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine { if ((arena < 0) || (arena > 3)) { - _log.warning("RainbowSptringChateau siege: Wrong arena id passed: " + arena); + _log.warning("RainbowSptringChateau siege: Wrong arena ID passed: " + arena); return; } for (L2PcInstance pc : leader.getParty().getMembers()) @@ -725,7 +725,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine } catch (Exception e) { - e.printStackTrace(); + // _log.warning("Unable to spawn guard for clan index " + i + "!"); } } SpawnTable.getInstance().addNewSpawn(_gourds[i], false); @@ -844,7 +844,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine } catch (Exception e) { - e.printStackTrace(); + // _log.warning(RainbowSpringsChateau.class.getSigners() + ": Unable to remove attacker clan ID " + clanId + " from database!"); } } @@ -859,7 +859,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine } catch (Exception e) { - e.printStackTrace(); + // _log.warning(RainbowSpringsChateau.class.getSigners() + ": Unable add attakers for clan ID " + clanId + " and count " + count + "!"); } } @@ -867,19 +867,17 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine public void loadAttackers() { try (Connection con = ConnectionFactory.getInstance().getConnection(); - Statement s = con.createStatement()) + Statement s = con.createStatement(); + ResultSet rset = s.executeQuery("SELECT * FROM rainbowsprings_attacker_list")) { - try (ResultSet rset = s.executeQuery("SELECT * FROM rainbowsprings_attacker_list")) + while (rset.next()) { - while (rset.next()) - { - _warDecreesCount.put(rset.getInt("clan_id"), rset.getLong("decrees_count")); - } + _warDecreesCount.put(rset.getInt("clan_id"), rset.getLong("decrees_count")); } } catch (Exception e) { - e.printStackTrace(); + _log.warning(RainbowSpringsChateau.class.getSigners() + ": Unable load attakers!"); } } diff --git a/trunk/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java b/trunk/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java index fe8a3abaa6..eefed5db59 100644 --- a/trunk/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java +++ b/trunk/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java @@ -547,7 +547,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine { endSiege(); _log.warning(getName() + ": Problems in siege initialization!"); - e.printStackTrace(); } } } @@ -653,8 +652,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine } catch (Exception e) { - _log.warning(getName() + ": Couldnt make clan spawns: " + e.getMessage()); - e.printStackTrace(); + _log.warning(getName() + ": Could not make clan spawns: " + e.getMessage()); } } diff --git a/trunk/dist/game/data/scripts/handlers/telnethandlers/PlayerHandler.java b/trunk/dist/game/data/scripts/handlers/telnethandlers/PlayerHandler.java index daa81493e5..06fddcf531 100644 --- a/trunk/dist/game/data/scripts/handlers/telnethandlers/PlayerHandler.java +++ b/trunk/dist/game/data/scripts/handlers/telnethandlers/PlayerHandler.java @@ -22,6 +22,7 @@ import java.io.PrintWriter; import java.net.Socket; import java.util.NoSuchElementException; import java.util.StringTokenizer; +import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.data.sql.impl.CharNameTable; @@ -59,6 +60,8 @@ public class PlayerHandler implements ITelnetHandler @Override public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) { + final Logger LOGGER = Logger.getLogger(PlayerHandler.class.getName()); + if (command.startsWith("kick")) { try @@ -246,7 +249,7 @@ public class PlayerHandler implements ITelnetHandler { if (Config.DEBUG) { - e.printStackTrace(); + LOGGER.info("Could not jail player via telnet!"); } } } @@ -276,7 +279,7 @@ public class PlayerHandler implements ITelnetHandler { if (Config.DEBUG) { - e.printStackTrace(); + LOGGER.info("Could not unjail player via telnet!"); } } } diff --git a/trunk/dist/game/data_classic/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java b/trunk/dist/game/data_classic/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java index 49f5bc3d25..6eb62d8ba9 100644 --- a/trunk/dist/game/data_classic/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java +++ b/trunk/dist/game/data_classic/scripts/ai/npc/Teleports/TeleportToRaceTrack/TeleportToRaceTrack.java @@ -104,7 +104,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI else { player.teleToLocation(TELEPORT); - player.getVariables().set(MONSTER_RETURN, String.valueOf(TELEPORTERS.get(npc.getId()))); + player.getVariables().set(MONSTER_RETURN, TELEPORTERS.get(npc.getId())); } return super.onTalk(npc, player); } diff --git a/trunk/dist/game/data_classic/scripts/handlers/telnethandlers/PlayerHandler.java b/trunk/dist/game/data_classic/scripts/handlers/telnethandlers/PlayerHandler.java index daa81493e5..06fddcf531 100644 --- a/trunk/dist/game/data_classic/scripts/handlers/telnethandlers/PlayerHandler.java +++ b/trunk/dist/game/data_classic/scripts/handlers/telnethandlers/PlayerHandler.java @@ -22,6 +22,7 @@ import java.io.PrintWriter; import java.net.Socket; import java.util.NoSuchElementException; import java.util.StringTokenizer; +import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.data.sql.impl.CharNameTable; @@ -59,6 +60,8 @@ public class PlayerHandler implements ITelnetHandler @Override public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) { + final Logger LOGGER = Logger.getLogger(PlayerHandler.class.getName()); + if (command.startsWith("kick")) { try @@ -246,7 +249,7 @@ public class PlayerHandler implements ITelnetHandler { if (Config.DEBUG) { - e.printStackTrace(); + LOGGER.info("Could not jail player via telnet!"); } } } @@ -276,7 +279,7 @@ public class PlayerHandler implements ITelnetHandler { if (Config.DEBUG) { - e.printStackTrace(); + LOGGER.info("Could not unjail player via telnet!"); } } } diff --git a/trunk/java/com/l2jserver/Config.java b/trunk/java/com/l2jserver/Config.java index e5c54ecadc..b8b060f50f 100644 --- a/trunk/java/com/l2jserver/Config.java +++ b/trunk/java/com/l2jserver/Config.java @@ -689,8 +689,11 @@ public final class Config public static int L2JMOD_CHAMP_MIN_LVL; public static int L2JMOD_CHAMP_MAX_LVL; public static int L2JMOD_CHAMPION_HP; - public static int L2JMOD_CHAMPION_REWARDS; - public static float L2JMOD_CHAMPION_ADENAS_REWARDS; + public static float L2JMOD_CHAMPION_REWARDS_EXP_SP; + public static float L2JMOD_CHAMPION_REWARDS_CHANCE; + public static float L2JMOD_CHAMPION_REWARDS_AMOUNT; + public static float L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE; + public static float L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT; public static float L2JMOD_CHAMPION_HP_REGEN; public static float L2JMOD_CHAMPION_ATK; public static float L2JMOD_CHAMPION_SPD_ATK; @@ -2204,8 +2207,11 @@ public final class Config L2JMOD_CHAMP_MAX_LVL = CustomSettings.getInt("ChampionMaxLevel", 60); L2JMOD_CHAMPION_HP = CustomSettings.getInt("ChampionHp", 7); L2JMOD_CHAMPION_HP_REGEN = CustomSettings.getFloat("ChampionHpRegen", 1); - L2JMOD_CHAMPION_REWARDS = CustomSettings.getInt("ChampionRewards", 8); - L2JMOD_CHAMPION_ADENAS_REWARDS = CustomSettings.getFloat("ChampionAdenasRewards", 1); + L2JMOD_CHAMPION_REWARDS_EXP_SP = CustomSettings.getFloat("ChampionRewardsExpSp", 8); + L2JMOD_CHAMPION_REWARDS_CHANCE = CustomSettings.getFloat("ChampionRewardsChance", 8); + L2JMOD_CHAMPION_REWARDS_AMOUNT = CustomSettings.getFloat("ChampionRewardsAmount", 1); + L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = CustomSettings.getFloat("ChampionAdenasRewardsChance", 1); + L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = CustomSettings.getFloat("ChampionAdenasRewardsAmount", 1); L2JMOD_CHAMPION_ATK = CustomSettings.getFloat("ChampionAtk", 1); L2JMOD_CHAMPION_SPD_ATK = CustomSettings.getFloat("ChampionSpdAtk", 1); L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = CustomSettings.getInt("ChampionRewardLowerLvlItemChance", 0); @@ -3578,11 +3584,20 @@ public final class Config case "championhpregen": L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue); break; - case "championrewards": - L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue); + case "championrewardsexpsp": + L2JMOD_CHAMPION_REWARDS_EXP_SP = Float.parseFloat(pValue); break; - case "championadenasrewards": - L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue); + case "championrewardschance": + L2JMOD_CHAMPION_REWARDS_CHANCE = Float.parseFloat(pValue); + break; + case "championrewardsamount": + L2JMOD_CHAMPION_REWARDS_AMOUNT = Float.parseFloat(pValue); + break; + case "championadenasrewardschance": + L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE = Float.parseFloat(pValue); + break; + case "championadenasrewardsamount": + L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT = Float.parseFloat(pValue); break; case "championatk": L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue); diff --git a/trunk/java/com/l2jserver/gameserver/GameServer.java b/trunk/java/com/l2jserver/gameserver/GameServer.java index 4ab9ec0240..5c7aefc8e7 100644 --- a/trunk/java/com/l2jserver/gameserver/GameServer.java +++ b/trunk/java/com/l2jserver/gameserver/GameServer.java @@ -156,39 +156,23 @@ public final class GameServer { private static final Logger _log = Logger.getLogger(GameServer.class.getName()); + // Local Constants + private static final String LOG_FOLDER = "log"; // Name of folder for log file + private static final String LOG_NAME = "./log.cfg"; // Name of log file + private final SelectorThread _selectorThread; private final L2GamePacketHandler _gamePacketHandler; private final DeadLockDetector _deadDetectThread; public static GameServer gameServer; public static final Calendar dateTimeServerStarted = Calendar.getInstance(); - public long getUsedMemoryMB() - { - return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576; - } - - public SelectorThread getSelectorThread() - { - return _selectorThread; - } - - public L2GamePacketHandler getL2GamePacketHandler() - { - return _gamePacketHandler; - } - - public DeadLockDetector getDeadLockDetectorThread() - { - return _deadDetectThread; - } - public GameServer() throws Exception { long serverLoadStart = System.currentTimeMillis(); if (!IdFactory.getInstance().isInitialized()) { - _log.severe(getClass().getSimpleName() + ": Could not read object IDs from DB. Please check your data."); + _log.severe(getClass().getSimpleName() + ": Could not read object IDs from database. Please check your configuration."); throw new Exception("Could not initialize the ID factory!"); } @@ -497,9 +481,6 @@ public final class GameServer public static void main(String[] args) throws Exception { Server.serverMode = Server.MODE_GAMESERVER; - // Local Constants - final String LOG_FOLDER = "log"; // Name of folder for log file - final String LOG_NAME = "./log.cfg"; // Name of log file /*** Main ***/ // Create log folder @@ -524,6 +505,26 @@ public final class GameServer } } + public long getUsedMemoryMB() + { + return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576; + } + + public SelectorThread getSelectorThread() + { + return _selectorThread; + } + + public L2GamePacketHandler getL2GamePacketHandler() + { + return _gamePacketHandler; + } + + public DeadLockDetector getDeadLockDetectorThread() + { + return _deadDetectThread; + } + public static void printSection(String s) { s = "=[ " + s + " ]"; diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/L2Attackable.java b/trunk/java/com/l2jserver/gameserver/model/actor/L2Attackable.java index 1c830e8a8a..9ca5904cd2 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/L2Attackable.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/L2Attackable.java @@ -504,8 +504,8 @@ public class L2Attackable extends L2Npc if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) { - exp *= Config.L2JMOD_CHAMPION_REWARDS; - sp *= Config.L2JMOD_CHAMPION_REWARDS; + exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP; + sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP; } exp *= penalty; @@ -614,8 +614,8 @@ public class L2Attackable extends L2Npc if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) { - exp *= Config.L2JMOD_CHAMPION_REWARDS; - sp *= Config.L2JMOD_CHAMPION_REWARDS; + exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP; + sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP; } exp *= partyMul; diff --git a/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IAmountMultiplierStrategy.java b/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IAmountMultiplierStrategy.java index 6e3f8ddf6f..d04b556133 100644 --- a/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IAmountMultiplierStrategy.java +++ b/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IAmountMultiplierStrategy.java @@ -22,6 +22,7 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.drops.GeneralDropItem; +import com.l2jserver.gameserver.model.itemcontainer.Inventory; /** * @author Battlecruiser @@ -37,7 +38,10 @@ public interface IAmountMultiplierStrategy return (item, victim) -> { double multiplier = 1; - + if (victim.isChampion()) + { + multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS_AMOUNT : Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT; + } Float dropAmountMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId()); if (dropAmountMultiplier != null) { diff --git a/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java b/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java index 8e33999cc2..7a1bbd7228 100644 --- a/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java +++ b/trunk/java/com/l2jserver/gameserver/model/drops/strategy/IChanceMultiplierStrategy.java @@ -38,11 +38,11 @@ public interface IChanceMultiplierStrategy double championmult; if ((item.getItemId() == Inventory.ADENA_ID) || (item.getItemId() == Inventory.ANCIENT_ADENA_ID)) { - championmult = Config.L2JMOD_CHAMPION_ADENAS_REWARDS; + championmult = Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE; } else { - championmult = Config.L2JMOD_CHAMPION_REWARDS; + championmult = Config.L2JMOD_CHAMPION_REWARDS_CHANCE; } return (Config.L2JMOD_CHAMPION_ENABLE && (victim != null) && victim.isChampion()) ? (Config.RATE_QUEST_DROP * championmult) : Config.RATE_QUEST_DROP; @@ -55,7 +55,7 @@ public interface IChanceMultiplierStrategy float multiplier = 1; if (victim.isChampion()) { - multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS : Config.L2JMOD_CHAMPION_ADENAS_REWARDS; + multiplier *= item.getItemId() != Inventory.ADENA_ID ? Config.L2JMOD_CHAMPION_REWARDS_CHANCE : Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE; } Float dropChanceMultiplier = Config.RATE_DROP_CHANCE_MULTIPLIER.get(item.getItemId()); if (dropChanceMultiplier != null) diff --git a/trunk/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java b/trunk/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java index b370e4db96..ce3a2c515a 100644 --- a/trunk/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java +++ b/trunk/java/com/l2jserver/gameserver/model/entity/clanhall/ClanHallSiegeEngine.java @@ -87,7 +87,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable _hall.setSiege(this); _siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000); - _log.config(_hall.getName() + " siege scheduled for: " + getSiegeDate().getTime()); + _log.config(_hall.getName() + " siege scheduled for " + getSiegeDate().getTime() + "."); loadAttackers(); } @@ -109,7 +109,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable } catch (Exception e) { - _log.warning(getName() + ": Could not load siege attackers!:"); + _log.warning(getName() + ": Could not load siege attackers!"); } } @@ -134,11 +134,11 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable } } } - _log.config(getName() + ": Sucessfully saved attackers down to database!"); + _log.config(getName() + ": Successfully saved attackers to database."); } catch (Exception e) { - _log.warning(getName() + ": Couldnt save attacker list!"); + _log.warning(getName() + ": Couldn't save attacker list!"); } } @@ -168,7 +168,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable } catch (Exception e) { - _log.warning(getName() + ": Couldnt load siege guards!:"); + _log.warning(getName() + ": Couldnt load siege guards!"); } } } @@ -404,7 +404,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable onSiegeEnds(); _siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000); - _log.config("Siege of " + _hall.getName() + " scheduled for: " + _hall.getSiegeDate().getTime()); + _log.config("Siege of " + _hall.getName() + " scheduled for " + _hall.getSiegeDate().getTime() + "."); _hall.updateSiegeStatus(SiegeStatus.REGISTERING); unSpawnSiegeGuards(); @@ -415,7 +415,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable { cancelSiegeTask(); _siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - 3600000); - _log.config(_hall.getName() + " siege scheduled for: " + _hall.getSiegeDate().getTime().toString()); + _log.config(_hall.getName() + " siege scheduled for " + _hall.getSiegeDate().getTime().toString() + "."); } public void cancelSiegeTask() diff --git a/trunk/java/com/l2jserver/gameserver/model/events/AbstractScript.java b/trunk/java/com/l2jserver/gameserver/model/events/AbstractScript.java index 7a3daa16d3..1519dbf2bb 100644 --- a/trunk/java/com/l2jserver/gameserver/model/events/AbstractScript.java +++ b/trunk/java/com/l2jserver/gameserver/model/events/AbstractScript.java @@ -2301,16 +2301,17 @@ public abstract class AbstractScript implements INamable dropChance *= Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount if ((npc != null) && Config.L2JMOD_CHAMPION_ENABLE && npc.isChampion()) { - dropChance *= Config.L2JMOD_CHAMPION_REWARDS; if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID)) { - minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; - maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; + dropChance *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE; + minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT; + maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT; } else { - minAmount *= Config.L2JMOD_CHAMPION_REWARDS; - maxAmount *= Config.L2JMOD_CHAMPION_REWARDS; + dropChance *= Config.L2JMOD_CHAMPION_REWARDS_CHANCE; + minAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT; + maxAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT; } } diff --git a/trunk/java/com/l2jserver/gameserver/model/olympiad/AbstractOlympiadGame.java b/trunk/java/com/l2jserver/gameserver/model/olympiad/AbstractOlympiadGame.java index cb1cfc5907..ec6074d539 100644 --- a/trunk/java/com/l2jserver/gameserver/model/olympiad/AbstractOlympiadGame.java +++ b/trunk/java/com/l2jserver/gameserver/model/olympiad/AbstractOlympiadGame.java @@ -361,11 +361,15 @@ public abstract class AbstractOlympiadGame player.untransform(); } + if (player.isInOlympiadMode()) + { + player.sendPacket(new ExOlympiadMode(0)); + } + player.setIsInOlympiadMode(false); player.setIsOlympiadStart(false); player.setOlympiadSide(-1); player.setOlympiadGameId(-1); - player.sendPacket(new ExOlympiadMode(0)); // Add Clan Skills if (player.getClan() != null)