mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-04 05:16:21 -04:00
Deleted unneeded file
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013 <Project SWG>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 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<K, V> implements PersistentProxy<Multimap<K, V>> {
|
||||
|
||||
private int size = 0;
|
||||
private K[] keys;
|
||||
private V[] values;
|
||||
|
||||
private MultimapProxy() { }
|
||||
|
||||
public void initializeProxy(Multimap<K, V> object) {
|
||||
List<K> keyList = new ArrayList<K>();
|
||||
List<V> valueList = new ArrayList<V>();
|
||||
|
||||
for (Entry<K, V> 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<K, V> convertProxy() {
|
||||
Multimap<K, V> map = ArrayListMultimap.create();
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
map.put(keys[i], values[i]);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user