Sync with L2jServer HighFive Jul 30th 2015.
This commit is contained in:
@@ -189,7 +189,7 @@ public final class GameServer
|
||||
if (!IdFactory.getInstance().isInitialized())
|
||||
{
|
||||
_log.severe(getClass().getSimpleName() + ": Could not read object IDs from DB. Please check your data.");
|
||||
throw new Exception("Could not initialize the ID factory");
|
||||
throw new Exception("Could not initialize the ID factory!");
|
||||
}
|
||||
|
||||
ThreadPoolManager.getInstance();
|
||||
@@ -474,7 +474,7 @@ public final class GameServer
|
||||
}
|
||||
catch (UnknownHostException e1)
|
||||
{
|
||||
_log.log(Level.SEVERE, getClass().getSimpleName() + ": WARNING: The GameServer bind address is invalid, using all avaliable IPs. Reason: " + e1.getMessage(), e1);
|
||||
_log.log(Level.SEVERE, getClass().getSimpleName() + ": WARNING: The GameServer bind address is invalid, using all avaliable IPs! Reason: " + e1.getMessage(), e1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.l2jserver.gameserver.util.LinePointIterator;
|
||||
import com.l2jserver.gameserver.util.LinePointIterator3D;
|
||||
|
||||
/**
|
||||
* Geodata.
|
||||
* @author -Nemesiss-, HorridoJoho
|
||||
*/
|
||||
public class GeoData
|
||||
|
||||
@@ -140,15 +140,6 @@ public class LoginServerThread extends Thread
|
||||
_maxPlayer = Config.MAXIMUM_ONLINE_USERS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single instance of LoginServerThread.
|
||||
* @return single instance of LoginServerThread
|
||||
*/
|
||||
public static LoginServerThread getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
@@ -812,6 +803,15 @@ public class LoginServerThread extends Thread
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single instance of LoginServerThread.
|
||||
* @return single instance of LoginServerThread
|
||||
*/
|
||||
public static LoginServerThread getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final LoginServerThread _instance = new LoginServerThread();
|
||||
|
||||
@@ -76,9 +76,8 @@ public class MonsterRace
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, "", e);
|
||||
_log.log(Level.WARNING, "Unable to create monster!", e);
|
||||
}
|
||||
// _log.info("Monster "+i+" is id: "+(id+random));
|
||||
}
|
||||
newSpeeds();
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ public class Shutdown extends Thread
|
||||
// ignore
|
||||
}
|
||||
|
||||
// stop all threadpolls
|
||||
// stop all thread pools
|
||||
try
|
||||
{
|
||||
ThreadPoolManager.getInstance().shutdown();
|
||||
@@ -490,9 +490,6 @@ public class Shutdown extends Thread
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* if (Config.ACTIVATE_POSITION_RECORDER) Universe.getInstance().implode(true);
|
||||
*/
|
||||
TimeCounter tc = new TimeCounter();
|
||||
|
||||
// Save all raidboss and GrandBoss status ^_^
|
||||
|
||||
@@ -52,9 +52,9 @@ import com.l2jserver.util.StringUtil;
|
||||
* </ul>
|
||||
* or
|
||||
* <ul>
|
||||
* <li>{@link #scheduleEffectAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleEffectAtFixedRate(Runnable, long, long)} : for effects Tasks that needs to be executed periodicaly.</li>
|
||||
* <li>{@link #scheduleGeneralAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleGeneralAtFixedRate(Runnable, long, long)} : for scheduled Tasks that needs to be executed periodicaly.</li>
|
||||
* <li>{@link #scheduleAiAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleAiAtFixedRate(Runnable, long, long)} : for AI Tasks that needs to be executed periodicaly</li>
|
||||
* <li>{@link #scheduleEffectAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleEffectAtFixedRate(Runnable, long, long)} : for effects Tasks that needs to be executed periodically.</li>
|
||||
* <li>{@link #scheduleGeneralAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleGeneralAtFixedRate(Runnable, long, long)} : for scheduled Tasks that needs to be executed periodically.</li>
|
||||
* <li>{@link #scheduleAiAtFixedRate(Runnable, long, long, TimeUnit)} and {@link #scheduleAiAtFixedRate(Runnable, long, long)} : for AI Tasks that needs to be executed periodically</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
* <p>
|
||||
@@ -666,7 +666,7 @@ public class ThreadPoolManager
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "", e);
|
||||
_log.log(Level.WARNING, "There has been a problem shuting down the thread pool manager!", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
*/
|
||||
public interface Ctrl
|
||||
{
|
||||
|
||||
/**
|
||||
* Gets the actor.
|
||||
* @return the actor
|
||||
|
||||
@@ -38,7 +38,7 @@ public class HtmCache
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(HtmCache.class.getName());
|
||||
|
||||
private static final HTMLFilter htmlFilter = new HTMLFilter();
|
||||
private static final HTMLFilter HTML_FILTER = new HTMLFilter();
|
||||
|
||||
private static final Map<String, String> _cache = Config.LAZY_CACHE ? new ConcurrentHashMap<>() : new HashMap<>();
|
||||
|
||||
@@ -109,7 +109,7 @@ public class HtmCache
|
||||
|
||||
public String loadFile(File file)
|
||||
{
|
||||
if (!htmlFilter.accept(file))
|
||||
if (!HTML_FILTER.accept(file))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class HtmCache
|
||||
*/
|
||||
public boolean isLoadable(String path)
|
||||
{
|
||||
return htmlFilter.accept(new File(Config.DATAPACK_ROOT, path));
|
||||
return HTML_FILTER.accept(new File(Config.DATAPACK_ROOT, path));
|
||||
}
|
||||
|
||||
public static HtmCache getInstance()
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.ForumsBBSManager;
|
||||
import com.l2jserver.gameserver.communitybbs.Manager.TopicBBSManager;
|
||||
|
||||
public class Forum
|
||||
public final class Forum
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(Forum.class.getName());
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.l2jserver.gameserver.communitybbs.Manager.PostBBSManager;
|
||||
*/
|
||||
public class Post
|
||||
{
|
||||
private static Logger _log = Logger.getLogger(Post.class.getName());
|
||||
private static final Logger _log = Logger.getLogger(Post.class.getName());
|
||||
|
||||
public static class CPost
|
||||
{
|
||||
@@ -155,10 +155,10 @@ public class Post
|
||||
*/
|
||||
public void updatetxt(int i)
|
||||
{
|
||||
CPost cp = getCPost(i);
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("UPDATE posts SET post_txt=? WHERE post_id=? AND post_topic_id=? AND post_forum_id=?"))
|
||||
{
|
||||
CPost cp = getCPost(i);
|
||||
ps.setString(1, cp.postTxt);
|
||||
ps.setInt(2, cp.postId);
|
||||
ps.setInt(3, cp.postTopicId);
|
||||
|
||||
@@ -54,6 +54,14 @@ public class EnchantItemHPBonusData implements IXmlReader
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_armorHPBonuses.clear();
|
||||
parseDatapackFile("stats/enchantHPBonus.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _armorHPBonuses.size() + " Enchant HP Bonuses.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc)
|
||||
{
|
||||
@@ -111,14 +119,6 @@ public class EnchantItemHPBonusData implements IXmlReader
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_armorHPBonuses.clear();
|
||||
parseDatapackFile("stats/enchantHPBonus.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _armorHPBonuses.size() + " Enchant HP Bonuses.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HP bonus.
|
||||
* @param item the item
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.w3c.dom.Node;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Karma data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class KarmaData implements IXmlReader
|
||||
|
||||
@@ -111,7 +111,6 @@ public final class MultisellData implements IXmlReader
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
list.setUseRate(Config.class.getField(att.getNodeValue()).getDouble(Config.class));
|
||||
@@ -238,13 +237,13 @@ public final class MultisellData implements IXmlReader
|
||||
ListContainer template = _entries.get(listId);
|
||||
if (template == null)
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": can't find list id: " + listId + " requested by player: " + player.getName() + ", npcId:" + (npc != null ? npc.getId() : 0));
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Cannot find list ID: " + listId + " requested by player: " + player.getName() + ", NPC ID:" + (npc != null ? npc.getId() : 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!template.isNpcAllowed(-1) && (((npc != null) && !template.isNpcAllowed(npc.getId())) || ((npc == null) && template.isNpcOnly())))
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": player " + player + " attempted to open multisell " + listId + " from npc " + npc + " which is not allowed!");
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Player " + player + " attempted to open multisell " + listId + " from npc " + npc + " which is not allowed!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -386,14 +385,14 @@ public final class MultisellData implements IXmlReader
|
||||
{
|
||||
if (!verifyIngredient(ing))
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": can't find ingredient with itemId: " + ing.getItemId() + " in list: " + list.getListId());
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Cannot find ingredient with item ID: " + ing.getItemId() + " in list: " + list.getListId());
|
||||
}
|
||||
}
|
||||
for (Ingredient ing : ent.getProducts())
|
||||
{
|
||||
if (!verifyIngredient(ing))
|
||||
{
|
||||
LOGGER.warning(getClass().getSimpleName() + ": can't find product with itemId: " + ing.getItemId() + " in list: " + list.getListId());
|
||||
LOGGER.warning(getClass().getSimpleName() + ": Cannot find product with item ID: " + ing.getItemId() + " in list: " + list.getListId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.l2jserver.gameserver.model.stats.functions.FuncTemplate;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Item Option data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class OptionData implements IXmlReader
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.w3c.dom.Node;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Secondary Auth data.
|
||||
* @author NosBit
|
||||
*/
|
||||
public class SecondaryAuthData implements IXmlReader
|
||||
|
||||
@@ -33,6 +33,7 @@ import com.l2jserver.gameserver.util.Util;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Siege Schedule data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class SiegeScheduleData implements IXmlReader
|
||||
|
||||
@@ -30,7 +30,7 @@ import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Holds all skill learn data for all npcs.
|
||||
* Holds all skill learn data for all NPCs.
|
||||
* @author xban1x
|
||||
*/
|
||||
public final class SkillLearnData implements IXmlReader
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.l2jserver.gameserver.network.serverpackets.ExBasicActionList;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Transformation data.
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public final class TransformData implements IXmlReader
|
||||
|
||||
@@ -86,7 +86,7 @@ public final class SpawnTable implements IXmlReader
|
||||
/**
|
||||
* Verifies if the template exists and it's spawnable.
|
||||
* @param npcId the NPC ID
|
||||
* @return {@code true} if the NPC ID belongs to an spawnable tempalte, {@code false} otherwise
|
||||
* @return {@code true} if the NPC ID belongs to an spawnable template, {@code false} otherwise
|
||||
*/
|
||||
private boolean checkTemplate(int npcId)
|
||||
{
|
||||
@@ -342,10 +342,8 @@ public final class SpawnTable implements IXmlReader
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// problem with initializing spawn, go to next one
|
||||
LOGGER.log(Level.WARNING, "Spawn could not be initialized: " + e.getMessage(), e);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Instance Manager.
|
||||
* @author evill33t, GodKratos
|
||||
*/
|
||||
public final class InstanceManager implements IXmlReader
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.l2jserver.gameserver.model.zone.type.L2RespawnZone;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* Map Region Manager.
|
||||
* @author Nyaran
|
||||
*/
|
||||
public final class MapRegionManager implements IXmlReader
|
||||
|
||||
@@ -225,11 +225,8 @@ public final class ZoneManager implements IXmlReader
|
||||
continue;
|
||||
}
|
||||
|
||||
// Create this zone. Parsing for cuboids is a
|
||||
// bit different than for other polygons
|
||||
// cuboids need exactly 2 points to be defined.
|
||||
// Other polygons need at least 3 (one per
|
||||
// vertex)
|
||||
// Create this zone. Parsing for cuboids is a bit different than for other polygons cuboids need exactly 2 points to be defined.
|
||||
// Other polygons need at least 3 (one per vertex)
|
||||
if (zoneShape.equalsIgnoreCase("Cuboid"))
|
||||
{
|
||||
if (coords.length == 2)
|
||||
@@ -354,8 +351,7 @@ public final class ZoneManager implements IXmlReader
|
||||
|
||||
addZone(zoneId, temp);
|
||||
|
||||
// Register the zone into any world region it
|
||||
// intersects with...
|
||||
// Register the zone into any world region it intersects with...
|
||||
// currently 11136 test for each zone :>
|
||||
int ax, ay, bx, by;
|
||||
for (int x = 0; x < worldRegions.length; x++)
|
||||
|
||||
Reference in New Issue
Block a user