Sync with L2jServer HighFive Aug 21st 2015.

This commit is contained in:
MobiusDev 2015-08-21 19:26:53 +00:00
parent 4b3a3e6d1e
commit dc0694ccef
17 changed files with 116 additions and 82 deletions

View File

@ -33,11 +33,20 @@ ChampionHp = 8
# Hp Regen Multiplier for Champion mobs. # Hp Regen Multiplier for Champion mobs.
ChampionHpRegen = 1.0 ChampionHpRegen = 1.0
# Standard rewards multiplier for Champion mobs. # Exp/Sp rewards multiplier for Champion mobs.
ChampionRewards = 8 ChampionRewardsExpSp = 8.0
# Adena & Seal Stone rewards multiplier for Champion mobs. # Standard rewards chance multiplier for Champion mobs.
ChampionAdenasRewards = 1.0 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. # P. Attack and M. Attack bonus for Champion mobs.
ChampionAtk = 1.0 ChampionAtk = 1.0

View File

@ -245,7 +245,7 @@ public class TarBeetleSpawn implements IXmlReader
} }
catch (Exception e) catch (Exception e)
{ {
e.printStackTrace(); LOGGER.warning(getClass().getSimpleName() + ": Could not refresh spawns!");
} }
} }

View File

@ -104,7 +104,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI
else else
{ {
player.teleToLocation(TELEPORT); 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); return super.onTalk(npc, player);
} }

View File

@ -46,8 +46,7 @@ public final class FortressOfResistance extends ClanHallSiegeEngine
{ {
new Location(45109, 112124, -1900), // 30% new Location(45109, 112124, -1900), // 30%
new Location(47653, 110816, -2110), // 40% new Location(47653, 110816, -2110), // 40%
new Location(47247, 109396, -2000) new Location(47247, 109396, -2000), // 30%
// 30%
}; };
private L2Spawn _nurka; private L2Spawn _nurka;
@ -86,8 +85,7 @@ public final class FortressOfResistance extends ClanHallSiegeEngine
} }
catch (Exception e) catch (Exception e)
{ {
_log.warning(getName() + ": Couldnt set the Bloody Lord Nurka spawn"); _log.warning(getName() + ": Couldn't set the Bloody Lord Nurka spawn!");
e.printStackTrace();
} }
} }

View File

@ -686,7 +686,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
{ {
if ((arena < 0) || (arena > 3)) if ((arena < 0) || (arena > 3))
{ {
_log.warning("RainbowSptringChateau siege: Wrong arena id passed: " + arena); _log.warning("RainbowSptringChateau siege: Wrong arena ID passed: " + arena);
return; return;
} }
for (L2PcInstance pc : leader.getParty().getMembers()) for (L2PcInstance pc : leader.getParty().getMembers())
@ -725,7 +725,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
} }
catch (Exception e) catch (Exception e)
{ {
e.printStackTrace(); // _log.warning("Unable to spawn guard for clan index " + i + "!");
} }
} }
SpawnTable.getInstance().addNewSpawn(_gourds[i], false); SpawnTable.getInstance().addNewSpawn(_gourds[i], false);
@ -844,7 +844,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
} }
catch (Exception e) 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) 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() public void loadAttackers()
{ {
try (Connection con = ConnectionFactory.getInstance().getConnection(); 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) catch (Exception e)
{ {
e.printStackTrace(); _log.warning(RainbowSpringsChateau.class.getSigners() + ": Unable load attakers!");
} }
} }

View File

@ -547,7 +547,6 @@ public abstract class FlagWar extends ClanHallSiegeEngine
{ {
endSiege(); endSiege();
_log.warning(getName() + ": Problems in siege initialization!"); _log.warning(getName() + ": Problems in siege initialization!");
e.printStackTrace();
} }
} }
} }
@ -653,8 +652,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
} }
catch (Exception e) catch (Exception e)
{ {
_log.warning(getName() + ": Couldnt make clan spawns: " + e.getMessage()); _log.warning(getName() + ": Could not make clan spawns: " + e.getMessage());
e.printStackTrace();
} }
} }

