Browse Source

Output cleanup in ./realminfo.

master
MagicBot 2 years ago
parent
commit
cbe82bb95a
  1. 22
      src/engine/devcmd/cmds/RealmInfoCmd.java

22
src/engine/devcmd/cmds/RealmInfoCmd.java

@ -26,43 +26,39 @@ public class RealmInfoCmd extends AbstractDevCmd {
} }
@Override @Override
protected void _doCmd(PlayerCharacter pc, String[] words, protected void _doCmd(PlayerCharacter playerCharacter, String[] words,
AbstractGameObject target) { AbstractGameObject target) {
Zone serverZone; Zone serverZone;
Zone parentZone;
Realm serverRealm; Realm serverRealm;
int realmID; int realmID;
String outString = ""; String outString = "";
if (pc == null) { if (playerCharacter == null)
throwbackError(pc, "Unable to find the pc making the request.");
return; return;
}
serverZone = ZoneManager.findSmallestZone(pc.getLoc()); serverZone = ZoneManager.findSmallestZone(playerCharacter.getLoc());
if (serverZone == null) { if (serverZone == null) {
throwbackError(pc, "Zone not found"); throwbackError(playerCharacter, "Zone not found");
return; return;
} }
parentZone = serverZone.getParent(); realmID = RealmMap.getRealmIDAtLocation(playerCharacter.getLoc());
realmID = RealmMap.getRealmIDAtLocation(pc.getLoc());
String newline = "\r\n "; String newline = "\r\n ";
outString = newline; outString = newline;
outString += "RealmID: " + realmID; outString += "Realm: " + realmID + "(";
serverRealm = Realm.getRealm(realmID); serverRealm = Realm.getRealm(realmID);
if (serverRealm == null) if (serverRealm == null)
outString += " Name: SeaFloor"; outString += "SeaFloor";
else else
outString += serverRealm.getRealmName(); outString += serverRealm.getRealmName();
outString += ")";
outString += newline; outString += newline;
outString += " Zone: " + serverZone.getName(); outString += " Zone: " + serverZone.getName();
@ -76,7 +72,7 @@ public class RealmInfoCmd extends AbstractDevCmd {
outString += newline; outString += newline;
throwbackInfo(pc, outString); throwbackInfo(playerCharacter, outString);
} }
@Override @Override

Loading…
Cancel
Save