Heroic9614 Posted August 14, 2022 Posted August 14, 2022 Hi Everyvone! I want loading ClanWar clan list in server the task is that if someone is in a clan war with the other, then they do not get PK points. but I don't know how to check it. public class ClanWar { private final static Logger LOG = LoggerFactory.getLogger(ClanWar.class); private static ClanWar _instance; private Map<Integer, Integer> clanwars = new FastMap<Integer, Integer>().shared(); public static ClanWar getInstance() { if (_instance == null) { _instance = new ClanWar(); } return _instance; } private ClanWar() { clanwars = new FastMap<>(); loadData(); } private void loadData() { Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); final PreparedStatement statement = con.prepareStatement("select clan1,clan2 FROM clan_wars"); final ResultSet rset = statement.executeQuery(); while (rset.next()) { int clan1 = rset.getInt("clan1"); int clan2 = rset.getInt("clan2"); clanwars.put(clan1, clan2); } LOG.info("ClanWars: Loaded: " + clanwars.size()); DatabaseUtils.close(rset); DatabaseUtils.close(statement); } catch (final Exception e) { LOG.error("Clanwars: error loaded", e); } finally { CloseUtil.close(con); } } public int getClanWar(final int clan1, final int clan2) { return 0; } }
Question
Heroic9614
Hi Everyvone!
I want loading ClanWar clan list in server
the task is that if someone is in a clan war with the other, then they do not get PK points.
but I don't know how to check it.
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now