FactionService fixes

This commit is contained in:
Treeku
2013-12-09 08:43:06 +00:00
parent 23731091c8
commit 09beefe817
6 changed files with 96 additions and 19 deletions
+9 -11
View File
@@ -39,8 +39,6 @@ import resources.common.Opcodes;
import resources.objects.creature.CreatureObject;
import resources.objects.player.PlayerObject;
import engine.clientdata.ClientFileManager;
import engine.clientdata.visitors.DatatableVisitor;
import engine.clients.Client;
import engine.resources.common.CRC;
import engine.resources.service.INetworkDispatch;
@@ -53,22 +51,22 @@ public class FactionService implements INetworkDispatch {
private Map<String, Integer> factionMap = new TreeMap<String, Integer>();
public FactionService(NGECore core) {
DatatableVisitor factionTable;
this.core = core;
try {
factionTable = ClientFileManager.loadFile("strings/en/faction/faction_names.stf", DatatableVisitor.class);
/* Temporarily commented until another commit
StfTable stf = new StfTable("string/en/faction/faction_names.stf");
for (int s = 0; s < factionTable.getRowCount(); s++) {
if (factionTable.getObject(s, 0) != null) {
String faction = ((String) factionTable.getObject(s, 1));
for (int s = 1; s < strings.length; s++) {
if (strings[0] != null) {
String faction = ((String) strings[s][0]);
factionMap.put(faction, CRC.StringtoCRC(faction));
}
}
} catch (Exception e) {
e.printStackTrace();
}
*/
} catch (Exception e) {
e.printStackTrace();
}
}
public int getCRC(String faction) {