Project cleanup pre merge.

This commit is contained in:
2023-07-15 09:23:48 -04:00
parent 134b651df8
commit 9bbdef224d
747 changed files with 99704 additions and 101200 deletions
@@ -13,60 +13,60 @@ import engine.server.MBServerStatics;
public class SetPromotionClassCmd extends AbstractDevCmd {
public SetPromotionClassCmd() {
public SetPromotionClassCmd() {
super("setPromotionClass");
}
@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;
}
int classID = 0;
try {
classID = Integer.parseInt(words[0]);
} catch (Exception e) {
throwbackError(pc,
"Invalid setPromotionClass Command. must specify an ID between 2504 and 2526.");
return;
}
if (classID < 2504 || classID > 2526 || classID == 2522) {
throwbackError(pc,
"Invalid setPromotionClass Command. must specify an ID between 2504 and 2526.");
return;
}
pc.setPromotionClass(classID);
ChatManager.chatSayInfo(pc,
"PromotionClass changed to " + classID);
InterestManager.reloadCharacter(pc);
this.setTarget(pc); //for logging
int classID = 0;
try {
classID = Integer.parseInt(words[0]);
} catch (Exception e) {
throwbackError(pc,
"Invalid setPromotionClass Command. must specify an ID between 2504 and 2526.");
return;
}
if (classID < 2504 || classID > 2526 || classID == 2522) {
throwbackError(pc,
"Invalid setPromotionClass Command. must specify an ID between 2504 and 2526.");
return;
}
pc.setPromotionClass(classID);
ChatManager.chatSayInfo(pc,
"PromotionClass changed to " + classID);
InterestManager.reloadCharacter(pc);
this.setTarget(pc); //for logging
// recalculate all bonuses/formulas/skills/powers
pc.recalculate();
// recalculate all bonuses/formulas/skills/powers
pc.recalculate();
// send the rune application to the clients
// send the rune application to the clients
PromotionClass promo = pc.getPromotionClass();
if (promo != null) {
ApplyRuneMsg arm = new ApplyRuneMsg(pc.getObjectType().ordinal(), pc.getObjectUUID(), promo.getObjectUUID(), promo.getObjectType().ordinal(), promo.getObjectUUID(), true);
DispatchMessage.dispatchMsgToInterestArea(pc, arm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
}
PromotionClass promo = pc.getPromotionClass();
if (promo != null) {
ApplyRuneMsg arm = new ApplyRuneMsg(pc.getObjectType().ordinal(), pc.getObjectUUID(), promo.getObjectUUID(), promo.getObjectType().ordinal(), promo.getObjectUUID(), true);
DispatchMessage.dispatchMsgToInterestArea(pc, arm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
}
}
}
@Override
protected String _getHelpString() {
return "Sets your character's PromotionClass to 'ID'";
}
@Override
protected String _getHelpString() {
return "Sets your character's PromotionClass to 'ID'";
}
@Override
protected String _getUsageString() {
return "' /setPromotionClass id'";
}
@Override
protected String _getUsageString() {
return "' /setPromotionClass id'";
}
}