Attempt to fix roadmap/.py error

This commit is contained in:
Treeku
2014-06-06 11:20:20 +02:00
committed by CharonInferar
parent 3935ee104e
commit f5fd39eaf0
5 changed files with 9 additions and 3 deletions
@@ -2,5 +2,4 @@ import sys
def setup(core, object):
object.setAttachment('radial_filename', 'creature/vehicle')
object.setAttachment('passengers', 0)
return
@@ -2,5 +2,4 @@ import sys
def setup(core, object):
object.setAttachment('radial_filename', 'creature/vehicle')
object.setAttachment('passengers', 0)
return
@@ -47,4 +47,8 @@ public final class Professions {
return map.get(profession);
}
public static boolean isProfession(String profession) {
return map.containsKey(profession);
}
}
+4
View File
@@ -228,6 +228,10 @@ public class CharacterService implements INetworkDispatch {
ClientCreateCharacter clientCreateCharacter = new ClientCreateCharacter();
clientCreateCharacter.deserialize(data);
if (!Professions.isProfession(clientCreateCharacter.getProfession())) {
return;
}
engine.resources.config.Config config = new engine.resources.config.Config();
config.setFilePath("nge.cfg");
if (!(config.loadConfigFile())) {
+1 -1
View File
@@ -573,7 +573,7 @@ public class PlayerService implements INetworkDispatch {
return;
}
if (profession == null || profession.equals("")) {
if (profession == null || !Professions.isProfession(profession)) {
return;
}