Sync with L2jServer HighFive Mar 25th 2015.
This commit is contained in:
@ -19,7 +19,8 @@
|
||||
package com.l2jserver.gameserver.taskmanager;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@ -42,7 +43,7 @@ public class KnownListUpdateTaskManager
|
||||
// Do full update every FULL_UPDATE_TIMER * KNOWNLIST_UPDATE_INTERVAL
|
||||
public static int _fullUpdateTimer = FULL_UPDATE_TIMER;
|
||||
|
||||
protected static final HashSet<L2WorldRegion> _failedRegions = new HashSet<>(1);
|
||||
protected static final Set<L2WorldRegion> FAILED_REGIONS = ConcurrentHashMap.newKeySet(1);
|
||||
|
||||
protected KnownListUpdateTaskManager()
|
||||
{
|
||||
@ -68,20 +69,20 @@ public class KnownListUpdateTaskManager
|
||||
// avoid stopping update if something went wrong in updateRegion()
|
||||
try
|
||||
{
|
||||
failed = _failedRegions.contains(r); // failed on last pass
|
||||
failed = FAILED_REGIONS.contains(r); // failed on last pass
|
||||
if (r.isActive()) // and check only if the region is active
|
||||
{
|
||||
updateRegion(r, ((_fullUpdateTimer == FULL_UPDATE_TIMER) || failed), updatePass);
|
||||
}
|
||||
if (failed)
|
||||
{
|
||||
_failedRegions.remove(r); // if all ok, remove
|
||||
FAILED_REGIONS.remove(r); // if all ok, remove
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, "KnownListUpdateTaskManager: updateRegion(" + _fullUpdateTimer + "," + updatePass + ") failed for region " + r.getName() + ". Full update scheduled. " + e.getMessage(), e);
|
||||
_failedRegions.add(r);
|
||||
FAILED_REGIONS.add(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ package com.l2jserver.gameserver.taskmanager.tasks;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
@ -50,7 +51,7 @@ public class TaskRaidPointsReset extends Task
|
||||
Map<Integer, Integer> rankList = RaidBossPointsManager.getInstance().getRankList();
|
||||
for (L2Clan c : ClanTable.getInstance().getClans())
|
||||
{
|
||||
for (Map.Entry<Integer, Integer> entry : rankList.entrySet())
|
||||
for (Entry<Integer, Integer> entry : rankList.entrySet())
|
||||
{
|
||||
if ((entry.getValue() <= 100) && c.isMember(entry.getKey()))
|
||||
{
|
||||
|
Reference in New Issue
Block a user