检查名字逻辑修改
parent
cdac0990ee
commit
da2047437d
|
|
@ -150,6 +150,7 @@ public class PlayerLogic {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
do {
|
do {
|
||||||
|
i++;
|
||||||
pre = surnameMap.get(MathUtils.random(1, surnameMap.size()));
|
pre = surnameMap.get(MathUtils.random(1, surnameMap.size()));
|
||||||
post = nameMap.get(MathUtils.random(1, nameMap.size()));
|
post = nameMap.get(MathUtils.random(1, nameMap.size()));
|
||||||
name = pre + post;
|
name = pre + post;
|
||||||
|
|
@ -159,7 +160,6 @@ public class PlayerLogic {
|
||||||
LOGGER.error("随机名称失败,包含有违禁字符,最后一次名字:"+name);
|
LOGGER.error("随机名称失败,包含有违禁字符,最后一次名字:"+name);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
while (result && i<max);
|
while (result && i<max);
|
||||||
if (result){
|
if (result){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue