<NME> GrinderAllQualifys.java
<BEF> package com.planet_ink.coffee_mud.WebMacros.grinder;

import com.planet_ink.coffee_web.interfaces.*;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.AbilityMapper.SecretFlag;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.Clan.MemberRecord;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import com.planet_ink.coffee_mud.WebMacros.StdWebMacro;

import java.util.*;

/*
   Copyright 2011-2022 Bo Zimmerman

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

	   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
public class GrinderAllQualifys
{
	public String name()
	{
		return "GrinderAllQualifys";
	}

	public String editAllQualify(final HTTPRequest httpReq, final java.util.Map<String,String> parms)
	{
		final String last=httpReq.getUrlParameter("ALLQUALID");
		if((last==null)||(last.length()==0))
			return " @break@";
		String which=httpReq.getUrlParameter("ALLQUALWHICH");
		if(parms.containsKey("WHICH"))
			which=parms.get("WHICH");
		if((which==null)||(which.length()==0))
			return " @break@";
		final Map<String,Map<String,AbilityMapper.AbilityMapping>> allQualMap=CMLib.ableMapper().getAllQualifiesMap(httpReq.getRequestObjects());
		final Map<String,AbilityMapper.AbilityMapping> map=allQualMap.get(which.toUpperCase().trim());
		if(map==null)
			return " @break@";

		AbilityMapper.AbilityMapping newMap=map.get(last.toUpperCase().trim());
		if(newMap==null)
		{
			newMap=CMLib.ableMapper().newAbilityMapping().ID(last.toUpperCase().trim());
			newMap.abilityID(last);
			newMap.allQualifyFlag(true);
		}
		String s;
		s=httpReq.getUrlParameter("LEVEL");
		if(s!=null)
			newMap.qualLevel(CMath.s_int(s));
		s=httpReq.getUrlParameter("PROF");
		if(s!=null)
			newMap.defaultProficiency(CMath.s_int(s));
		s=httpReq.getUrlParameter("MASK");
		if(s!=null)
			newMap.extraMask(s);
		s=httpReq.getUrlParameter("AUTOGAIN");
		if(s!=null)
			newMap.autoGain(s.equalsIgnoreCase("on"));
		final StringBuilder preReqs=new StringBuilder("");
		int curChkNum=1;
		while(httpReq.isUrlParameter("REQABLE"+curChkNum))
		{
			final String curVal=httpReq.getUrlParameter("REQABLE"+curChkNum);
			if(curVal.equals("DEL")||curVal.equals("DELETE")||curVal.trim().length()==0)
			{
    		}
			curChkNum++;
    	}
    	newMap=CMLib.ableMapper(). makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,
													  CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);
		map.put(last.toUpperCase().trim(),newMap);
		CMLib.ableMapper().saveAllQualifysFile(allQualMap);
        return "";
				preReqs.append(" ");
			}
			curChkNum++;
		}
		newMap=CMLib.ableMapper().makeAbilityMapping(newMap.abilityID(),newMap.qualLevel(),newMap.abilityID(),
													 newMap.defaultProficiency(),100,"",newMap.autoGain(),
													 SecretFlag.PUBLIC,true,CMParms.parseSpaces(preReqs.toString().trim(), true), 
													 newMap.extraMask(),null);
		map.put(last.toUpperCase().trim(),newMap);
		CMLib.ableMapper().saveAllQualifysFile(allQualMap);
		return "";
	}
}

<MSG> 

git-svn-id: svn://192.168.1.10/public/CoffeeMud@9049 0d6f1817-ed0e-0410-87c9-987e46238f29

<DFF> @@ -88,8 +88,8 @@ public class GrinderAllQualifys
     		}
 			curChkNum++;
     	}
-    	newMap=CMLib.ableMapper(). makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,
-													  CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);
+    	newMap=CMLib.ableMapper().makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,
+									     		     CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);
 		map.put(last.toUpperCase().trim(),newMap);
 		CMLib.ableMapper().saveAllQualifysFile(allQualMap);
         return "";

{'commit': 'diff --git a/com/planet_ink/coffee_mud/Commands/Create.java b/com/planet_ink/coffee_mud/Commands/Create.java\nindex 5a3509d18b..c473cd8719 100644\n--- a/com/planet_ink/coffee_mud/Commands/Create.java\n+++ b/com/planet_ink/coffee_mud/Commands/Create.java\n@@ -10,6 +10,7 @@ import com.planet_ink.coffee_mud.Commands.interfaces.*;\n import com.planet_ink.coffee_mud.Common.interfaces.*;\r\n import com.planet_ink.coffee_mud.Exits.interfaces.*;\r\n import com.planet_ink.coffee_mud.Items.interfaces.*;\r\n+import com.planet_ink.coffee_mud.Libraries.interfaces.AbilityMapper;\r\n import com.planet_ink.coffee_mud.Locales.interfaces.*;\r\n import com.planet_ink.coffee_mud.MOBS.interfaces.*;\r\n import com.planet_ink.coffee_mud.Races.interfaces.*;\r\n@@ -733,7 +734,46 @@ public class Create extends StdCommand\n \t\tmob.location().showHappens(CMMsg.MSG_OK_ACTION,"The skill of the world just increased!");\r\n \t}\r\n \r\n-\t\r\n+\tpublic void allQualify(MOB mob, Vector commands)\r\n+\tthrows IOException\r\n+\t{\r\n+\t\tif(commands.size()<4)\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is CREATE ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tString eachOrAll=(String)commands.get(2);\r\n+\t\tif((!eachOrAll.equalsIgnoreCase("each"))&&(!eachOrAll.equalsIgnoreCase("all")))\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is CREATE ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\t\r\n+\t\tString classD=CMParms.combine(commands,3);\r\n+\t\tAbility A=CMClass.getAbility(classD);\r\n+\t\tif(A==null)\r\n+\t\t{\r\n+\t\t\tmob.tell("Ability with the ID \'"+classD+"\' does not exist! Try LIST ABILITIES.");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tMap<String,Map<String,AbilityMapper.AbilityMapping>> map=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tMap<String,AbilityMapper.AbilityMapping> subMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tif(subMap.containsKey(classD.toUpperCase().trim()))\r\n+\t\t{\r\n+\t\t\tmob.tell("All-Qualify entry ("+eachOrAll+") ID \'"+A.ID()+"\' already exists.  Try DESTROY or MODIFY.");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+        AbilityMapper.AbilityMapping mapped = CMLib.genEd().modifyAllQualifyEntry(mob,eachOrAll.toUpperCase().trim(),A);\r\n+\t\tmap=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tsubMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tsubMap.put(A.ID().toUpperCase().trim(), mapped);\r\n+\t\tCMLib.ableMapper().saveAllQualifysFile(map);\r\n+\t\tmob.location().showHappens(CMMsg.MSG_OK_ACTION,"The skill of the world just increased!");\r\n+\t}\r\n+\r\n \tpublic void classes(MOB mob, Vector commands)\r\n \t\tthrows IOException\r\n \t{\r\n@@ -860,6 +900,13 @@ public class Create extends StdCommand\n \t\t\tcraftSkills(mob,commands);\r\n \t\t}\r\n \t\telse\r\n+\t\tif(commandType.equals("ALLQUALIFY"))\r\n+\t\t{\r\n+\t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"CMDABILITIES")) return errorOut(mob);\r\n+\t\t\tmob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,"^S<S-NAME> wave(s) <S-HIS-HER> arms...^?");\r\n+\t\t\tallQualify(mob,commands);\r\n+\t\t}\r\n+\t\telse\r\n \t\tif(commandType.equals("COMPONENT"))\r\n \t\t{\r\n \t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"COMPONENTS")) return errorOut(mob);\r\n@@ -1187,10 +1234,10 @@ public class Create extends StdCommand\n \t\t\t\t\t\texecute(mob,commands,metaFlags);\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse\r\n-\t\t\t\t\t\tmob.tell("\\n\\rYou cannot create a \'"+commandType+"\'. However, you might try an EXIT, ITEM, QUEST, FACTION, COMPONENT, GOVERNMENT, HOLIDAY, CLAN, MOB, RACE, ABILITY, LANGUAGE, CRAFTSKILL, CLASS, POLL, DEBUGFLAG, DISABLEFLAG, USER, or ROOM.");\r\n+\t\t\t\t\t\tmob.tell("\\n\\rYou cannot create a \'"+commandType+"\'. However, you might try an EXIT, ITEM, QUEST, FACTION, COMPONENT, GOVERNMENT, HOLIDAY, CLAN, MOB, RACE, ABILITY, LANGUAGE, CRAFTSKILL, ALLQUALIFY, CLASS, POLL, DEBUGFLAG, DISABLEFLAG, USER, or ROOM.");\r\n \t\t\t\t}\r\n \t\t\t\telse\r\n-\t\t\t\t\tmob.tell("\\n\\rYou cannot create a \'"+commandType+"\'. However, you might try an EXIT, ITEM, QUEST, FACTION, MOB, COMPONENT, GOVERNMENT, HOLIDAY, CLAN, RACE, ABILITY, LANGUAGE, CRAFTSKILL, CLASS, POLL, USER, DEBUGFLAG, DISABLEFLAG, ROOM.");\r\n+\t\t\t\t\tmob.tell("\\n\\rYou cannot create a \'"+commandType+"\'. However, you might try an EXIT, ITEM, QUEST, FACTION, MOB, COMPONENT, GOVERNMENT, HOLIDAY, CLAN, RACE, ABILITY, LANGUAGE, CRAFTSKILL, ALLQUALIFY, CLASS, POLL, USER, DEBUGFLAG, DISABLEFLAG, ROOM.");\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\ndiff --git a/com/planet_ink/coffee_mud/Commands/Destroy.java b/com/planet_ink/coffee_mud/Commands/Destroy.java\nindex be60dee2cc..e44a059e0b 100644\n--- a/com/planet_ink/coffee_mud/Commands/Destroy.java\n+++ b/com/planet_ink/coffee_mud/Commands/Destroy.java\n@@ -767,7 +767,36 @@ public class Destroy extends StdCommand\n \t\treturn false;\r\n \t}\r\n \r\n-\t\r\n+\tpublic void allQualify(MOB mob, Vector commands)\r\n+\tthrows IOException\r\n+\t{\r\n+\t\tif(commands.size()<4)\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is MODIFY ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tString eachOrAll=(String)commands.get(2);\r\n+\t\tif((!eachOrAll.equalsIgnoreCase("each"))&&(!eachOrAll.equalsIgnoreCase("all")))\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is MODIFY ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\t\r\n+\t\tString classD=CMParms.combine(commands,3);\r\n+\t\tMap<String,Map<String,AbilityMapper.AbilityMapping>> map=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tMap<String,AbilityMapper.AbilityMapping> subMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tif(!subMap.containsKey(classD.toUpperCase().trim()))\r\n+\t\t{\r\n+\t\t\tmob.tell("All-Qualify entry ("+eachOrAll+") ID \'"+classD+"\' does not exist! Try LIST ALLQUALIFYS");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tsubMap.remove(classD.toUpperCase().trim());\r\n+        CMLib.ableMapper().saveAllQualifysFile(map);\r\n+\t\tmob.location().showHappens(CMMsg.MSG_OK_ACTION,"The skill of the world just decreased!");\r\n+\t}\r\n+\r\n \tpublic boolean execute(MOB mob, Vector commands, int metaFlags)\r\n \t\tthrows java.io.IOException\r\n \t{\r\n@@ -951,6 +980,13 @@ public class Destroy extends StdCommand\n \t\t\tabilities(mob,commands);\r\n \t\t}\r\n \t\telse\r\n+\t\tif(commandType.equals("ALLQUALIFY"))\r\n+\t\t{\r\n+\t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"CMDABILITIES")) return errorOut(mob);\r\n+\t\t\tmob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,"^S<S-NAME> wave(s) <S-HIS-HER> arms...^?");\r\n+\t\t\tallQualify(mob,commands);\r\n+\t\t}\r\n+\t\telse\r\n \t\tif(commandType.equals("COMPONENT"))\r\n \t\t{\r\n \t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"COMPONENTS")) return errorOut(mob);\r\ndiff --git a/com/planet_ink/coffee_mud/Commands/ListCmd.java b/com/planet_ink/coffee_mud/Commands/ListCmd.java\nindex 8baf673c3e..22a54dbd24 100644\n--- a/com/planet_ink/coffee_mud/Commands/ListCmd.java\n+++ b/com/planet_ink/coffee_mud/Commands/ListCmd.java\n@@ -40,6 +40,47 @@ public class ListCmd extends StdCommand\n \tprivate final String[] access={"LIST"};\r\n \tpublic String[] getAccessWords(){return access;}\r\n \r\n+\tpublic StringBuilder listAllQualifies(Session viewerS, Vector cmds)\r\n+\t{\r\n+\t\tStringBuilder str=new StringBuilder("");\r\n+\t\tMap<String,Map<String,AbilityMapper.AbilityMapping>> map=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tstr.append("<<EACH CLASS>>\\n\\r");\r\n+\t\tMap<String,AbilityMapper.AbilityMapping> subMap=map.get("EACH");\r\n+\t\tstr.append(CMStrings.padRight("Skill ID", ListingLibrary.ColFixer.fixColWidth(20.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Lvl", ListingLibrary.ColFixer.fixColWidth(4.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Gain", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Prof", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Mask", ListingLibrary.ColFixer.fixColWidth(40.0,viewerS)));\r\n+\t\tstr.append("\\n\\r");\r\n+\t\tfor(AbilityMapper.AbilityMapping mapped : subMap.values())\r\n+\t\t{\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.abilityID, ListingLibrary.ColFixer.fixColWidth(20.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(""+mapped.qualLevel, ListingLibrary.ColFixer.fixColWidth(4.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.autoGain?"yes":"no", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(""+mapped.defaultProficiency, ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.extraMask, ListingLibrary.ColFixer.fixColWidth(40.0,viewerS)));\r\n+\t\t\tstr.append("\\n\\r");\r\n+\t\t}\r\n+\t\tstr.append("\\n\\r");\r\n+\t\tstr.append("<<ALL CLASSES>>\\n\\r");\r\n+\t\tsubMap=map.get("ALL");\r\n+\t\tstr.append(CMStrings.padRight("Skill ID", ListingLibrary.ColFixer.fixColWidth(20.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Lvl", ListingLibrary.ColFixer.fixColWidth(4.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Gain", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Prof", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\tstr.append(CMStrings.padRight("Mask", ListingLibrary.ColFixer.fixColWidth(40.0,viewerS)));\r\n+\t\tstr.append("\\n\\r");\r\n+\t\tfor(AbilityMapper.AbilityMapping mapped : subMap.values())\r\n+\t\t{\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.abilityID, ListingLibrary.ColFixer.fixColWidth(20.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(""+mapped.qualLevel, ListingLibrary.ColFixer.fixColWidth(4.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.autoGain?"yes":"no", ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(""+mapped.defaultProficiency, ListingLibrary.ColFixer.fixColWidth(5.0,viewerS)));\r\n+\t\t\tstr.append(CMStrings.padRight(mapped.extraMask, ListingLibrary.ColFixer.fixColWidth(40.0,viewerS)));\r\n+\t\t\tstr.append("\\n\\r");\r\n+\t\t}\r\n+\t\treturn str;\r\n+\t}\r\n \r\n \tpublic StringBuilder roomDetails(Session viewerS, Vector these, Room likeRoom)\r\n \t{return roomDetails(viewerS,these.elements(),likeRoom);}\r\n@@ -1829,6 +1870,7 @@ public class ListCmd extends StdCommand\n \t\t/*61*/{"CLANS","CMDCLANS"},\r\n \t\t/*62*/{"DEBUGFLAG","LISTADMIN"},\r\n \t\t/*63*/{"DISABLEFLAG","LISTADMIN"},\r\n+\t\t/*64*/{"ALLQUALIFYS","CMDABILITIES","LISTADMIN"}\r\n \t};\r\n \r\n     public boolean pause(Session sess) \r\n@@ -1967,6 +2009,7 @@ public class ListCmd extends StdCommand\n \t\tcase 61: s.wraplessPrintln(listClans(mob.session(),commands)); break;\r\n \t\tcase 62: s.println("\\n\\r^xDebug Settings: ^?^.^N\\n\\r"+CMParms.toStringList(new XVector<CMSecurity.DbgFlag>(CMSecurity.getDebugEnum()))+"\\n\\r"); break;\r\n \t\tcase 63: s.println("\\n\\r^xDisable Settings: ^?^.^N\\n\\r"+CMParms.toStringList(new XVector<CMSecurity.DisFlag>(CMSecurity.getDisablesEnum()))+"\\n\\r"); break;\r\n+\t\tcase 65: s.wraplessPrintln(listAllQualifies(mob.session(),commands).toString()); break;\r\n         default:\r\n \t\t\ts.println("List?!");\r\n \t\t\tbreak;\r\ndiff --git a/com/planet_ink/coffee_mud/Commands/Modify.java b/com/planet_ink/coffee_mud/Commands/Modify.java\nindex a2f0028237..9379f4c50d 100644\n--- a/com/planet_ink/coffee_mud/Commands/Modify.java\n+++ b/com/planet_ink/coffee_mud/Commands/Modify.java\n@@ -10,6 +10,7 @@ import com.planet_ink.coffee_mud.Commands.interfaces.*;\n import com.planet_ink.coffee_mud.Common.interfaces.*;\r\n import com.planet_ink.coffee_mud.Exits.interfaces.*;\r\n import com.planet_ink.coffee_mud.Items.interfaces.*;\r\n+import com.planet_ink.coffee_mud.Libraries.interfaces.AbilityMapper;\r\n import com.planet_ink.coffee_mud.Locales.interfaces.*;\r\n import com.planet_ink.coffee_mud.MOBS.interfaces.*;\r\n import com.planet_ink.coffee_mud.Races.interfaces.*;\r\n@@ -909,6 +910,46 @@ public class Modify extends StdCommand\n \t\treturn true;\r\n \t}\r\n \r\n+\tpublic void allQualify(MOB mob, Vector commands)\r\n+\tthrows IOException\r\n+\t{\r\n+\t\tif(commands.size()<4)\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is MODIFY ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tString eachOrAll=(String)commands.get(2);\r\n+\t\tif((!eachOrAll.equalsIgnoreCase("each"))&&(!eachOrAll.equalsIgnoreCase("all")))\r\n+\t\t{\r\n+\t\t\tmob.tell("You have failed to specify the proper fields.\\n\\rThe format is MODIFY ALLQUALIFY EACH/ALL [SKILL ID]\\n\\r");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\t\r\n+\t\tString classD=CMParms.combine(commands,3);\r\n+\t\tAbility A=CMClass.getAbility(classD);\r\n+\t\tif(A==null)\r\n+\t\t{\r\n+\t\t\tmob.tell("Ability with the ID \'"+classD+"\' does not exist! Try LIST ABILITIES.");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+\t\tMap<String,Map<String,AbilityMapper.AbilityMapping>> map=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tMap<String,AbilityMapper.AbilityMapping> subMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tif(!subMap.containsKey(classD.toUpperCase().trim()))\r\n+\t\t{\r\n+\t\t\tmob.tell("All-Qualify entry ("+eachOrAll+") ID \'"+A.ID()+"\' does not exist!  Try CREATE, or LIST ALLQUALIFYS.");\r\n+\t\t\tmob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,"<S-NAME> flub(s) a spell..");\r\n+\t\t\treturn;\r\n+\t\t}\r\n+        AbilityMapper.AbilityMapping mapped = CMLib.genEd().modifyAllQualifyEntry(mob,eachOrAll.toUpperCase().trim(),A);\r\n+\t\tmap=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tsubMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tsubMap.put(A.ID().toUpperCase().trim(), mapped);\r\n+\t\tCMLib.ableMapper().saveAllQualifysFile(map);\r\n+\t\tmob.location().showHappens(CMMsg.MSG_OK_ACTION,"The skill of the world just changed!");\r\n+\t}\r\n+\r\n \tpublic boolean classes(MOB mob, Vector commands)\r\n \t\tthrows IOException\r\n \t{\r\n@@ -1432,6 +1473,12 @@ public class Modify extends StdCommand\n \t\t\tcraftSkills(mob,commands);\r\n \t\t}\r\n \t\telse\r\n+\t\tif(commandType.equals("ALLQUALIFY"))\r\n+\t\t{\r\n+\t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"CMDABILITIES")) return errorOut(mob);\r\n+\t\t\tallQualify(mob,commands);\r\n+\t\t}\r\n+\t\telse\r\n \t\tif(commandType.equals("AREA"))\r\n \t\t{\r\n \t\t\tif(!CMSecurity.isAllowed(mob,mob.location(),"CMDAREAS")) return errorOut(mob);\r\n@@ -1778,7 +1825,7 @@ public class Modify extends StdCommand\n \t\t\t\texecute(mob,commands,metaFlags);\r\n \t\t\t}\r\n \t\t\telse\r\n-\t\t\t\tmob.tell("\\n\\rYou cannot modify a \'"+commandType+"\'. However, you might try an ITEM, RACE, CLASS, ABILITY, LANGUAGE, CRAFTSKILL, AREA, EXIT, COMPONENT, RECIPE, EXPERTISE, TITLE, QUEST, MOB, USER, HOLIDAY, GOVERNMENT, JSCRIPT, FACTION, SOCIAL, CLAN, POLL, or ROOM.");\r\n+\t\t\t\tmob.tell("\\n\\rYou cannot modify a \'"+commandType+"\'. However, you might try an ITEM, RACE, CLASS, ABILITY, LANGUAGE, CRAFTSKILL, ALLQUALIFY, AREA, EXIT, COMPONENT, RECIPE, EXPERTISE, TITLE, QUEST, MOB, USER, HOLIDAY, GOVERNMENT, JSCRIPT, FACTION, SOCIAL, CLAN, POLL, or ROOM.");\r\n \t\t}\r\n \t\treturn false;\r\n \t}\r\ndiff --git a/com/planet_ink/coffee_mud/Libraries/CMGenEditor.java b/com/planet_ink/coffee_mud/Libraries/CMGenEditor.java\nindex 175097dc23..0211d628fc 100644\n--- a/com/planet_ink/coffee_mud/Libraries/CMGenEditor.java\n+++ b/com/planet_ink/coffee_mud/Libraries/CMGenEditor.java\n@@ -7846,4 +7846,40 @@ public class CMGenEditor extends StdLibrary implements GenericEditor\n             }\r\n         }\r\n     }\r\n+    \r\n+\t@Override\r\n+\tpublic AbilityMapper.AbilityMapping modifyAllQualifyEntry(MOB mob, String eachOrAll, Ability me) throws IOException \r\n+\t{\r\n+        int showFlag=-1;\r\n+        if(CMProps.getIntVar(CMProps.SYSTEMI_EDITORTYPE)>0)\r\n+            showFlag=-999;\r\n+\t\tMap<String,Map<String,AbilityMapper.AbilityMapping>> map=CMLib.ableMapper().getAllQualifiesMap(null);\r\n+\t\tMap<String,AbilityMapper.AbilityMapping> subMap=map.get(eachOrAll.toUpperCase().trim());\r\n+\t\tAbilityMapper.AbilityMapping mapped = subMap.get(me.ID().toUpperCase());\r\n+\t\tif(mapped==null)\r\n+\t\t\tmapped=CMLib.ableMapper().makeAbilityMapping(me.ID(),1,me.ID(),0,100,"",true,false, new Vector(),"",null);\r\n+        boolean ok=false;\r\n+        while(!ok)\r\n+        {\r\n+            int showNumber=0;\r\n+            mob.tell("* Ability Mapping for "+me.ID());\r\n+            mapped.qualLevel=prompt(mob,mapped.qualLevel,++showNumber,showFlag,"Qualifying Level: ");\r\n+            mapped.autoGain=prompt(mob,mapped.autoGain,++showNumber,showFlag,"Auto-Gained: ");\r\n+            mapped.defaultProficiency=prompt(mob,mapped.qualLevel,++showNumber,showFlag,"Def. Proficiency: ");\r\n+            mapped.extraMask=prompt(mob,mapped.extraMask,++showNumber,showFlag,"Qualifying Mask (?): ", true, CMLib.masking().maskHelp("\\n\\r", "disallow"));\r\n+            mapped.originalSkillPreReqList=prompt(mob,mapped.extraMask,++showNumber,showFlag,"Required Skills (?): ", true, "Space delimited list of Ability IDs.  " +\r\n+            \t\t"Put a required proficiency level in parenthesis after the Ability ID if desired.  " +\r\n+            \t\t"For example: Skill_Write Skill_Trip Skill_Dirt(25) Hunting");\r\n+            if(showFlag<-900){ ok=true; break;}\r\n+            if(showFlag>0){ showFlag=-1; continue;}\r\n+            showFlag=CMath.s_int(mob.session().prompt("Edit which? ",""));\r\n+            if(showFlag<=0)\r\n+            {\r\n+                showFlag=-1;\r\n+                ok=true;\r\n+            }\r\n+        }\r\n+        return CMLib.ableMapper().makeAbilityMapping(mapped.abilityID,mapped.qualLevel,mapped.abilityID,mapped.defaultProficiency,100,"",mapped.autoGain,false,\r\n+    \t\t     CMParms.parseSpaces(mapped.originalSkillPreReqList.trim(), true), mapped.extraMask,null);\r\n+\t}\r\n }\r\ndiff --git a/com/planet_ink/coffee_mud/Libraries/interfaces/GenericEditor.java b/com/planet_ink/coffee_mud/Libraries/interfaces/GenericEditor.java\nindex b5d2bfcf58..becd1521fb 100644\n--- a/com/planet_ink/coffee_mud/Libraries/interfaces/GenericEditor.java\n+++ b/com/planet_ink/coffee_mud/Libraries/interfaces/GenericEditor.java\n@@ -48,6 +48,7 @@ public interface GenericEditor extends CMLibrary\n     public void modifyGenRace(MOB mob, Race me) throws IOException;\r\n     public void modifyPlayer(MOB mob, MOB me) throws IOException;\r\n     public void modifyGovernment(MOB mob, ClanGovernment me) throws IOException;\r\n+    public AbilityMapper.AbilityMapping modifyAllQualifyEntry(MOB mob, String eachOrAll, Ability me) throws IOException;\r\n     \r\n     public Room changeRoomType(Room R, Room newRoom);\r\n     public void spells(MOB mob, List<Ability> V, int showNumber, int showFlag, boolean inParms) throws IOException;\r\ndiff --git a/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java b/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java\nindex 2b51ffb44b..e66120541d 100644\n--- a/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java\n+++ b/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java\n@@ -88,8 +88,8 @@ public class GrinderAllQualifys\n     \t\t}\r\n \t\t\tcurChkNum++;\r\n     \t}\r\n-    \tnewMap=CMLib.ableMapper(). makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,\r\n-\t\t\t\t\t\t\t\t\t\t\t\t\t  CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);\r\n+    \tnewMap=CMLib.ableMapper().makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,\r\n+\t\t\t\t\t\t\t\t\t     \t\t     CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);\r\n \t\tmap.put(last.toUpperCase().trim(),newMap);\r\n \t\tCMLib.ableMapper().saveAllQualifysFile(allQualMap);\r\n         return "";\r\n', 'commit_subject': '', 'repo_name': 'bozimmerman/CoffeeMud', 'committer': {'name': 'bozimmerman', 'email': 'dc45fe023482b3b890b5e574e53c1d051f45b1ef@zimmers.net', 'time_sec': '1303154354', 'tz_offset': '0', 'date': {'seconds': '1303154354'}}, 'commit_tree': '48d108226159afc77bd31c1f04356d3019993b2b', 'commit_message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@9049 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'language_name': 'Java', 'license': 'apache-2.0', 'hunks': '@@ -88,8 +88,8 @@ public class GrinderAllQualifys\n     \t\t}\r\n \t\t\tcurChkNum++;\r\n     \t}\r\n-    \tnewMap=CMLib.ableMapper(). makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,\r\n-\t\t\t\t\t\t\t\t\t\t\t\t\t  CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);\r\n+    \tnewMap=CMLib.ableMapper().makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,\r\n+\t\t\t\t\t\t\t\t\t     \t\t     CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);\r\n \t\tmap.put(last.toUpperCase().trim(),newMap);\r\n \t\tCMLib.ableMapper().saveAllQualifysFile(allQualMap);\r\n         return "";\r\n', 'addition_count': 2, 'deletion_count': 2, 'src_file': 'a/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java', 'tgt_file': 'b/com/planet_ink/coffee_mud/WebMacros/grinder/GrinderAllQualifys.java', 'file_extension': '.java', 'before_file': 'package com.planet_ink.coffee_mud.WebMacros.grinder;\n\nimport com.planet_ink.coffee_web.interfaces.*;\nimport com.planet_ink.coffee_mud.core.interfaces.*;\nimport com.planet_ink.coffee_mud.core.*;\nimport com.planet_ink.coffee_mud.core.collections.*;\nimport com.planet_ink.coffee_mud.Abilities.interfaces.*;\nimport com.planet_ink.coffee_mud.Areas.interfaces.*;\nimport com.planet_ink.coffee_mud.Behaviors.interfaces.*;\nimport com.planet_ink.coffee_mud.CharClasses.interfaces.*;\nimport com.planet_ink.coffee_mud.Libraries.interfaces.*;\nimport com.planet_ink.coffee_mud.Libraries.interfaces.AbilityMapper.SecretFlag;\nimport com.planet_ink.coffee_mud.Common.interfaces.*;\nimport com.planet_ink.coffee_mud.Common.interfaces.Clan.MemberRecord;\nimport com.planet_ink.coffee_mud.Exits.interfaces.*;\nimport com.planet_ink.coffee_mud.Items.interfaces.*;\nimport com.planet_ink.coffee_mud.Locales.interfaces.*;\nimport com.planet_ink.coffee_mud.MOBS.interfaces.*;\nimport com.planet_ink.coffee_mud.Races.interfaces.*;\nimport com.planet_ink.coffee_mud.WebMacros.StdWebMacro;\n\nimport java.util.*;\n\n/*\n   Copyright 2011-2022 Bo Zimmerman\n\n   Licensed under the Apache License, Version 2.0 (the "License");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n\t   http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an "AS IS" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n*/\npublic class GrinderAllQualifys\n{\n\tpublic String name()\n\t{\n\t\treturn "GrinderAllQualifys";\n\t}\n\n\tpublic String editAllQualify(final HTTPRequest httpReq, final java.util.Map<String,String> parms)\n\t{\n\t\tfinal String last=httpReq.getUrlParameter("ALLQUALID");\n\t\tif((last==null)||(last.length()==0))\n\t\t\treturn " @break@";\n\t\tString which=httpReq.getUrlParameter("ALLQUALWHICH");\n\t\tif(parms.containsKey("WHICH"))\n\t\t\twhich=parms.get("WHICH");\n\t\tif((which==null)||(which.length()==0))\n\t\t\treturn " @break@";\n\t\tfinal Map<String,Map<String,AbilityMapper.AbilityMapping>> allQualMap=CMLib.ableMapper().getAllQualifiesMap(httpReq.getRequestObjects());\n\t\tfinal Map<String,AbilityMapper.AbilityMapping> map=allQualMap.get(which.toUpperCase().trim());\n\t\tif(map==null)\n\t\t\treturn " @break@";\n\n\t\tAbilityMapper.AbilityMapping newMap=map.get(last.toUpperCase().trim());\n\t\tif(newMap==null)\n\t\t{\n\t\t\tnewMap=CMLib.ableMapper().newAbilityMapping().ID(last.toUpperCase().trim());\n\t\t\tnewMap.abilityID(last);\n\t\t\tnewMap.allQualifyFlag(true);\n\t\t}\n\t\tString s;\n\t\ts=httpReq.getUrlParameter("LEVEL");\n\t\tif(s!=null)\n\t\t\tnewMap.qualLevel(CMath.s_int(s));\n\t\ts=httpReq.getUrlParameter("PROF");\n\t\tif(s!=null)\n\t\t\tnewMap.defaultProficiency(CMath.s_int(s));\n\t\ts=httpReq.getUrlParameter("MASK");\n\t\tif(s!=null)\n\t\t\tnewMap.extraMask(s);\n\t\ts=httpReq.getUrlParameter("AUTOGAIN");\n\t\tif(s!=null)\n\t\t\tnewMap.autoGain(s.equalsIgnoreCase("on"));\n\t\tfinal StringBuilder preReqs=new StringBuilder("");\n\t\tint curChkNum=1;\n\t\twhile(httpReq.isUrlParameter("REQABLE"+curChkNum))\n\t\t{\n\t\t\tfinal String curVal=httpReq.getUrlParameter("REQABLE"+curChkNum);\n\t\t\tif(curVal.equals("DEL")||curVal.equals("DELETE")||curVal.trim().length()==0)\n\t\t\t{\n    \t\t}\r\n\t\t\tcurChkNum++;\r\n    \t}\r\n    \tnewMap=CMLib.ableMapper(). makeAbilityMapping(newMap.abilityID,newMap.qualLevel,newMap.abilityID,newMap.defaultProficiency,100,"",newMap.autoGain,false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  CMParms.parseSpaces(preReqs.toString().trim(), true), newMap.extraMask,null);\r\n\t\tmap.put(last.toUpperCase().trim(),newMap);\r\n\t\tCMLib.ableMapper().saveAllQualifysFile(allQualMap);\r\n        return "";\r\n\t\t\t\tpreReqs.append(" ");\n\t\t\t}\n\t\t\tcurChkNum++;\n\t\t}\n\t\tnewMap=CMLib.ableMapper().makeAbilityMapping(newMap.abilityID(),newMap.qualLevel(),newMap.abilityID(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t newMap.defaultProficiency(),100,"",newMap.autoGain(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t SecretFlag.PUBLIC,true,CMParms.parseSpaces(preReqs.toString().trim(), true), \n\t\t\t\t\t\t\t\t\t\t\t\t\t newMap.extraMask(),null);\n\t\tmap.put(last.toUpperCase().trim(),newMap);\n\t\tCMLib.ableMapper().saveAllQualifysFile(allQualMap);\n\t\treturn "";\n\t}\n}\n', 'message': '\n\ngit-svn-id: svn://192.168.1.10/public/CoffeeMud@9049 0d6f1817-ed0e-0410-87c9-987e46238f29\n', 'author_name': 'bozimmerman', 'lang': 'java'}