|
|
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
|
|
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
|
|
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
|
|
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
|
|
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
|
|
|
// Magicbane Emulator Project © 2013 - 2022
|
|
|
|
// www.magicbane.com
|
|
|
|
|
|
|
|
|
|
|
|
package engine.devcmd.cmds;
|
|
|
|
|
|
|
|
import engine.InterestManagement.HeightMap;
|
|
|
|
import engine.devcmd.AbstractDevCmd;
|
|
|
|
import engine.gameManager.ZoneManager;
|
|
|
|
import engine.objects.AbstractGameObject;
|
|
|
|
import engine.objects.PlayerCharacter;
|
|
|
|
import engine.objects.Zone;
|
|
|
|
|
|
|
|
public class GetHeightCmd extends AbstractDevCmd {
|
|
|
|
|
|
|
|
public GetHeightCmd() {
|
|
|
|
super("getHeight");
|
|
|
|
this.addCmdString("height");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void _doCmd(PlayerCharacter pc, String[] words,
|
|
|
|
AbstractGameObject target) {
|
|
|
|
|
|
|
|
|
|
|
|
float height = HeightMap.getWorldHeight(pc.getLoc());
|
|
|
|
|
|
|
|
this.throwbackInfo(pc, "Altitude : " + height);
|
|
|
|
|
|
|
|
this.throwbackInfo(pc, "Character Height: " + pc.getCharacterHeight());
|
|
|
|
this.throwbackInfo(pc, "Character Height to start swimming: " + pc.centerHeight);
|
|
|
|
|
|
|
|
Zone zone = ZoneManager.findSmallestZone(pc.getLoc());
|
|
|
|
this.throwbackInfo(pc, "Water Level : " + zone.getSeaLevel());
|
|
|
|
this.throwbackInfo(pc, "Character Water Level Above : " + (pc.getCharacterHeight() + height - zone.getSeaLevel()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected String _getHelpString() {
|
|
|
|
return "Temporarily Changes SubRace";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected String _getUsageString() {
|
|
|
|
return "' /subrace mobBaseID";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|