forked from MagicBane/Server
Refactor to concurrent list.
This commit is contained in:
@@ -225,11 +225,11 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += newline;
|
||||
output += "Hirelings List: name / slot / floor";
|
||||
|
||||
for (AbstractCharacter npc : targetBuilding.hirelings.keySet()) {
|
||||
for (AbstractCharacter npc : targetBuilding.hirelings) {
|
||||
|
||||
if (npc.getObjectType() != GameObjectType.NPC)
|
||||
continue;
|
||||
output += newline + npc.getName() + " slot " + targetBuilding.hirelings.get(npc);
|
||||
output += newline + npc.getName() + " slot " + targetBuilding.hirelings.indexOf(npc) + 1;
|
||||
output += newline + "location " + npc.getLoc();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd {
|
||||
for (Building building : zone.zoneBuildingSet) {
|
||||
if (!BuildingManager.IsWallPiece(building))
|
||||
continue;
|
||||
for (AbstractCharacter ac : building.hirelings.keySet()) {
|
||||
for (AbstractCharacter ac : building.hirelings) {
|
||||
NPC npc = null;
|
||||
Mob mobA = null;
|
||||
|
||||
@@ -143,7 +143,7 @@ public class PurgeObjectsCmd extends AbstractDevCmd {
|
||||
if ((building.getBlueprint() != null) && (building.getBlueprint().getBuildingGroup() == BuildingGroup.SPIRE))
|
||||
building.disableSpire(false);
|
||||
|
||||
for (AbstractCharacter ac : building.hirelings.keySet()) {
|
||||
for (AbstractCharacter ac : building.hirelings) {
|
||||
NPC npc = null;
|
||||
Mob mobA = null;
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ public class RemoveObjectCmd extends AbstractDevCmd {
|
||||
|
||||
// Remove hirelings for this building
|
||||
|
||||
for (AbstractCharacter abstractCharacter : building.hirelings.keySet())
|
||||
for (AbstractCharacter abstractCharacter : building.hirelings)
|
||||
BuildingManager.removeHireling(building, abstractCharacter);
|
||||
|
||||
Zone zone = building.getParentZone();
|
||||
|
||||
@@ -70,8 +70,8 @@ public class SlotTestCmd extends AbstractDevCmd {
|
||||
outString += "\r\n\r\n";
|
||||
outString += "Hirelings List:";
|
||||
|
||||
for (AbstractCharacter hireling : building.hirelings.keySet())
|
||||
outString += "\r\n" + hireling.getName() + " slot : " + building.hirelings.get(hireling);
|
||||
for (AbstractCharacter hireling : building.hirelings)
|
||||
outString += "\r\n" + hireling.getName() + " slot : " + building.hirelings.indexOf(hireling) + 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user