forked from MagicBane/Server
Writing string of bitset for contracts.
This commit is contained in:
@@ -369,7 +369,8 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += newline;
|
||||
output += "InventorySet: " + targetNPC.getContract().inventorySet;
|
||||
output += newline;
|
||||
output += targetNPC.getContract().getAllowedBuildings().toString();
|
||||
Contract contract1 = targetNPC.getContract();
|
||||
output += contract1.allowedBuildings.toString();
|
||||
output += newline;
|
||||
output += "Extra Rune: " + targetNPC.getContract().getExtraRune();
|
||||
|
||||
@@ -383,7 +384,8 @@ public class InfoCmd extends AbstractDevCmd {
|
||||
output += newline;
|
||||
if (mobBase != null) {
|
||||
output += newline;
|
||||
output += "Slottable: " + targetNPC.getContract().getAllowedBuildings().toString();
|
||||
Contract contract = targetNPC.getContract();
|
||||
output += "Slottable: " + contract.allowedBuildings.toString();
|
||||
output += newline;
|
||||
output += "EquipSet: " + targetNPC.getEquipmentSetID();
|
||||
output += newline;
|
||||
|
||||
@@ -12,7 +12,6 @@ package engine.devcmd.cmds;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.BuildingGroup;
|
||||
import engine.objects.*;
|
||||
import engine.util.StringUtils;
|
||||
@@ -93,7 +92,7 @@ public class SlotNpcCmd extends AbstractDevCmd {
|
||||
|
||||
if (args[0].equalsIgnoreCase("LIST")) {
|
||||
|
||||
outString = "Current: " + contract.getAllowedBuildings();
|
||||
outString = "Current: " + contract.allowedBuildings;
|
||||
|
||||
throwbackInfo(pc, outString);
|
||||
return;
|
||||
@@ -111,9 +110,9 @@ public class SlotNpcCmd extends AbstractDevCmd {
|
||||
switch (args[1].toUpperCase()) {
|
||||
|
||||
case "ON":
|
||||
contract.getAllowedBuildings().add(buildingGroup);
|
||||
contract.allowedBuildings.add(buildingGroup);
|
||||
|
||||
if (!DbManager.ContractQueries.updateAllowedBuildings(contract, mbEnums.toLong(contract.getAllowedBuildings()))) {
|
||||
if (!DbManager.ContractQueries.updateAllowedBuildings(contract)) {
|
||||
Logger.error("Failed to update Database for Contract Allowed buildings");
|
||||
ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. ");
|
||||
return;
|
||||
@@ -122,8 +121,9 @@ public class SlotNpcCmd extends AbstractDevCmd {
|
||||
throwbackInfo(pc, "SlotNpc " + buildingGroup.name() + " added to npc");
|
||||
break;
|
||||
case "OFF":
|
||||
contract.getAllowedBuildings().remove(buildingGroup);
|
||||
if (!DbManager.ContractQueries.updateAllowedBuildings(contract, mbEnums.toLong(contract.getAllowedBuildings()))) {
|
||||
contract.allowedBuildings.remove(buildingGroup);
|
||||
|
||||
if (!DbManager.ContractQueries.updateAllowedBuildings(contract)) {
|
||||
Logger.error("Failed to update Database for Contract Allowed buildings");
|
||||
ChatManager.chatSystemError(pc, "Failed to update Database for Contract Allowed buildings. ");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user