View File

@ -22,6 +22,7 @@ import java.io.PrintWriter;
import java.net.Socket; import java.net.Socket;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.logging.Logger;
import com.l2jserver.Config; import com.l2jserver.Config;
import com.l2jserver.gameserver.data.sql.impl.CharNameTable; import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
@ -59,6 +60,8 @@ public class PlayerHandler implements ITelnetHandler
@Override @Override
public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime)
{ {
final Logger LOGGER = Logger.getLogger(PlayerHandler.class.getName());
if (command.startsWith("kick")) if (command.startsWith("kick"))
{ {
try try
@ -246,7 +249,7 @@ public class PlayerHandler implements ITelnetHandler
{ {
if (Config.DEBUG) 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) if (Config.DEBUG)
{ {
e.printStackTrace(); LOGGER.info("Could not unjail player via telnet!");
} }
} }
} }

View File

@ -104,7 +104,7 @@ public final class TeleportToRaceTrack extends AbstractNpcAI
else else
{ {
player.teleToLocation(TELEPORT); 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); return super.onTalk(npc, player);
} }

View File

@ -22,6 +22,7 @@ import java.io.PrintWriter;
import java.net.Socket; import java.net.Socket;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.logging.Logger;
import com.l2jserver.Config; import com.l2jserver.Config;
import com.l2jserver.gameserver.data.sql.impl.CharNameTable; import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
@ -59,6 +60,8 @@ public class PlayerHandler implements ITelnetHandler
@Override @Override
public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime)
{ {
final Logger LOGGER = Logger.getLogger(PlayerHandler.class.getName());
if (command.startsWith("kick")) if (command.startsWith("kick"))
{ {
try try
@ -246,7 +249,7 @@ public class PlayerHandler implements ITelnetHandler
{ {
if (Config.DEBUG) 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) if (Config.DEBUG)
{ {
e.printStackTrace(); LOGGER.info("Could not unjail player via telnet!");
} }
} }
} }

View File

@ -689,8 +689,11 @@ public final class Config
public static int L2JMOD_CHAMP_MIN_LVL; public static int L2JMOD_CHAMP_MIN_LVL;
public static int L2JMOD_CHAMP_MAX_LVL; public static int L2JMOD_CHAMP_MAX_LVL;
public static int L2JMOD_CHAMPION_HP; public static int L2JMOD_CHAMPION_HP;
public static int L2JMOD_CHAMPION_REWARDS; public static float L2JMOD_CHAMPION_REWARDS_EXP_SP;
public static float L2JMOD_CHAMPION_ADENAS_REWARDS; 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_HP_REGEN;
public static float L2JMOD_CHAMPION_ATK; public static float L2JMOD_CHAMPION_ATK;
public static float L2JMOD_CHAMPION_SPD_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_CHAMP_MAX_LVL = CustomSettings.getInt("ChampionMaxLevel", 60);
L2JMOD_CHAMPION_HP = CustomSettings.getInt("ChampionHp", 7); L2JMOD_CHAMPION_HP = CustomSettings.getInt("ChampionHp", 7);
L2JMOD_CHAMPION_HP_REGEN = CustomSettings.getFloat("ChampionHpRegen", 1); L2JMOD_CHAMPION_HP_REGEN = CustomSettings.getFloat("ChampionHpRegen", 1);
L2JMOD_CHAMPION_REWARDS = CustomSettings.getInt("ChampionRewards", 8); L2JMOD_CHAMPION_REWARDS_EXP_SP = CustomSettings.getFloat("ChampionRewardsExpSp", 8);
L2JMOD_CHAMPION_ADENAS_REWARDS = CustomSettings.getFloat("ChampionAdenasRewards", 1); 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_ATK = CustomSettings.getFloat("ChampionAtk", 1);
L2JMOD_CHAMPION_SPD_ATK = CustomSettings.getFloat("ChampionSpdAtk", 1); L2JMOD_CHAMPION_SPD_ATK = CustomSettings.getFloat("ChampionSpdAtk", 1);
L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = CustomSettings.getInt("ChampionRewardLowerLvlItemChance", 0); L2JMOD_CHAMPION_REWARD_LOWER_LVL_ITEM_CHANCE = CustomSettings.getInt("ChampionRewardLowerLvlItemChance", 0);
@ -3578,11 +3584,20 @@ public final class Config
case "championhpregen": case "championhpregen":
L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue); L2JMOD_CHAMPION_HP_REGEN = Float.parseFloat(pValue);
break; break;
case "championrewards": case "championrewardsexpsp":
L2JMOD_CHAMPION_REWARDS = Integer.parseInt(pValue); L2JMOD_CHAMPION_REWARDS_EXP_SP = Float.parseFloat(pValue);
break; break;
case "championadenasrewards": case "championrewardschance":
L2JMOD_CHAMPION_ADENAS_REWARDS = Float.parseFloat(pValue); 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; break;
case "championatk": case "championatk":
L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue); L2JMOD_CHAMPION_ATK = Float.parseFloat(pValue);

