forked from MagicBane/Server
Project cleanup pre merge.
This commit is contained in:
@@ -21,82 +21,81 @@ import engine.objects.PlayerCharacter;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class UnloadFurnitureCmd extends AbstractDevCmd {
|
||||
|
||||
public UnloadFurnitureCmd() {
|
||||
public UnloadFurnitureCmd() {
|
||||
super("furniture");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
|
||||
if (target.getObjectType() != GameObjectType.Building){
|
||||
this.throwbackError(pc, "Must be targeting a building to load/unload furniture.");
|
||||
return;
|
||||
}
|
||||
if (words[0].equalsIgnoreCase("unload")){
|
||||
if (target.getObjectType() != GameObjectType.Building) {
|
||||
this.throwbackError(pc, "Must be targeting a building to load/unload furniture.");
|
||||
return;
|
||||
}
|
||||
if (words[0].equalsIgnoreCase("unload")) {
|
||||
|
||||
UnloadObjectsMsg uom = new UnloadObjectsMsg();
|
||||
for (AbstractWorldObject awo: pc.getLoadedStaticObjects()){
|
||||
if (awo.getObjectType() != GameObjectType.Building)
|
||||
continue;
|
||||
UnloadObjectsMsg uom = new UnloadObjectsMsg();
|
||||
for (AbstractWorldObject awo : pc.getLoadedStaticObjects()) {
|
||||
if (awo.getObjectType() != GameObjectType.Building)
|
||||
continue;
|
||||
|
||||
Building awoBuilding = (Building)awo;
|
||||
Building awoBuilding = (Building) awo;
|
||||
|
||||
if (!awoBuilding.isFurniture)
|
||||
continue;
|
||||
continue;
|
||||
|
||||
if (awoBuilding.parentBuildingID != target.getObjectUUID())
|
||||
continue;
|
||||
|
||||
MoveToPointMsg msg = new MoveToPointMsg(awoBuilding);
|
||||
pc.getClientConnection().sendMsg(msg);
|
||||
if (awoBuilding.parentBuildingID != target.getObjectUUID())
|
||||
continue;
|
||||
|
||||
uom.addObject(awoBuilding);
|
||||
MoveToPointMsg msg = new MoveToPointMsg(awoBuilding);
|
||||
pc.getClientConnection().sendMsg(msg);
|
||||
|
||||
uom.addObject(awoBuilding);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pc.getClientConnection().sendMsg(uom);
|
||||
pc.getClientConnection().sendMsg(uom);
|
||||
|
||||
}else if (words[0].equalsIgnoreCase("load")){
|
||||
LoadStructureMsg lsm = new LoadStructureMsg();
|
||||
} else if (words[0].equalsIgnoreCase("load")) {
|
||||
LoadStructureMsg lsm = new LoadStructureMsg();
|
||||
|
||||
for (AbstractWorldObject awo: pc.getLoadedStaticObjects()){
|
||||
if (awo.getObjectType() != GameObjectType.Building)
|
||||
continue;
|
||||
for (AbstractWorldObject awo : pc.getLoadedStaticObjects()) {
|
||||
if (awo.getObjectType() != GameObjectType.Building)
|
||||
continue;
|
||||
|
||||
Building awoBuilding = (Building)awo;
|
||||
Building awoBuilding = (Building) awo;
|
||||
|
||||
if (!awoBuilding.isFurniture)
|
||||
continue;
|
||||
continue;
|
||||
|
||||
if (awoBuilding.parentBuildingID != target.getObjectUUID())
|
||||
continue;
|
||||
if (awoBuilding.parentBuildingID != target.getObjectUUID())
|
||||
continue;
|
||||
|
||||
lsm.addObject(awoBuilding);
|
||||
lsm.addObject(awoBuilding);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pc.getClientConnection().sendMsg(lsm);
|
||||
pc.getClientConnection().sendMsg(lsm);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
String help = "Enchants an item with a prefix and suffix";
|
||||
return help;
|
||||
}
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
String help = "Enchants an item with a prefix and suffix";
|
||||
return help;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
String usage = "' /enchant clear/Enchant1 Enchant2 Enchant3 ...'";
|
||||
return usage;
|
||||
}
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
String usage = "' /enchant clear/Enchant1 Enchant2 Enchant3 ...'";
|
||||
return usage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user