FatBoy-DOTC
9 months ago
2 changed files with 81 additions and 0 deletions
@ -0,0 +1,80 @@ |
|||||||
|
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||||
|
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||||
|
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||||
|
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||||
|
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||||
|
// Magicbane Emulator Project © 2013 - 2022
|
||||||
|
// www.magicbane.com
|
||||||
|
|
||||||
|
|
||||||
|
package engine.devcmd.cmds; |
||||||
|
|
||||||
|
import engine.Enum; |
||||||
|
import engine.Enum.BuildingGroup; |
||||||
|
import engine.Enum.GameObjectType; |
||||||
|
import engine.Enum.TargetColor; |
||||||
|
import engine.devcmd.AbstractDevCmd; |
||||||
|
import engine.gameManager.BuildingManager; |
||||||
|
import engine.gameManager.SessionManager; |
||||||
|
import engine.math.Vector3fImmutable; |
||||||
|
import engine.objects.*; |
||||||
|
import engine.util.StringUtils; |
||||||
|
|
||||||
|
import java.text.DecimalFormat; |
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.concurrent.ConcurrentHashMap; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* @author |
||||||
|
*/ |
||||||
|
public class ItemInfoCmd extends AbstractDevCmd { |
||||||
|
|
||||||
|
public ItemInfoCmd() { |
||||||
|
super("iteminfo"); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void _doCmd(PlayerCharacter pc, String[] words,AbstractGameObject target) { |
||||||
|
if (pc == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
if(target.getObjectType().equals(GameObjectType.Item) == false){ |
||||||
|
throwbackInfo(pc, "Must Select An Item"); |
||||||
|
return; |
||||||
|
} |
||||||
|
Item item = (Item)target; |
||||||
|
String newline = "\r\n "; |
||||||
|
String output = ""; |
||||||
|
output += "Required Races:" + newline; |
||||||
|
for(Enum.MonsterType required : item.getItemBase().requiredRaces) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
output += "Restricted Races:" + newline; |
||||||
|
for(Enum.MonsterType required : item.getItemBase().restrictedRaces) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
output += "Required Classes:" + newline; |
||||||
|
for(Enum.ClassType required : item.getItemBase().requiredClasses) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
output += "Restricted Classes:" + newline; |
||||||
|
for(Enum.ClassType required : item.getItemBase().restrictedClasses) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
output += "Required Disciplines:" + newline; |
||||||
|
for(Enum.DisciplineType required : item.getItemBase().requiredDiscs) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
output += "Restricted Disciplines:" + newline; |
||||||
|
for(Enum.DisciplineType required : item.getItemBase().restrictedDiscs) |
||||||
|
output += " " + required.name() + newline; |
||||||
|
throwbackInfo(pc, output); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String _getHelpString() { |
||||||
|
return "Gets information on an Object."; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String _getUsageString() { |
||||||
|
return "' /iteminfo'"; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue