diff --git a/src/resources/objects/MultimapProxy.java b/src/resources/objects/MultimapProxy.java deleted file mode 100644 index 67ab5944..00000000 --- a/src/resources/objects/MultimapProxy.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013 - * - * This File is part of NGECore2. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see . - * - * Using NGEngine to work with NGECore2 is making a combined work based on NGEngine. - * Therefore all terms and conditions of the GNU Lesser General Public License cover the combination. - ******************************************************************************/ -package resources.objects; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map.Entry; - -import org.python.google.common.collect.ArrayListMultimap; -import org.python.google.common.collect.Multimap; - -import com.sleepycat.persist.model.Persistent; -import com.sleepycat.persist.model.PersistentProxy; - -@Persistent(proxyFor=Multimap.class) -public class MultimapProxy implements PersistentProxy> { - - private int size = 0; - private K[] keys; - private V[] values; - - private MultimapProxy() { } - - public void initializeProxy(Multimap object) { - List keyList = new ArrayList(); - List valueList = new ArrayList(); - - for (Entry entry : object.entries()) { - keyList.add(entry.getKey()); - valueList.add(entry.getValue()); - } - - size = object.entries().size(); - - keys = keyList.toArray(keys); - values = valueList.toArray(values); - } - - public Multimap convertProxy() { - Multimap map = ArrayListMultimap.create(); - - for (int i = 0; i < size; i++) { - map.put(keys[i], values[i]); - } - - return map; - } - -} diff --git a/src/services/gcw/FactionService.java b/src/services/gcw/FactionService.java index 55f7a17a..8a7094ad 100644 --- a/src/services/gcw/FactionService.java +++ b/src/services/gcw/FactionService.java @@ -54,12 +54,13 @@ public class FactionService implements INetworkDispatch { this.core = core; try { - /* Temporarily commented until another commit - StfTable stf = new StfTable("string/en/faction/faction_names.stf"); + /* + StfTable stf = new StfTable("clientdata/string/en/faction/faction_names.stf"); - for (int s = 1; s < strings.length; s++) { - if (strings[0] != null) { - String faction = ((String) strings[s][0]); + for (int s = 1; s < stf.getRowCount(); s++) { + String faction = stf.getStringById(s).getKey(); + + if (faction != null && faction != "") { factionMap.put(faction, CRC.StringtoCRC(faction)); } }