Pirate name related code moved to NPCmanager.
This commit is contained in:
@@ -752,7 +752,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
else
|
||||
rank = MBServerStatics.ELITE;
|
||||
|
||||
mob.firstName = NPC.getPirateName(mob.getMobBaseID());
|
||||
mob.firstName = NPCManager.getPirateName(mob.getMobBaseID());
|
||||
mob.lastName = rank + " " + minionType.getRace() + " " + minionType.getName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import static engine.net.client.msg.ErrorPopupMsg.sendErrorPopup;
|
||||
@@ -1264,33 +1263,6 @@ public class NPC extends AbstractCharacter {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void loadAllPirateNames() {
|
||||
|
||||
DbManager.NPCQueries.LOAD_PIRATE_NAMES();
|
||||
}
|
||||
|
||||
public static String getPirateName(int mobBaseID) {
|
||||
|
||||
ArrayList<String> nameList = null;
|
||||
|
||||
// If we cannot find name for this mobbase then
|
||||
// fallback to human male
|
||||
|
||||
if (_pirateNames.containsKey(mobBaseID))
|
||||
nameList = _pirateNames.get(mobBaseID);
|
||||
else
|
||||
nameList = _pirateNames.get(2111);
|
||||
|
||||
if (nameList == null) {
|
||||
Logger.error("Null name list for 2111!");
|
||||
}
|
||||
|
||||
return nameList.get(ThreadLocalRandom.current().nextInt(nameList.size()));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getUpgradeCost() {
|
||||
|
||||
int upgradeCost;
|
||||
|
||||
Reference in New Issue
Block a user