Fixed probable ClanStrongholdDevice concurrency issues.

This commit is contained in:
MobiusDevelopment
2022-12-03 00:25:06 +00:00
parent b89bf2c4c1
commit a9941ed915
4 changed files with 16 additions and 16 deletions

View File

@@ -16,8 +16,8 @@
*/
package ai.others.ClanStrongholdDevice;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
@@ -58,9 +58,9 @@ public class ClanStrongholdDevice extends AbstractNpcAI
// Skill
private static final SkillHolder CLAN_STRONGHOLD_EFFECT = new SkillHolder(48078, 1);
// Misc
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new HashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new HashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new HashMap<>();
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new ConcurrentHashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new ConcurrentHashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new ConcurrentHashMap<>();
private ClanStrongholdDevice()
{

View File

@@ -16,8 +16,8 @@
*/
package ai.others.ClanStrongholdDevice;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
@@ -58,9 +58,9 @@ public class ClanStrongholdDevice extends AbstractNpcAI
// Skill
private static final SkillHolder CLAN_STRONGHOLD_EFFECT = new SkillHolder(48078, 1);
// Misc
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new HashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new HashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new HashMap<>();
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new ConcurrentHashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new ConcurrentHashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new ConcurrentHashMap<>();
private ClanStrongholdDevice()
{

View File

@@ -16,8 +16,8 @@
*/
package ai.others.ClanStrongholdDevice;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
@@ -58,9 +58,9 @@ public class ClanStrongholdDevice extends AbstractNpcAI
// Skill
private static final SkillHolder CLAN_STRONGHOLD_EFFECT = new SkillHolder(48078, 1);
// Misc
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new HashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new HashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new HashMap<>();
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new ConcurrentHashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new ConcurrentHashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new ConcurrentHashMap<>();
private ClanStrongholdDevice()
{

View File

@@ -16,8 +16,8 @@
*/
package ai.others.ClanStrongholdDevice;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2jmobius.gameserver.enums.ChatType;
import org.l2jmobius.gameserver.model.Location;
@@ -58,9 +58,9 @@ public class ClanStrongholdDevice extends AbstractNpcAI
// Skill
private static final SkillHolder CLAN_STRONGHOLD_EFFECT = new SkillHolder(48078, 1);
// Misc
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new HashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new HashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new HashMap<>();
private static final Map<Integer, Integer> CURRENT_CLAN_ID = new ConcurrentHashMap<>(); // Clan id key - NPC object id value (can be taken from npc.getScriptValue)
private static final Map<Integer, Long> LAST_ATTACK = new ConcurrentHashMap<>(); // NPC object id key - Time value
private static final Map<Integer, Location> DEVICE_LOCATION = new ConcurrentHashMap<>();
private ClanStrongholdDevice()
{