Project cleanup pre merge.
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
|
||||
package engine.devcmd.cmds;
|
||||
|
||||
import engine.Enum.DispatchChannel;
|
||||
@@ -21,48 +20,48 @@ import engine.server.MBServerStatics;
|
||||
|
||||
public class SetStaminaCmd extends AbstractDevCmd {
|
||||
|
||||
public SetStaminaCmd() {
|
||||
public SetStaminaCmd() {
|
||||
super("setStamina");
|
||||
this.addCmdString("stamina");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
// Arg Count Check
|
||||
if (words.length != 1) {
|
||||
this.sendUsage(pc);
|
||||
return;
|
||||
}
|
||||
@Override
|
||||
protected void _doCmd(PlayerCharacter pc, String[] words,
|
||||
AbstractGameObject target) {
|
||||
// Arg Count Check
|
||||
if (words.length != 1) {
|
||||
this.sendUsage(pc);
|
||||
return;
|
||||
}
|
||||
|
||||
float amount = 0.0f;
|
||||
try {
|
||||
amount = Float.parseFloat(words[0]);
|
||||
pc.setStamina(amount, pc);
|
||||
this.setTarget(pc); //for logging
|
||||
float amount = 0.0f;
|
||||
try {
|
||||
amount = Float.parseFloat(words[0]);
|
||||
pc.setStamina(amount, pc);
|
||||
this.setTarget(pc); //for logging
|
||||
|
||||
// Update all surrounding clients.
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(pc);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
// Update all surrounding clients.
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(pc);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied data: " + words[0]
|
||||
+ " failed to parse to a Float.");
|
||||
} catch (Exception e) {
|
||||
this.throwbackError(pc,
|
||||
"An unknown exception occurred while attempting to setStamina to "
|
||||
+ words[0]);
|
||||
}
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied data: " + words[0]
|
||||
+ " failed to parse to a Float.");
|
||||
} catch (Exception e) {
|
||||
this.throwbackError(pc,
|
||||
"An unknown exception occurred while attempting to setStamina to "
|
||||
+ words[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Sets your character's Stamina to 'amount'";
|
||||
}
|
||||
@Override
|
||||
protected String _getHelpString() {
|
||||
return "Sets your character's Stamina to 'amount'";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /setStamina amount'";
|
||||
}
|
||||
@Override
|
||||
protected String _getUsageString() {
|
||||
return "' /setStamina amount'";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user