Sync with L2jServer HighFive Mar 25th 2015.
This commit is contained in:
@@ -25,8 +25,8 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Auction
|
||||
private long _currentBid = 0;
|
||||
private long _startingBid = 0;
|
||||
|
||||
private final Map<Integer, Bidder> _bidders = new HashMap<>();
|
||||
private final Map<Integer, Bidder> _bidders = new ConcurrentHashMap<>();
|
||||
|
||||
private static final String[] ItemTypeName =
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public class Auction
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
if (getBidders().get(bidder.getClanId()) != null)
|
||||
if (_bidders.get(bidder.getClanId()) != null)
|
||||
{
|
||||
try (PreparedStatement statement = con.prepareStatement("UPDATE auction_bid SET bidderId=?, bidderName=?, maxBid=?, time_bid=? WHERE auctionId=? AND bidderId=?"))
|
||||
{
|
||||
|
@@ -18,9 +18,11 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -61,15 +63,15 @@ public final class BlockCheckerEngine
|
||||
// The object which holds all basic members info
|
||||
protected ArenaParticipantsHolder _holder;
|
||||
// Maps to hold player of each team and his points
|
||||
protected HashMap<L2PcInstance, Integer> _redTeamPoints = new HashMap<>();
|
||||
protected HashMap<L2PcInstance, Integer> _blueTeamPoints = new HashMap<>();
|
||||
protected Map<L2PcInstance, Integer> _redTeamPoints = new ConcurrentHashMap<>();
|
||||
protected Map<L2PcInstance, Integer> _blueTeamPoints = new ConcurrentHashMap<>();
|
||||
// The initial points of the event
|
||||
protected int _redPoints = 15;
|
||||
protected int _bluePoints = 15;
|
||||
// Current used arena
|
||||
protected int _arena = -1;
|
||||
// All blocks
|
||||
protected ArrayList<L2Spawn> _spawns = new ArrayList<>();
|
||||
protected List<L2Spawn> _spawns = new CopyOnWriteArrayList<>();
|
||||
// Sets if the red team won the event at the end of this (used for packets)
|
||||
protected boolean _isRedWinner;
|
||||
// Time when the event starts. Used on packet sending
|
||||
@@ -118,7 +120,7 @@ public final class BlockCheckerEngine
|
||||
// Common z coordinate
|
||||
private static final int _zCoord = -2405;
|
||||
// List of dropped items in event (for later deletion)
|
||||
protected ArrayList<L2ItemInstance> _drops = new ArrayList<>();
|
||||
protected List<L2ItemInstance> _drops = new CopyOnWriteArrayList<>();
|
||||
// Default arena
|
||||
private static final byte DEFAULT_ARENA = -1;
|
||||
// Event is started
|
||||
@@ -597,12 +599,6 @@ public final class BlockCheckerEngine
|
||||
|
||||
for (L2ItemInstance item : _drops)
|
||||
{
|
||||
// npe
|
||||
if (item == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// a player has it, it will be deleted later
|
||||
if (!item.isVisible() || (item.getOwnerId() != 0))
|
||||
{
|
||||
@@ -651,12 +647,12 @@ public final class BlockCheckerEngine
|
||||
}
|
||||
|
||||
/**
|
||||
* Reward the speicifed team as a winner team 1) Higher score - 8 extra 2) Higher score - 5 extra
|
||||
* Reward the specified team as a winner team 1) Higher score - 8 extra 2) Higher score - 5 extra
|
||||
* @param isRed
|
||||
*/
|
||||
private void rewardAsWinner(boolean isRed)
|
||||
{
|
||||
HashMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
Map<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
|
||||
// Main give
|
||||
for (Entry<L2PcInstance, Integer> points : tempPoints.entrySet())
|
||||
@@ -713,7 +709,7 @@ public final class BlockCheckerEngine
|
||||
*/
|
||||
private void rewardAsLooser(boolean isRed)
|
||||
{
|
||||
HashMap<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
Map<L2PcInstance, Integer> tempPoints = isRed ? _redTeamPoints : _blueTeamPoints;
|
||||
|
||||
for (Entry<L2PcInstance, Integer> entry : tempPoints.entrySet())
|
||||
{
|
||||
@@ -726,7 +722,7 @@ public final class BlockCheckerEngine
|
||||
}
|
||||
|
||||
/**
|
||||
* Telport players back, give status back and send final packet
|
||||
* Teleport players back, give status back and send final packet
|
||||
*/
|
||||
private void setPlayersBack()
|
||||
{
|
||||
|
@@ -23,10 +23,10 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -243,7 +243,7 @@ public final class Castle extends AbstractResidence
|
||||
{
|
||||
super(castleId);
|
||||
load();
|
||||
_function = new HashMap<>();
|
||||
_function = new ConcurrentHashMap<>();
|
||||
initResidenceZone();
|
||||
spawnSideNpcs();
|
||||
if (getOwnerId() != 0)
|
||||
@@ -260,11 +260,7 @@ public final class Castle extends AbstractResidence
|
||||
*/
|
||||
public CastleFunction getFunction(int type)
|
||||
{
|
||||
if (_function.containsKey(type))
|
||||
{
|
||||
return _function.get(type);
|
||||
}
|
||||
return null;
|
||||
return _function.get(type);
|
||||
}
|
||||
|
||||
public synchronized void engrave(L2Clan clan, L2Object target, CastleSide side)
|
||||
|
@@ -22,8 +22,8 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -212,7 +212,7 @@ public abstract class ClanHall
|
||||
_ownerId = set.getInt("ownerId");
|
||||
_desc = set.getString("desc");
|
||||
_location = set.getString("location");
|
||||
_functions = new HashMap<>();
|
||||
_functions = new ConcurrentHashMap<>();
|
||||
|
||||
if (_ownerId > 0)
|
||||
{
|
||||
@@ -306,11 +306,7 @@ public abstract class ClanHall
|
||||
*/
|
||||
public ClanHallFunction getFunction(int type)
|
||||
{
|
||||
if (_functions.get(type) != null)
|
||||
{
|
||||
return _functions.get(type);
|
||||
}
|
||||
return null;
|
||||
return _functions.get(type);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
@@ -108,7 +107,7 @@ public class Duel
|
||||
private double _cp;
|
||||
private boolean _paDuel;
|
||||
private int _x, _y, _z;
|
||||
private ArrayList<Skill> _debuffs;
|
||||
private List<Skill> _debuffs;
|
||||
|
||||
public PlayerCondition(L2PcInstance player, boolean partyDuel)
|
||||
{
|
||||
@@ -160,7 +159,7 @@ public class Duel
|
||||
{
|
||||
if (_debuffs == null)
|
||||
{
|
||||
_debuffs = new ArrayList<>();
|
||||
_debuffs = new CopyOnWriteArrayList<>();
|
||||
}
|
||||
|
||||
_debuffs.add(debuff);
|
||||
|
@@ -28,6 +28,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
@@ -76,14 +78,14 @@ public final class Fort extends AbstractResidence
|
||||
private int _state = 0;
|
||||
private int _castleId = 0;
|
||||
private int _supplyLvL = 0;
|
||||
private final HashMap<Integer, FortFunction> _function;
|
||||
private final Map<Integer, FortFunction> _function;
|
||||
private final ScheduledFuture<?>[] _FortUpdater = new ScheduledFuture<?>[2];
|
||||
|
||||
// Spawn Data
|
||||
private boolean _isSuspiciousMerchantSpawned = false;
|
||||
private final ArrayList<L2Spawn> _siegeNpcs = new ArrayList<>();
|
||||
private final ArrayList<L2Spawn> _npcCommanders = new ArrayList<>();
|
||||
private final ArrayList<L2Spawn> _specialEnvoys = new ArrayList<>();
|
||||
private final List<L2Spawn> _siegeNpcs = new CopyOnWriteArrayList<>();
|
||||
private final List<L2Spawn> _npcCommanders = new CopyOnWriteArrayList<>();
|
||||
private final List<L2Spawn> _specialEnvoys = new CopyOnWriteArrayList<>();
|
||||
|
||||
private final Map<Integer, Integer> _envoyCastles = new HashMap<>(2);
|
||||
private final Set<Integer> _availableCastles = new HashSet<>(1);
|
||||
@@ -242,7 +244,7 @@ public final class Fort extends AbstractResidence
|
||||
super(fortId);
|
||||
load();
|
||||
loadFlagPoles();
|
||||
_function = new HashMap<>();
|
||||
_function = new ConcurrentHashMap<>();
|
||||
if (getOwnerClan() != null)
|
||||
{
|
||||
setVisibleFlag(true);
|
||||
@@ -268,11 +270,7 @@ public final class Fort extends AbstractResidence
|
||||
*/
|
||||
public FortFunction getFunction(int type)
|
||||
{
|
||||
if (_function.get(type) != null)
|
||||
{
|
||||
return _function.get(type);
|
||||
}
|
||||
return null;
|
||||
return _function.get(type);
|
||||
}
|
||||
|
||||
public void endOfSiege(L2Clan clan)
|
||||
|
@@ -21,9 +21,10 @@ package com.l2jserver.gameserver.model.entity;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -224,10 +225,10 @@ public class FortSiege implements Siegable
|
||||
}
|
||||
}
|
||||
|
||||
private final List<L2SiegeClan> _attackerClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _attackerClans = new CopyOnWriteArrayList<>();
|
||||
|
||||
// Fort setting
|
||||
protected ArrayList<L2Spawn> _commanders = new ArrayList<>();
|
||||
protected List<L2Spawn> _commanders = new CopyOnWriteArrayList<>();
|
||||
protected final Fort _fort;
|
||||
private boolean _isInProgress = false;
|
||||
private FortSiegeGuardManager _siegeGuardManager;
|
||||
@@ -364,10 +365,7 @@ public class FortSiege implements Siegable
|
||||
clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
for (L2PcInstance member : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (member != null)
|
||||
{
|
||||
member.sendPacket(sm);
|
||||
}
|
||||
member.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
if (getFort().getOwnerClan() != null)
|
||||
@@ -397,11 +395,6 @@ public class FortSiege implements Siegable
|
||||
clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
for (L2PcInstance member : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (member == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (clear)
|
||||
{
|
||||
member.setSiegeState((byte) 0);
|
||||
@@ -550,18 +543,12 @@ public class FortSiege implements Siegable
|
||||
@Override
|
||||
public List<L2PcInstance> getAttackersInZone()
|
||||
{
|
||||
List<L2PcInstance> players = new ArrayList<>();
|
||||
L2Clan clan;
|
||||
final List<L2PcInstance> players = new LinkedList<>();
|
||||
for (L2SiegeClan siegeclan : getAttackerClans())
|
||||
{
|
||||
clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
L2Clan clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
for (L2PcInstance player : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.isInSiege())
|
||||
{
|
||||
players.add(player);
|
||||
@@ -584,11 +571,10 @@ public class FortSiege implements Siegable
|
||||
*/
|
||||
public List<L2PcInstance> getOwnersInZone()
|
||||
{
|
||||
List<L2PcInstance> players = new ArrayList<>();
|
||||
L2Clan clan;
|
||||
final List<L2PcInstance> players = new LinkedList<>();
|
||||
if (getFort().getOwnerClan() != null)
|
||||
{
|
||||
clan = ClanTable.getInstance().getClan(getFort().getOwnerClan().getId());
|
||||
L2Clan clan = ClanTable.getInstance().getClan(getFort().getOwnerClan().getId());
|
||||
if (clan != getFort().getOwnerClan())
|
||||
{
|
||||
return null;
|
||||
@@ -596,11 +582,6 @@ public class FortSiege implements Siegable
|
||||
|
||||
for (L2PcInstance player : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.isInSiege())
|
||||
{
|
||||
players.add(player);
|
||||
@@ -617,12 +598,12 @@ public class FortSiege implements Siegable
|
||||
*/
|
||||
public void killedCommander(L2FortCommanderInstance instance)
|
||||
{
|
||||
if ((_commanders != null) && (getFort() != null) && (_commanders.size() != 0))
|
||||
if (!_commanders.isEmpty() && (getFort() != null))
|
||||
{
|
||||
L2Spawn spawn = instance.getSpawn();
|
||||
if (spawn != null)
|
||||
{
|
||||
ArrayList<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
List<FortSiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getResidenceId());
|
||||
for (FortSiegeSpawn spawn2 : commanders)
|
||||
{
|
||||
if (spawn2.getId() == spawn.getId())
|
||||
|
@@ -28,11 +28,10 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.logging.Level;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
@@ -76,14 +75,14 @@ public class Hero
|
||||
// delete hero items
|
||||
private static final String DELETE_ITEMS = "DELETE FROM items WHERE item_id IN (6842, 6611, 6612, 6613, 6614, 6615, 6616, 6617, 6618, 6619, 6620, 6621, 9388, 9389, 9390) AND owner_id NOT IN (SELECT charId FROM characters WHERE accesslevel > 0)";
|
||||
|
||||
private static final Map<Integer, StatsSet> _heroes = new HashMap<>();
|
||||
private static final Map<Integer, StatsSet> _completeHeroes = new HashMap<>();
|
||||
private static final Map<Integer, StatsSet> HEROES = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, StatsSet> COMPLETE_HEROS = new ConcurrentHashMap<>();
|
||||
|
||||
private static final Map<Integer, StatsSet> _herocounts = new HashMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> _herofights = new HashMap<>();
|
||||
private static final Map<Integer, StatsSet> HERO_COUNTS = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> HERO_FIGHTS = new ConcurrentHashMap<>();
|
||||
|
||||
private static final Map<Integer, List<StatsSet>> _herodiary = new HashMap<>();
|
||||
private static final Map<Integer, String> _heroMessage = new HashMap<>();
|
||||
private static final Map<Integer, List<StatsSet>> HERO_DIARY = new ConcurrentHashMap<>();
|
||||
private static final Map<Integer, String> HERO_MESSAGE = new ConcurrentHashMap<>();
|
||||
|
||||
public static final String COUNT = "count";
|
||||
public static final String PLAYED = "played";
|
||||
@@ -97,11 +96,6 @@ public class Hero
|
||||
public static final int ACTION_HERO_GAINED = 2;
|
||||
public static final int ACTION_CASTLE_TAKEN = 3;
|
||||
|
||||
public static Hero getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
protected Hero()
|
||||
{
|
||||
init();
|
||||
@@ -109,12 +103,12 @@ public class Hero
|
||||
|
||||
private void init()
|
||||
{
|
||||
_heroes.clear();
|
||||
_completeHeroes.clear();
|
||||
_herocounts.clear();
|
||||
_herofights.clear();
|
||||
_herodiary.clear();
|
||||
_heroMessage.clear();
|
||||
HEROES.clear();
|
||||
COMPLETE_HEROS.clear();
|
||||
HERO_COUNTS.clear();
|
||||
HERO_FIGHTS.clear();
|
||||
HERO_DIARY.clear();
|
||||
HERO_MESSAGE.clear();
|
||||
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
Statement s1 = con.createStatement();
|
||||
@@ -139,7 +133,7 @@ public class Hero
|
||||
|
||||
processHeros(ps, charId, hero);
|
||||
|
||||
_heroes.put(charId, hero);
|
||||
HEROES.put(charId, hero);
|
||||
}
|
||||
|
||||
while (rset2.next())
|
||||
@@ -154,16 +148,16 @@ public class Hero
|
||||
|
||||
processHeros(ps, charId, hero);
|
||||
|
||||
_completeHeroes.put(charId, hero);
|
||||
COMPLETE_HEROS.put(charId, hero);
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Hero System: Couldnt load Heroes", e);
|
||||
_log.warning("Hero System: Couldnt load Heroes: " + e.getMessage());
|
||||
}
|
||||
|
||||
_log.info("Hero System: Loaded " + _heroes.size() + " Heroes.");
|
||||
_log.info("Hero System: Loaded " + _completeHeroes.size() + " all time Heroes.");
|
||||
_log.info("Hero System: Loaded " + HEROES.size() + " Heroes.");
|
||||
_log.info("Hero System: Loaded " + COMPLETE_HEROS.size() + " all time Heroes.");
|
||||
}
|
||||
|
||||
private void processHeros(PreparedStatement ps, int charId, StatsSet hero) throws SQLException
|
||||
@@ -222,19 +216,19 @@ public class Hero
|
||||
{
|
||||
if (rset.next())
|
||||
{
|
||||
_heroMessage.put(charId, rset.getString("message"));
|
||||
HERO_MESSAGE.put(charId, rset.getString("message"));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Hero System: Couldnt load Hero Message for CharId: " + charId, e);
|
||||
_log.warning("Hero System: Couldnt load Hero Message for CharId: " + charId + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void loadDiary(int charId)
|
||||
{
|
||||
final List<StatsSet> _diary = new ArrayList<>();
|
||||
final List<StatsSet> diary = new ArrayList<>();
|
||||
int diaryentries = 0;
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT * FROM heroes_diary WHERE charId=? ORDER BY time ASC"))
|
||||
@@ -273,31 +267,31 @@ public class Hero
|
||||
_diaryentry.set("action", castle.getName() + " Castle was successfuly taken");
|
||||
}
|
||||
}
|
||||
_diary.add(_diaryentry);
|
||||
diary.add(_diaryentry);
|
||||
diaryentries++;
|
||||
}
|
||||
}
|
||||
_herodiary.put(charId, _diary);
|
||||
HERO_DIARY.put(charId, diary);
|
||||
|
||||
_log.info("Hero System: Loaded " + diaryentries + " diary entries for Hero: " + CharNameTable.getInstance().getNameById(charId));
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Hero System: Couldnt load Hero Diary for CharId: " + charId, e);
|
||||
_log.warning("Hero System: Couldnt load Hero Diary for CharId: " + charId + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void loadFights(int charId)
|
||||
{
|
||||
final List<StatsSet> _fights = new ArrayList<>();
|
||||
StatsSet _herocountdata = new StatsSet();
|
||||
Calendar _data = Calendar.getInstance();
|
||||
_data.set(Calendar.DAY_OF_MONTH, 1);
|
||||
_data.set(Calendar.HOUR_OF_DAY, 0);
|
||||
_data.set(Calendar.MINUTE, 0);
|
||||
_data.set(Calendar.MILLISECOND, 0);
|
||||
final List<StatsSet> fights = new ArrayList<>();
|
||||
StatsSet heroCountData = new StatsSet();
|
||||
Calendar data = Calendar.getInstance();
|
||||
data.set(Calendar.DAY_OF_MONTH, 1);
|
||||
data.set(Calendar.HOUR_OF_DAY, 0);
|
||||
data.set(Calendar.MINUTE, 0);
|
||||
data.set(Calendar.MILLISECOND, 0);
|
||||
|
||||
long from = _data.getTimeInMillis();
|
||||
long from = data.getTimeInMillis();
|
||||
int numberoffights = 0;
|
||||
int _victorys = 0;
|
||||
int _losses = 0;
|
||||
@@ -361,7 +355,7 @@ public class Hero
|
||||
_draws++;
|
||||
}
|
||||
|
||||
_fights.add(fight);
|
||||
fights.add(fight);
|
||||
|
||||
numberoffights++;
|
||||
}
|
||||
@@ -397,7 +391,7 @@ public class Hero
|
||||
_draws++;
|
||||
}
|
||||
|
||||
_fights.add(fight);
|
||||
fights.add(fight);
|
||||
|
||||
numberoffights++;
|
||||
}
|
||||
@@ -405,29 +399,29 @@ public class Hero
|
||||
}
|
||||
}
|
||||
|
||||
_herocountdata.set("victory", _victorys);
|
||||
_herocountdata.set("draw", _draws);
|
||||
_herocountdata.set("loss", _losses);
|
||||
heroCountData.set("victory", _victorys);
|
||||
heroCountData.set("draw", _draws);
|
||||
heroCountData.set("loss", _losses);
|
||||
|
||||
_herocounts.put(charId, _herocountdata);
|
||||
_herofights.put(charId, _fights);
|
||||
HERO_COUNTS.put(charId, heroCountData);
|
||||
HERO_FIGHTS.put(charId, fights);
|
||||
|
||||
_log.info("Hero System: Loaded " + numberoffights + " fights for Hero: " + CharNameTable.getInstance().getNameById(charId));
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Hero System: Couldnt load Hero fights history for CharId: " + charId, e);
|
||||
_log.warning("Hero System: Couldnt load Hero fights history for CharId: " + charId + ": " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Integer, StatsSet> getHeroes()
|
||||
{
|
||||
return _heroes;
|
||||
return HEROES;
|
||||
}
|
||||
|
||||
public int getHeroByClass(int classid)
|
||||
{
|
||||
for (Entry<Integer, StatsSet> e : _heroes.entrySet())
|
||||
for (Entry<Integer, StatsSet> e : HEROES.entrySet())
|
||||
{
|
||||
if (e.getValue().getInt(Olympiad.CLASS_ID) == classid)
|
||||
{
|
||||
@@ -439,42 +433,42 @@ public class Hero
|
||||
|
||||
public void resetData()
|
||||
{
|
||||
_herodiary.clear();
|
||||
_herofights.clear();
|
||||
_herocounts.clear();
|
||||
_heroMessage.clear();
|
||||
HERO_DIARY.clear();
|
||||
HERO_FIGHTS.clear();
|
||||
HERO_COUNTS.clear();
|
||||
HERO_MESSAGE.clear();
|
||||
}
|
||||
|
||||
public void showHeroDiary(L2PcInstance activeChar, int heroclass, int charid, int page)
|
||||
{
|
||||
final int perpage = 10;
|
||||
|
||||
if (_herodiary.containsKey(charid))
|
||||
final List<StatsSet> mainList = HERO_DIARY.get(charid);
|
||||
if (mainList != null)
|
||||
{
|
||||
List<StatsSet> _mainlist = _herodiary.get(charid);
|
||||
final NpcHtmlMessage DiaryReply = new NpcHtmlMessage();
|
||||
final NpcHtmlMessage diaryReply = new NpcHtmlMessage();
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/olympiad/herodiary.htm");
|
||||
if ((htmContent != null) && _heroMessage.containsKey(charid))
|
||||
final String heroMessage = HERO_MESSAGE.get(charid);
|
||||
if ((htmContent != null) && (heroMessage != null))
|
||||
{
|
||||
DiaryReply.setHtml(htmContent);
|
||||
DiaryReply.replace("%heroname%", CharNameTable.getInstance().getNameById(charid));
|
||||
DiaryReply.replace("%message%", _heroMessage.get(charid));
|
||||
DiaryReply.disableValidation();
|
||||
diaryReply.setHtml(htmContent);
|
||||
diaryReply.replace("%heroname%", CharNameTable.getInstance().getNameById(charid));
|
||||
diaryReply.replace("%message%", heroMessage);
|
||||
diaryReply.disableValidation();
|
||||
|
||||
if (!_mainlist.isEmpty())
|
||||
if (!mainList.isEmpty())
|
||||
{
|
||||
final ArrayList<StatsSet> _list = new ArrayList<>();
|
||||
_list.addAll(_mainlist);
|
||||
Collections.reverse(_list);
|
||||
final List<StatsSet> list = new ArrayList<>(mainList);
|
||||
Collections.reverse(list);
|
||||
|
||||
boolean color = true;
|
||||
final StringBuilder fList = new StringBuilder(500);
|
||||
int counter = 0;
|
||||
int breakat = 0;
|
||||
for (int i = ((page - 1) * perpage); i < _list.size(); i++)
|
||||
for (int i = ((page - 1) * perpage); i < list.size(); i++)
|
||||
{
|
||||
breakat = i;
|
||||
StatsSet _diaryentry = _list.get(i);
|
||||
StatsSet diaryEntry = list.get(i);
|
||||
StringUtil.append(fList, "<tr><td>");
|
||||
if (color)
|
||||
{
|
||||
@@ -484,8 +478,8 @@ public class Hero
|
||||
{
|
||||
StringUtil.append(fList, "<table width=270>");
|
||||
}
|
||||
StringUtil.append(fList, "<tr><td width=270><font color=\"LEVEL\">" + _diaryentry.getString("date") + ":xx</font></td></tr>");
|
||||
StringUtil.append(fList, "<tr><td width=270>" + _diaryentry.getString("action") + "</td></tr>");
|
||||
StringUtil.append(fList, "<tr><td width=270><font color=\"LEVEL\">" + diaryEntry.getString("date") + ":xx</font></td></tr>");
|
||||
StringUtil.append(fList, "<tr><td width=270>" + diaryEntry.getString("action") + "</td></tr>");
|
||||
StringUtil.append(fList, "<tr><td> </td></tr></table>");
|
||||
StringUtil.append(fList, "</td></tr>");
|
||||
color = !color;
|
||||
@@ -496,34 +490,34 @@ public class Hero
|
||||
}
|
||||
}
|
||||
|
||||
if (breakat < (_list.size() - 1))
|
||||
if (breakat < (list.size() - 1))
|
||||
{
|
||||
DiaryReply.replace("%buttprev%", "<button value=\"Prev\" action=\"bypass _diary?class=" + heroclass + "&page=" + (page + 1) + "\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
diaryReply.replace("%buttprev%", "<button value=\"Prev\" action=\"bypass _diary?class=" + heroclass + "&page=" + (page + 1) + "\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
}
|
||||
else
|
||||
{
|
||||
DiaryReply.replace("%buttprev%", "");
|
||||
diaryReply.replace("%buttprev%", "");
|
||||
}
|
||||
|
||||
if (page > 1)
|
||||
{
|
||||
DiaryReply.replace("%buttnext%", "<button value=\"Next\" action=\"bypass _diary?class=" + heroclass + "&page=" + (page - 1) + "\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
diaryReply.replace("%buttnext%", "<button value=\"Next\" action=\"bypass _diary?class=" + heroclass + "&page=" + (page - 1) + "\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
}
|
||||
else
|
||||
{
|
||||
DiaryReply.replace("%buttnext%", "");
|
||||
diaryReply.replace("%buttnext%", "");
|
||||
}
|
||||
|
||||
DiaryReply.replace("%list%", fList.toString());
|
||||
diaryReply.replace("%list%", fList.toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
DiaryReply.replace("%list%", "");
|
||||
DiaryReply.replace("%buttprev%", "");
|
||||
DiaryReply.replace("%buttnext%", "");
|
||||
diaryReply.replace("%list%", "");
|
||||
diaryReply.replace("%buttprev%", "");
|
||||
diaryReply.replace("%buttnext%", "");
|
||||
}
|
||||
|
||||
activeChar.sendPacket(DiaryReply);
|
||||
activeChar.sendPacket(diaryReply);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,10 +529,9 @@ public class Hero
|
||||
int _loss = 0;
|
||||
int _draw = 0;
|
||||
|
||||
if (_herofights.containsKey(charid))
|
||||
final List<StatsSet> heroFights = HERO_FIGHTS.get(charid);
|
||||
if (heroFights != null)
|
||||
{
|
||||
List<StatsSet> _list = _herofights.get(charid);
|
||||
|
||||
final NpcHtmlMessage FightReply = new NpcHtmlMessage();
|
||||
final String htmContent = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/olympiad/herohistory.htm");
|
||||
if (htmContent != null)
|
||||
@@ -546,24 +539,24 @@ public class Hero
|
||||
FightReply.setHtml(htmContent);
|
||||
FightReply.replace("%heroname%", CharNameTable.getInstance().getNameById(charid));
|
||||
|
||||
if (!_list.isEmpty())
|
||||
if (!heroFights.isEmpty())
|
||||
{
|
||||
if (_herocounts.containsKey(charid))
|
||||
final StatsSet heroCount = HERO_COUNTS.get(charid);
|
||||
if (heroCount != null)
|
||||
{
|
||||
StatsSet _herocount = _herocounts.get(charid);
|
||||
_win = _herocount.getInt("victory");
|
||||
_loss = _herocount.getInt("loss");
|
||||
_draw = _herocount.getInt("draw");
|
||||
_win = heroCount.getInt("victory");
|
||||
_loss = heroCount.getInt("loss");
|
||||
_draw = heroCount.getInt("draw");
|
||||
}
|
||||
|
||||
boolean color = true;
|
||||
final StringBuilder fList = new StringBuilder(500);
|
||||
int counter = 0;
|
||||
int breakat = 0;
|
||||
for (int i = ((page - 1) * perpage); i < _list.size(); i++)
|
||||
for (int i = ((page - 1) * perpage); i < heroFights.size(); i++)
|
||||
{
|
||||
breakat = i;
|
||||
StatsSet fight = _list.get(i);
|
||||
StatsSet fight = heroFights.get(i);
|
||||
StringUtil.append(fList, "<tr><td>");
|
||||
if (color)
|
||||
{
|
||||
@@ -585,7 +578,7 @@ public class Hero
|
||||
}
|
||||
}
|
||||
|
||||
if (breakat < (_list.size() - 1))
|
||||
if (breakat < (heroFights.size() - 1))
|
||||
{
|
||||
FightReply.replace("%buttprev%", "<button value=\"Prev\" action=\"bypass _match?class=" + heroclass + "&page=" + (page + 1) + "\" width=60 height=25 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
}
|
||||
@@ -625,7 +618,7 @@ public class Hero
|
||||
{
|
||||
updateHeroes(true);
|
||||
|
||||
for (Integer objectId : _heroes.keySet())
|
||||
for (Integer objectId : HEROES.keySet())
|
||||
{
|
||||
final L2PcInstance player = L2World.getInstance().getPlayer(objectId);
|
||||
if (player == null)
|
||||
@@ -662,26 +655,27 @@ public class Hero
|
||||
player.broadcastUserInfo();
|
||||
}
|
||||
|
||||
deleteItemsInDb();
|
||||
|
||||
HEROES.clear();
|
||||
|
||||
if (newHeroes.isEmpty())
|
||||
{
|
||||
_heroes.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
Map<Integer, StatsSet> heroes = new HashMap<>();
|
||||
|
||||
for (StatsSet hero : newHeroes)
|
||||
{
|
||||
int charId = hero.getInt(Olympiad.CHAR_ID);
|
||||
|
||||
if ((_completeHeroes != null) && _completeHeroes.containsKey(charId))
|
||||
if (COMPLETE_HEROS.containsKey(charId))
|
||||
{
|
||||
StatsSet oldHero = _completeHeroes.get(charId);
|
||||
StatsSet oldHero = COMPLETE_HEROS.get(charId);
|
||||
int count = oldHero.getInt(COUNT);
|
||||
oldHero.set(COUNT, count + 1);
|
||||
oldHero.set(PLAYED, 1);
|
||||
oldHero.set(CLAIMED, false);
|
||||
heroes.put(charId, oldHero);
|
||||
HEROES.put(charId, oldHero);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -691,17 +685,10 @@ public class Hero
|
||||
newHero.set(COUNT, 1);
|
||||
newHero.set(PLAYED, 1);
|
||||
newHero.set(CLAIMED, false);
|
||||
heroes.put(charId, newHero);
|
||||
HEROES.put(charId, newHero);
|
||||
}
|
||||
}
|
||||
|
||||
deleteItemsInDb();
|
||||
|
||||
_heroes.clear();
|
||||
_heroes.putAll(heroes);
|
||||
|
||||
heroes.clear();
|
||||
|
||||
updateHeroes(false);
|
||||
}
|
||||
|
||||
@@ -720,11 +707,11 @@ public class Hero
|
||||
{
|
||||
StatsSet hero;
|
||||
int heroId;
|
||||
for (Entry<Integer, StatsSet> entry : _heroes.entrySet())
|
||||
for (Entry<Integer, StatsSet> entry : HEROES.entrySet())
|
||||
{
|
||||
hero = entry.getValue();
|
||||
heroId = entry.getKey();
|
||||
if (_completeHeroes.isEmpty() || !_completeHeroes.containsKey(heroId))
|
||||
if (!COMPLETE_HEROS.containsKey(heroId))
|
||||
{
|
||||
try (PreparedStatement insert = con.prepareStatement(INSERT_HERO))
|
||||
{
|
||||
@@ -771,9 +758,9 @@ public class Hero
|
||||
}
|
||||
}
|
||||
}
|
||||
_heroes.put(heroId, hero);
|
||||
HEROES.put(heroId, hero);
|
||||
|
||||
_completeHeroes.put(heroId, hero);
|
||||
COMPLETE_HEROS.put(heroId, hero);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -791,7 +778,7 @@ public class Hero
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "Hero System: Couldnt update Heroes", e);
|
||||
_log.warning("Hero System: Couldnt update Heroes: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,23 +791,17 @@ public class Hero
|
||||
{
|
||||
setDiaryData(charId, ACTION_RAID_KILLED, npcId);
|
||||
|
||||
L2NpcTemplate template = NpcData.getInstance().getTemplate(npcId);
|
||||
|
||||
if (_herodiary.containsKey(charId) && (template != null))
|
||||
final L2NpcTemplate template = NpcData.getInstance().getTemplate(npcId);
|
||||
final List<StatsSet> list = HERO_DIARY.get(charId);
|
||||
if ((list != null) && (template != null))
|
||||
{
|
||||
// Get Data
|
||||
List<StatsSet> _list = _herodiary.get(charId);
|
||||
// Clear old data
|
||||
_herodiary.remove(charId);
|
||||
// Prepare new data
|
||||
StatsSet _diaryentry = new StatsSet();
|
||||
String date = (new SimpleDateFormat("yyyy-MM-dd HH")).format(new Date(System.currentTimeMillis()));
|
||||
_diaryentry.set("date", date);
|
||||
_diaryentry.set("action", template.getName() + " was defeated");
|
||||
final StatsSet diaryEntry = new StatsSet();
|
||||
final String date = (new SimpleDateFormat("yyyy-MM-dd HH")).format(new Date(System.currentTimeMillis()));
|
||||
diaryEntry.set("date", date);
|
||||
diaryEntry.set("action", template.getName() + " was defeated");
|
||||
// Add to old list
|
||||
_list.add(_diaryentry);
|
||||
// Put new list into diary
|
||||
_herodiary.put(charId, _list);
|
||||
list.add(diaryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,22 +809,17 @@ public class Hero
|
||||
{
|
||||
setDiaryData(charId, ACTION_CASTLE_TAKEN, castleId);
|
||||
|
||||
Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||
if ((castle != null) && _herodiary.containsKey(charId))
|
||||
final Castle castle = CastleManager.getInstance().getCastleById(castleId);
|
||||
final List<StatsSet> list = HERO_DIARY.get(charId);
|
||||
if ((list != null) && (castle != null))
|
||||
{
|
||||
// Get Data
|
||||
List<StatsSet> _list = _herodiary.get(charId);
|
||||
// Clear old data
|
||||
_herodiary.remove(charId);
|
||||
// Prepare new data
|
||||
StatsSet _diaryentry = new StatsSet();
|
||||
String date = (new SimpleDateFormat("yyyy-MM-dd HH")).format(new Date(System.currentTimeMillis()));
|
||||
_diaryentry.set("date", date);
|
||||
_diaryentry.set("action", castle.getName() + " Castle was successfuly taken");
|
||||
final StatsSet diaryEntry = new StatsSet();
|
||||
final String date = (new SimpleDateFormat("yyyy-MM-dd HH")).format(new Date(System.currentTimeMillis()));
|
||||
diaryEntry.set("date", date);
|
||||
diaryEntry.set("action", castle.getName() + " Castle was successfuly taken");
|
||||
// Add to old list
|
||||
_list.add(_diaryentry);
|
||||
// Put new list into diary
|
||||
_herodiary.put(charId, _list);
|
||||
list.add(diaryEntry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -860,7 +836,7 @@ public class Hero
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.SEVERE, "SQL exception while saving DiaryData.", e);
|
||||
_log.severe("SQL exception while saving DiaryData: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -871,7 +847,7 @@ public class Hero
|
||||
*/
|
||||
public void setHeroMessage(L2PcInstance player, String message)
|
||||
{
|
||||
_heroMessage.put(player.getObjectId(), message);
|
||||
HERO_MESSAGE.put(player.getObjectId(), message);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -880,7 +856,7 @@ public class Hero
|
||||
*/
|
||||
public void saveHeroMessage(int charId)
|
||||
{
|
||||
if (_heroMessage.get(charId) == null)
|
||||
if (HERO_MESSAGE.containsKey(charId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -888,13 +864,13 @@ public class Hero
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("UPDATE heroes SET message=? WHERE charId=?;"))
|
||||
{
|
||||
statement.setString(1, _heroMessage.get(charId));
|
||||
statement.setString(1, HERO_MESSAGE.get(charId));
|
||||
statement.setInt(2, charId);
|
||||
statement.execute();
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.SEVERE, "SQL exception while saving HeroMessage.", e);
|
||||
_log.severe("SQL exception while saving HeroMessage:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -907,7 +883,7 @@ public class Hero
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
_log.log(Level.WARNING, "", e);
|
||||
_log.warning("Heroes: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -917,10 +893,7 @@ public class Hero
|
||||
*/
|
||||
public void shutdown()
|
||||
{
|
||||
for (int charId : _heroMessage.keySet())
|
||||
{
|
||||
saveHeroMessage(charId);
|
||||
}
|
||||
HERO_MESSAGE.keySet().forEach(c -> saveHeroMessage(c));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -930,7 +903,7 @@ public class Hero
|
||||
*/
|
||||
public boolean isHero(int objectId)
|
||||
{
|
||||
return _heroes.containsKey(objectId) && _heroes.get(objectId).getBoolean(CLAIMED);
|
||||
return HEROES.containsKey(objectId) && HEROES.get(objectId).getBoolean(CLAIMED);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -940,7 +913,7 @@ public class Hero
|
||||
*/
|
||||
public boolean isUnclaimedHero(int objectId)
|
||||
{
|
||||
return _heroes.containsKey(objectId) && !_heroes.get(objectId).getBoolean(CLAIMED);
|
||||
return HEROES.containsKey(objectId) && !HEROES.get(objectId).getBoolean(CLAIMED);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -949,11 +922,11 @@ public class Hero
|
||||
*/
|
||||
public void claimHero(L2PcInstance player)
|
||||
{
|
||||
StatsSet hero = _heroes.get(player.getObjectId());
|
||||
StatsSet hero = HEROES.get(player.getObjectId());
|
||||
if (hero == null)
|
||||
{
|
||||
hero = new StatsSet();
|
||||
_heroes.put(player.getObjectId(), hero);
|
||||
HEROES.put(player.getObjectId(), hero);
|
||||
}
|
||||
|
||||
hero.set(CLAIMED, true);
|
||||
@@ -976,13 +949,18 @@ public class Hero
|
||||
setHeroGained(player.getObjectId());
|
||||
loadFights(player.getObjectId());
|
||||
loadDiary(player.getObjectId());
|
||||
_heroMessage.put(player.getObjectId(), "");
|
||||
HERO_MESSAGE.put(player.getObjectId(), "");
|
||||
|
||||
updateHeroes(false);
|
||||
}
|
||||
|
||||
public static Hero getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final Hero _instance = new Hero();
|
||||
protected static final Hero INSTANCE = new Hero();
|
||||
}
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ import com.l2jserver.gameserver.model.L2WorldRegion;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.TeleportWhereType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2DoorInstance;
|
||||
@@ -99,7 +100,7 @@ public final class Instance
|
||||
private final List<Integer> _exceptionList = new ArrayList<>();
|
||||
|
||||
protected ScheduledFuture<?> _checkTimeUpTask = null;
|
||||
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new HashMap<>();
|
||||
protected final Map<Integer, ScheduledFuture<?>> _ejectDeadTasks = new ConcurrentHashMap<>();
|
||||
|
||||
public Instance(int id)
|
||||
{
|
||||
@@ -573,7 +574,7 @@ public final class Instance
|
||||
List<L2Spawn> manualSpawn = new ArrayList<>();
|
||||
for (Node d = group.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0;
|
||||
int npcId = 0, x = 0, y = 0, z = 0, heading = 0, respawn = 0, respawnRandom = 0, delay = -1;
|
||||
Boolean allowRandomWalk = null;
|
||||
if ("spawn".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
@@ -584,6 +585,10 @@ public final class Instance
|
||||
z = Integer.parseInt(d.getAttributes().getNamedItem("z").getNodeValue());
|
||||
heading = Integer.parseInt(d.getAttributes().getNamedItem("heading").getNodeValue());
|
||||
respawn = Integer.parseInt(d.getAttributes().getNamedItem("respawn").getNodeValue());
|
||||
if (d.getAttributes().getNamedItem("onKillDelay") != null)
|
||||
{
|
||||
delay = Integer.parseInt(d.getAttributes().getNamedItem("onKillDelay").getNodeValue());
|
||||
}
|
||||
if (d.getAttributes().getNamedItem("respawnRandom") != null)
|
||||
{
|
||||
respawnRandom = Integer.parseInt(d.getAttributes().getNamedItem("respawnRandom").getNodeValue());
|
||||
@@ -619,7 +624,11 @@ public final class Instance
|
||||
}
|
||||
if (spawnGroup.equals("general"))
|
||||
{
|
||||
spawnDat.doSpawn();
|
||||
L2Npc spawned = spawnDat.doSpawn();
|
||||
if ((delay >= 0) && (spawned instanceof L2Attackable))
|
||||
{
|
||||
((L2Attackable) spawned).setOnKillDelay(delay);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -28,6 +28,8 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -47,7 +49,8 @@ import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
|
||||
/**
|
||||
* @since $Revision: 1.3.4.1 $ $Date: 2005/03/27 15:29:32 $ This ancient thingie got reworked by Nik at $Date: 2011/05/17 21:51:39 $ Yeah, for 6 years no one bothered reworking this buggy event engine.
|
||||
* @author Nik
|
||||
* @Since 2011/05/17 21:51:39
|
||||
*/
|
||||
public class L2Event
|
||||
{
|
||||
@@ -57,12 +60,11 @@ public class L2Event
|
||||
public static String _eventCreator = "";
|
||||
public static String _eventInfo = "";
|
||||
public static int _teamsNumber = 0;
|
||||
public static final Map<Integer, String> _teamNames = new HashMap<>();
|
||||
public static final List<L2PcInstance> _registeredPlayers = new ArrayList<>();
|
||||
public static final Map<Integer, List<L2PcInstance>> _teams = new HashMap<>();
|
||||
public static final Map<Integer, String> _teamNames = new ConcurrentHashMap<>();
|
||||
public static final List<L2PcInstance> _registeredPlayers = new CopyOnWriteArrayList<>();
|
||||
public static final Map<Integer, List<L2PcInstance>> _teams = new ConcurrentHashMap<>();
|
||||
public static int _npcId = 0;
|
||||
// public static final List<L2Npc> _npcs = new ArrayList<L2Npc>();
|
||||
private static final Map<L2PcInstance, PlayerEventHolder> _connectionLossData = new HashMap<>();
|
||||
private static final Map<L2PcInstance, PlayerEventHolder> _connectionLossData = new ConcurrentHashMap<>();
|
||||
|
||||
public enum EventState
|
||||
{
|
||||
@@ -377,7 +379,7 @@ public class L2Event
|
||||
_eventInfo = br.readLine();
|
||||
}
|
||||
|
||||
List<L2PcInstance> temp = new ArrayList<>();
|
||||
List<L2PcInstance> temp = new LinkedList<>();
|
||||
for (L2PcInstance player : L2World.getInstance().getPlayers())
|
||||
{
|
||||
if (!player.isOnline())
|
||||
@@ -435,7 +437,7 @@ public class L2Event
|
||||
// Insert empty lists at _teams.
|
||||
for (int i = 0; i < _teamsNumber; i++)
|
||||
{
|
||||
_teams.put(i + 1, new ArrayList<L2PcInstance>());
|
||||
_teams.put(i + 1, new CopyOnWriteArrayList<L2PcInstance>());
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
|
@@ -27,6 +27,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -220,9 +221,9 @@ public class Siege implements Siegable
|
||||
}
|
||||
|
||||
// must support Concurrent Modifications
|
||||
private final List<L2SiegeClan> _attackerClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderWaitingClans = new ArrayList<>();
|
||||
private final List<L2SiegeClan> _attackerClans = new CopyOnWriteArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderClans = new CopyOnWriteArrayList<>();
|
||||
private final List<L2SiegeClan> _defenderWaitingClans = new CopyOnWriteArrayList<>();
|
||||
|
||||
// Castle setting
|
||||
private final List<L2ControlTowerInstance> _controlTowers = new ArrayList<>();
|
||||
@@ -550,10 +551,7 @@ public class Siege implements Siegable
|
||||
L2Clan clan = ClanTable.getInstance().getClan(siegeClans.getClanId());
|
||||
for (L2PcInstance member : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (member != null)
|
||||
{
|
||||
member.sendPacket(message);
|
||||
}
|
||||
member.sendPacket(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,11 +584,6 @@ public class Siege implements Siegable
|
||||
clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
for (L2PcInstance member : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (member == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (clear)
|
||||
{
|
||||
member.setSiegeState((byte) 0);
|
||||
@@ -833,11 +826,6 @@ public class Siege implements Siegable
|
||||
clan = ClanTable.getInstance().getClan(siegeclan.getClanId());
|
||||
for (L2PcInstance player : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.isInSiege())
|
||||
{
|
||||
players.add(player);
|
||||
@@ -871,11 +859,6 @@ public class Siege implements Siegable
|
||||
}
|
||||
for (L2PcInstance player : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (player == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.isInSiege())
|
||||
{
|
||||
players.add(player);
|
||||
@@ -1596,41 +1579,35 @@ public class Siege implements Siegable
|
||||
|
||||
// Register guard to the closest Control Tower
|
||||
// When CT dies, so do all the guards that it controls
|
||||
if (!getSiegeGuardManager().getSiegeGuardSpawn().isEmpty())
|
||||
for (L2Spawn spawn : getSiegeGuardManager().getSiegeGuardSpawn())
|
||||
{
|
||||
L2ControlTowerInstance closestCt;
|
||||
double distance;
|
||||
double distanceClosest = 0;
|
||||
for (L2Spawn spawn : getSiegeGuardManager().getSiegeGuardSpawn())
|
||||
if (spawn == null)
|
||||
{
|
||||
if (spawn == null)
|
||||
continue;
|
||||
}
|
||||
|
||||
L2ControlTowerInstance closestCt = null;
|
||||
double distanceClosest = Integer.MAX_VALUE;
|
||||
|
||||
for (L2ControlTowerInstance ct : _controlTowers)
|
||||
{
|
||||
if (ct == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
closestCt = null;
|
||||
distanceClosest = Integer.MAX_VALUE;
|
||||
double distance = ct.calculateDistance(spawn, true, true);
|
||||
|
||||
for (L2ControlTowerInstance ct : _controlTowers)
|
||||
if (distance < distanceClosest)
|
||||
{
|
||||
if (ct == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
distance = ct.calculateDistance(spawn, true, true);
|
||||
|
||||
if (distance < distanceClosest)
|
||||
{
|
||||
closestCt = ct;
|
||||
distanceClosest = distance;
|
||||
}
|
||||
}
|
||||
if (closestCt != null)
|
||||
{
|
||||
closestCt.registerGuard(spawn);
|
||||
closestCt = ct;
|
||||
distanceClosest = distance;
|
||||
}
|
||||
}
|
||||
if (closestCt != null)
|
||||
{
|
||||
closestCt.registerGuard(spawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -89,11 +89,9 @@ public class TvTEvent
|
||||
/** Instance id<br> */
|
||||
private static int _TvTEventInstance = 0;
|
||||
|
||||
/**
|
||||
* No instance of this class!<br>
|
||||
*/
|
||||
private TvTEvent()
|
||||
{
|
||||
// Prevent external initialization.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,7 +163,7 @@ public class TvTEvent
|
||||
* Starts the TvTEvent fight<br>
|
||||
* 1. Set state EventState.STARTING<br>
|
||||
* 2. Close doors specified in configs<br>
|
||||
* 3. Abort if not enought participants(return false)<br>
|
||||
* 3. Abort if not enough participants(return false)<br>
|
||||
* 4. Set state EventState.STARTED<br>
|
||||
* 5. Teleport all participants to team spot<br>
|
||||
* <br>
|
||||
|
@@ -18,8 +18,8 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
@@ -34,8 +34,8 @@ public class TvTEventTeam
|
||||
private int[] _coordinates = new int[3];
|
||||
/** The points of the team<br> */
|
||||
private short _points;
|
||||
/** Name and instance of all participated players in HashMap<br> */
|
||||
private Map<Integer, L2PcInstance> _participatedPlayers = new HashMap<>();
|
||||
/** Name and instance of all participated players in map. */
|
||||
private final Map<Integer, L2PcInstance> _participatedPlayers = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* C'tor initialize the team<br>
|
||||
@@ -63,10 +63,7 @@ public class TvTEventTeam
|
||||
return false;
|
||||
}
|
||||
|
||||
synchronized (_participatedPlayers)
|
||||
{
|
||||
_participatedPlayers.put(playerInstance.getObjectId(), playerInstance);
|
||||
}
|
||||
_participatedPlayers.put(playerInstance.getObjectId(), playerInstance);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -77,10 +74,7 @@ public class TvTEventTeam
|
||||
*/
|
||||
public void removePlayer(int playerObjectId)
|
||||
{
|
||||
synchronized (_participatedPlayers)
|
||||
{
|
||||
_participatedPlayers.remove(playerObjectId);
|
||||
}
|
||||
_participatedPlayers.remove(playerObjectId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,7 +91,6 @@ public class TvTEventTeam
|
||||
public void cleanMe()
|
||||
{
|
||||
_participatedPlayers.clear();
|
||||
_participatedPlayers = new HashMap<>();
|
||||
_points = 0;
|
||||
}
|
||||
|
||||
@@ -108,14 +101,7 @@ public class TvTEventTeam
|
||||
*/
|
||||
public boolean containsPlayer(int playerObjectId)
|
||||
{
|
||||
boolean containsPlayer;
|
||||
|
||||
synchronized (_participatedPlayers)
|
||||
{
|
||||
containsPlayer = _participatedPlayers.containsKey(playerObjectId);
|
||||
}
|
||||
|
||||
return containsPlayer;
|
||||
return _participatedPlayers.containsKey(playerObjectId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,20 +135,13 @@ public class TvTEventTeam
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns name and instance of all participated players in HashMap<br>
|
||||
* Returns name and instance of all participated players in FastMap<br>
|
||||
* <br>
|
||||
* @return Map<String, L2PcInstance>: map of players in this team<br>
|
||||
*/
|
||||
public Map<Integer, L2PcInstance> getParticipatedPlayers()
|
||||
{
|
||||
Map<Integer, L2PcInstance> participatedPlayers = null;
|
||||
|
||||
synchronized (_participatedPlayers)
|
||||
{
|
||||
participatedPlayers = _participatedPlayers;
|
||||
}
|
||||
|
||||
return participatedPlayers;
|
||||
return _participatedPlayers;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -172,13 +151,6 @@ public class TvTEventTeam
|
||||
*/
|
||||
public int getParticipatedPlayerCount()
|
||||
{
|
||||
int participatedPlayerCount;
|
||||
|
||||
synchronized (_participatedPlayers)
|
||||
{
|
||||
participatedPlayerCount = _participatedPlayers.size();
|
||||
}
|
||||
|
||||
return participatedPlayerCount;
|
||||
return _participatedPlayers.size();
|
||||
}
|
||||
}
|
||||
|
@@ -23,9 +23,9 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -71,8 +71,8 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
protected final Logger _log;
|
||||
|
||||
private final HashMap<Integer, L2SiegeClan> _attackers = new HashMap<>();
|
||||
private ArrayList<L2Spawn> _guards;
|
||||
private final Map<Integer, L2SiegeClan> _attackers = new ConcurrentHashMap<>();
|
||||
private List<L2Spawn> _guards;
|
||||
|
||||
public SiegableHall _hall;
|
||||
public ScheduledFuture<?> _siegeTask;
|
||||
@@ -91,8 +91,6 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
loadAttackers();
|
||||
}
|
||||
|
||||
// XXX Load methods -------------------------------
|
||||
|
||||
public void loadAttackers()
|
||||
{
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
@@ -123,11 +121,11 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
delStatement.setInt(1, _hall.getId());
|
||||
delStatement.execute();
|
||||
|
||||
if (getAttackers().size() > 0)
|
||||
if (_attackers.size() > 0)
|
||||
{
|
||||
try (PreparedStatement insert = con.prepareStatement(SQL_SAVE_ATTACKERS))
|
||||
{
|
||||
for (L2SiegeClan clan : getAttackers().values())
|
||||
for (L2SiegeClan clan : _attackers.values())
|
||||
{
|
||||
insert.setInt(1, _hall.getId());
|
||||
insert.setInt(2, clan.getClanId());
|
||||
@@ -175,32 +173,24 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
}
|
||||
}
|
||||
|
||||
// XXX Npc Management methods ----------------------------
|
||||
|
||||
private final void spawnSiegeGuards()
|
||||
{
|
||||
for (L2Spawn guard : _guards)
|
||||
{
|
||||
if (guard != null)
|
||||
{
|
||||
guard.init();
|
||||
}
|
||||
guard.init();
|
||||
}
|
||||
}
|
||||
|
||||
private final void unSpawnSiegeGuards()
|
||||
{
|
||||
if ((_guards != null) && (_guards.size() > 0))
|
||||
if (_guards != null)
|
||||
{
|
||||
for (L2Spawn guard : _guards)
|
||||
{
|
||||
if (guard != null)
|
||||
guard.stopRespawn();
|
||||
if (guard.getLastSpawn() != null)
|
||||
{
|
||||
guard.stopRespawn();
|
||||
if (guard.getLastSpawn() != null)
|
||||
{
|
||||
guard.getLastSpawn().deleteMe();
|
||||
}
|
||||
guard.getLastSpawn().deleteMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,9 +208,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
return result;
|
||||
}
|
||||
|
||||
// XXX Attacker clans management -----------------------------
|
||||
|
||||
public final HashMap<Integer, L2SiegeClan> getAttackers()
|
||||
public final Map<Integer, L2SiegeClan> getAttackers()
|
||||
{
|
||||
return _attackers;
|
||||
}
|
||||
@@ -257,26 +245,21 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
@Override
|
||||
public List<L2SiegeClan> getAttackerClans()
|
||||
{
|
||||
ArrayList<L2SiegeClan> result = new ArrayList<>();
|
||||
result.addAll(_attackers.values());
|
||||
return result;
|
||||
return new ArrayList<>(_attackers.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<L2PcInstance> getAttackersInZone()
|
||||
{
|
||||
final Collection<L2PcInstance> list = _hall.getSiegeZone().getPlayersInside();
|
||||
List<L2PcInstance> attackers = new ArrayList<>();
|
||||
|
||||
for (L2PcInstance pc : list)
|
||||
final List<L2PcInstance> attackers = new ArrayList<>();
|
||||
for (L2PcInstance pc : _hall.getSiegeZone().getPlayersInside())
|
||||
{
|
||||
final L2Clan clan = pc.getClan();
|
||||
if ((clan != null) && getAttackers().containsKey(clan.getId()))
|
||||
if ((clan != null) && _attackers.containsKey(clan.getId()))
|
||||
{
|
||||
attackers.add(pc);
|
||||
}
|
||||
}
|
||||
|
||||
return attackers;
|
||||
}
|
||||
|
||||
@@ -298,14 +281,12 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
return null;
|
||||
}
|
||||
|
||||
// XXX Siege execution --------------------------
|
||||
|
||||
public void prepareOwner()
|
||||
{
|
||||
if (_hall.getOwnerId() > 0)
|
||||
{
|
||||
final L2SiegeClan clan = new L2SiegeClan(_hall.getOwnerId(), SiegeClanType.ATTACKER);
|
||||
getAttackers().put(clan.getClanId(), new L2SiegeClan(clan.getClanId(), SiegeClanType.ATTACKER));
|
||||
_attackers.put(clan.getClanId(), new L2SiegeClan(clan.getClanId(), SiegeClanType.ATTACKER));
|
||||
}
|
||||
|
||||
_hall.free();
|
||||
@@ -321,10 +302,10 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
@Override
|
||||
public void startSiege()
|
||||
{
|
||||
if ((getAttackers().size() < 1) && (_hall.getId() != 21)) // Fortress of resistance dont have attacker list
|
||||
if ((_attackers.size() < 1) && (_hall.getId() != 21)) // Fortress of resistance don't have attacker list
|
||||
{
|
||||
onSiegeEnds();
|
||||
getAttackers().clear();
|
||||
_attackers.clear();
|
||||
_hall.updateNextSiege();
|
||||
_siegeTask = ThreadPoolManager.getInstance().scheduleGeneral(new PrepareOwner(), _hall.getSiegeDate().getTimeInMillis());
|
||||
_hall.updateSiegeStatus(SiegeStatus.WAITING_BATTLE);
|
||||
@@ -340,7 +321,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
_hall.updateSiegeZone(true);
|
||||
|
||||
final byte state = 1;
|
||||
for (L2SiegeClan sClan : getAttackerClans())
|
||||
for (L2SiegeClan sClan : _attackers.values())
|
||||
{
|
||||
final L2Clan clan = ClanTable.getInstance().getClan(sClan.getClanId());
|
||||
if (clan == null)
|
||||
@@ -350,12 +331,9 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
|
||||
for (L2PcInstance pc : clan.getOnlineMembers(0))
|
||||
{
|
||||
if (pc != null)
|
||||
{
|
||||
pc.setSiegeState(state);
|
||||
pc.broadcastUserInfo();
|
||||
pc.setIsInHideoutSiege(true);
|
||||
}
|
||||
pc.setSiegeState(state);
|
||||
pc.broadcastUserInfo();
|
||||
pc.setIsInHideoutSiege(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +374,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
_hall.banishForeigners();
|
||||
|
||||
final byte state = 0;
|
||||
for (L2SiegeClan sClan : getAttackerClans())
|
||||
for (L2SiegeClan sClan : _attackers.values())
|
||||
{
|
||||
final L2Clan clan = ClanTable.getInstance().getClan(sClan.getClanId());
|
||||
if (clan == null)
|
||||
@@ -421,7 +399,7 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
}
|
||||
}
|
||||
|
||||
getAttackers().clear();
|
||||
_attackers.clear();
|
||||
|
||||
onSiegeEnds();
|
||||
|
||||
@@ -454,8 +432,6 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
return _hall.getSiegeDate();
|
||||
}
|
||||
|
||||
// XXX Fame settings ---------------------------
|
||||
|
||||
@Override
|
||||
public boolean giveFame()
|
||||
{
|
||||
@@ -468,8 +444,6 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
return Config.CHS_FAME_AMOUNT;
|
||||
}
|
||||
|
||||
// XXX Misc methods -----------------------------
|
||||
|
||||
@Override
|
||||
public int getFameFrequency()
|
||||
{
|
||||
@@ -489,7 +463,6 @@ public abstract class ClanHallSiegeEngine extends Quest implements Siegable
|
||||
}
|
||||
}
|
||||
|
||||
// XXX Siege task and abstract methods -------------------
|
||||
public Location getInnerSpawnLoc(L2PcInstance player)
|
||||
{
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user