View File

@ -156,39 +156,23 @@ public final class GameServer
{ {
private static final Logger _log = Logger.getLogger(GameServer.class.getName()); 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<L2GameClient> _selectorThread; private final SelectorThread<L2GameClient> _selectorThread;
private final L2GamePacketHandler _gamePacketHandler; private final L2GamePacketHandler _gamePacketHandler;
private final DeadLockDetector _deadDetectThread; private final DeadLockDetector _deadDetectThread;
public static GameServer gameServer; public static GameServer gameServer;
public static final Calendar dateTimeServerStarted = Calendar.getInstance(); public static final Calendar dateTimeServerStarted = Calendar.getInstance();
public long getUsedMemoryMB()
{
return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576;
}
public SelectorThread<L2GameClient> getSelectorThread()
{
return _selectorThread;
}
public L2GamePacketHandler getL2GamePacketHandler()
{
return _gamePacketHandler;
}
public DeadLockDetector getDeadLockDetectorThread()
{
return _deadDetectThread;
}
public GameServer() throws Exception public GameServer() throws Exception
{ {
long serverLoadStart = System.currentTimeMillis(); long serverLoadStart = System.currentTimeMillis();
if (!IdFactory.getInstance().isInitialized()) 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!"); 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 public static void main(String[] args) throws Exception
{ {
Server.serverMode = Server.MODE_GAMESERVER; 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 ***/ /*** Main ***/
// Create log folder // Create log folder
@ -524,6 +505,26 @@ public final class GameServer
} }
} }
public long getUsedMemoryMB()
{
return (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576;
}
public SelectorThread<L2GameClient> getSelectorThread()
{
return _selectorThread;
}
public L2GamePacketHandler getL2GamePacketHandler()
{
return _gamePacketHandler;
}
public DeadLockDetector getDeadLockDetectorThread()
{
return _deadDetectThread;
}
public static void printSection(String s) public static void printSection(String s)
{ {
s = "=[ " + s + " ]"; s = "=[ " + s + " ]";

View File

@ -504,8 +504,8 @@ public class L2Attackable extends L2Npc
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
{ {
exp *= Config.L2JMOD_CHAMPION_REWARDS; exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
sp *= Config.L2JMOD_CHAMPION_REWARDS; sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
} }
exp *= penalty; exp *= penalty;
@ -614,8 +614,8 @@ public class L2Attackable extends L2Npc
if (Config.L2JMOD_CHAMPION_ENABLE && isChampion()) if (Config.L2JMOD_CHAMPION_ENABLE && isChampion())
{ {
exp *= Config.L2JMOD_CHAMPION_REWARDS; exp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
sp *= Config.L2JMOD_CHAMPION_REWARDS; sp *= Config.L2JMOD_CHAMPION_REWARDS_EXP_SP;
} }
exp *= partyMul; exp *= partyMul;

View File

@ -22,6 +22,7 @@ import com.l2jserver.Config;
import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.datatables.ItemTable;
import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.drops.GeneralDropItem; import com.l2jserver.gameserver.model.drops.GeneralDropItem;
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
/** /**
* @author Battlecruiser * @author Battlecruiser
@ -37,7 +38,10 @@ public interface IAmountMultiplierStrategy
return (item, victim) -> return (item, victim) ->
{ {
double multiplier = 1; 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()); Float dropAmountMultiplier = Config.RATE_DROP_AMOUNT_MULTIPLIER.get(item.getItemId());
if (dropAmountMultiplier != null) if (dropAmountMultiplier != null)
{ {

View File

@ -38,11 +38,11 @@ public interface IChanceMultiplierStrategy
double championmult; double championmult;
if ((item.getItemId() == Inventory.ADENA_ID) || (item.getItemId() == Inventory.ANCIENT_ADENA_ID)) 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 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; 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; float multiplier = 1;
if (victim.isChampion()) 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()); Float dropChanceMultiplier = Config.RATE_DROP_CHANCE_MULTIPLIER.get(item.getItemId());
if (dropChanceMultiplier != null) if (dropChanceMultiplier != null)

View File

@ -87,7 +87,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
_hall.setSiege(this); _hall.setSiege(this);
_siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000); _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(); loadAttackers();
} }
@ -109,7 +109,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
} }
catch (Exception e) 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) 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) 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(); onSiegeEnds();
_siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - System.currentTimeMillis() - 3600000); _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); _hall.updateSiegeStatus(SiegeStatus.REGISTERING);
unSpawnSiegeGuards(); unSpawnSiegeGuards();
@ -415,7 +415,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
{ {
cancelSiegeTask(); cancelSiegeTask();
_siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getNextSiegeTime() - 3600000); _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() public void cancelSiegeTask()

View File

@ -2301,16 +2301,17 @@ public abstract class AbstractScript implements INamable
dropChance *= Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount dropChance *= Config.RATE_QUEST_DROP; // TODO separate configs for rate and amount
if ((npc != null) && Config.L2JMOD_CHAMPION_ENABLE && npc.isChampion()) if ((npc != null) && Config.L2JMOD_CHAMPION_ENABLE && npc.isChampion())
{ {
dropChance *= Config.L2JMOD_CHAMPION_REWARDS;
if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID)) if ((itemId == Inventory.ADENA_ID) || (itemId == Inventory.ANCIENT_ADENA_ID))
{ {
minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; dropChance *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_CHANCE;
maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS; minAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
maxAmount *= Config.L2JMOD_CHAMPION_ADENAS_REWARDS_AMOUNT;
} }
else else
{ {
minAmount *= Config.L2JMOD_CHAMPION_REWARDS; dropChance *= Config.L2JMOD_CHAMPION_REWARDS_CHANCE;
maxAmount *= Config.L2JMOD_CHAMPION_REWARDS; minAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT;
maxAmount *= Config.L2JMOD_CHAMPION_REWARDS_AMOUNT;
} }
} }

View File

@ -361,11 +361,15 @@ public abstract class AbstractOlympiadGame
player.untransform(); player.untransform();
} }
if (player.isInOlympiadMode())
{
player.sendPacket(new ExOlympiadMode(0));
}
player.setIsInOlympiadMode(false); player.setIsInOlympiadMode(false);
player.setIsOlympiadStart(false); player.setIsOlympiadStart(false);
player.setOlympiadSide(-1); player.setOlympiadSide(-1);
player.setOlympiadGameId(-1); player.setOlympiadGameId(-1);
player.sendPacket(new ExOlympiadMode(0));
// Add Clan Skills // Add Clan Skills
if (player.getClan() != null) if (player.getClan() != null)