id
stringlengths 36
36
| text
stringlengths 1
1.25M
|
---|---|
c85778a2-1dbf-497e-89b1-fb7abafd11ac | @java.lang.Override
public com.google.protobuf.Parser<ExecutionStatusResponse> getParserForType() {
return PARSER;
} |
31b4941d-56ea-4ebf-84a6-52ffdc270d8b | public static Stella_Object stringToDemon(String string) {
return (Stella.lookupDemon(string));
} |
5adfc2fc-b0df-448a-a1d6-6a6ec2ccc92e | public void setCustomText80(crmondemand.xml.opportunity.query.QueryType customText80) {
this.customText80 = customText80;
} |
9c8347a3-4527-4e63-9be2-737bba7d6d75 | public boolean hasMaelstrommed() {
return ((bitField2_ & 0x00004000) == 0x00004000);
} |
f45069a6-ae60-49f6-b6dc-fe223af6123a | public crmondemand.xml.contact.query.QueryType getType() {
return this.type;
} |
c5d93f5a-e7b3-4f83-9a0d-10985d0ac2af | public void setCustomObject6Id(crmondemand.xml.customobject3.query.QueryType customObject6Id) {
this.customObject6Id = customObject6Id;
} |
358b2e35-4c46-4be7-9f50-2fc740a1f426 | public void connectFtp() throws Exception {
ftp.setDefaultTimeout(1500);
ftp.connect(hcs.getAddress());
ftp.login(hcs.getUsername(), hcs.getPassword());
int reply = ftp.getReplyCode();
if (FTPReply.isPositiveCompletion(reply)) {
System.out.println("HCS " + hcs.getLabel() + ": Connected successfully");
} else {
System.out.println("HCS " + hcs.getLabel() + ": Connection failed");
ftp.disconnect();
}
} |
1e867109-e029-4ffa-80f4-bae2a5aed2b3 | public boolean validPin(String digit) ; |
63bbbf6a-7f52-4aab-a3f4-51e6be70ee0d | public crmondemand.xml.customobject6.query.QueryType getCertficationType() {
return this.certficationType;
} |
fdc8ab2c-4b17-49cf-b74f-4df49c2d82c7 | public void setCustomText48(java.lang.String customText48) {
this.customText48 = customText48;
} |
65ccbed9-ae9d-4d51-a06b-736385400cd4 | final synchronized boolean registerMerge(MergePolicy.OneMerge merge) throws IOException {
if (merge.registerDone) {
return true;
}
assert merge.segments.size() > 0;
if (stopMerges) {
merge.rateLimiter.setAbort();
throw new MergePolicy.MergeAbortedException("merge is aborted: " + segString(merge.segments));
}
boolean isExternal = false;
for(SegmentCommitInfo info : merge.segments) {
if (mergingSegments.contains(info)) {
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "reject merge " + segString(merge.segments) + ": segment " + segString(info) + " is already marked for merge");
}
return false;
}
if (!segmentInfos.contains(info)) {
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "reject merge " + segString(merge.segments) + ": segment " + segString(info) + " does not exist in live infos");
}
return false;
}
if (info.info.dir != directoryOrig) {
isExternal = true;
}
if (segmentsToMerge.containsKey(info)) {
merge.maxNumSegments = mergeMaxNumSegments;
}
}
ensureValidMerge(merge);
pendingMerges.add(merge);
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "add merge to pendingMerges: " + segString(merge.segments) + " [total " + pendingMerges.size() + " pending]");
}
merge.mergeGen = mergeGen;
merge.isExternal = isExternal;
// OK it does not conflict; now record that this merge
// is running (while synchronized) to avoid race
// condition where two conflicting merges from different
// threads, start
if (infoStream.isEnabled("IW")) {
StringBuilder builder = new StringBuilder("registerMerge merging= [");
for (SegmentCommitInfo info : mergingSegments) {
builder.append(info.info.name).append(", ");
}
builder.append("]");
// don't call mergingSegments.toString() could lead to ConcurrentModException
// since merge updates the segments FieldInfos
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", builder.toString());
}
}
for(SegmentCommitInfo info : merge.segments) {
if (infoStream.isEnabled("IW")) {
infoStream.message("IW", "registerMerge info=" + segString(info));
}
mergingSegments.add(info);
}
assert merge.estimatedMergeBytes == 0;
assert merge.totalMergeBytes == 0;
for(SegmentCommitInfo info : merge.segments) {
if (info.info.maxDoc() > 0) {
final int delCount = numDeletedDocs(info);
assert delCount <= info.info.maxDoc();
final double delRatio = ((double) delCount)/info.info.maxDoc();
merge.estimatedMergeBytes += info.sizeInBytes() * (1.0 - delRatio);
merge.totalMergeBytes += info.sizeInBytes();
}
}
// Merge is now registered
merge.registerDone = true;
return true;
} |
08419c0e-8f06-4ac1-905c-1fa75bbd4527 | public java.lang.String getAccreditationId() {
return this.accreditationId;
} |
016b0a44-9853-4424-8a84-e0828d3a8cde | public void select(){
selected = true;
} |
e654fc13-e452-4bc7-a232-f483ebb8aca5 | public void setCustomObject1Id(java.lang.String customObject1Id) {
this.customObject1Id = customObject1Id;
} |
0a7f0eeb-48b3-4c63-baf4-cab92a9e54a2 | public void setContactAccountName(crmondemand.xml.contact.query.QueryType contactAccountName) {
this.contactAccountName = contactAccountName;
} |
38e14290-96c1-4f64-9770-88b9538966fa | public void setCustomNumber35(java.math.BigDecimal customNumber35) {
this.customNumber35 = customNumber35;
} |
7abf4ba9-1345-48e8-ba72-585ad58ea6c4 | public void setCustomText15(crmondemand.xml.opportunity.query.QueryType customText15) {
this.customText15 = customText15;
} |
49da7a33-0790-4033-98a9-d7cb9a48d459 | public void setCbAvailability(JComboBox cbAvailability) {
this.cbAvailability = cbAvailability;
} |
914ffa8d-794a-4634-9699-cb2ea37d386a | public java.math.BigDecimal getCustomNumber7() {
return this.customNumber7;
} |
b23d3292-295a-4346-8aa1-e24b4de85156 | public crmondemand.xml.customobject6.query.QueryType getCustomBoolean20() {
return this.customBoolean20;
} |
519edefa-2ed3-47ca-803c-f0f1f11ffad9 | public crmondemand.xml.customobject6.query.QueryType getCustomDate0() {
return this.customDate0;
} |
d0fec6b5-4ef6-42b9-85cb-d5dde2088331 | public crmondemand.xml.customobject6.query.QueryType getCustomInteger31() {
return this.customInteger31;
} |
74b5b767-4f9c-415f-92c9-4f56ad3ec7b0 | public java.lang.String getCustomerAddressProvince() {
return this.customerAddressProvince;
} |
916c9ded-7df1-42b5-9fcb-c3e973260507 | public java.lang.Integer getCustomInteger11() {
return this.customInteger11;
} |
f4603d9a-16b2-48b4-b1e3-de96e1c76d62 | public double getPcPeitoral() {
return pcPeitoral;
} |
a3cfbcf1-061e-49be-ac5a-84ad35a48e1b | public String getUrl() {
return url;
} |
05c09a78-cd23-4121-b1c9-22a60c6203e9 | public static String maybeTruncateFilename(String barefilename) {
if (((Boolean)(Stella.$DONTTRUNCATEFILENAMESp$.get())).booleanValue()) {
return (barefilename);
}
{ int maximumlength = 999;
if (Stella.$OS$ == Stella.KWD_MAC) {
maximumlength = 31 - 5;
}
else {
}
if (barefilename.length() > maximumlength) {
{ String originalfilename = barefilename;
barefilename = Native.string_subsequence(barefilename, 0, maximumlength - 1);
{
Stella.STANDARD_WARNING.nativeStream.println("Warning: Truncating name of file.");
Stella.STANDARD_WARNING.nativeStream.println(" Original: `" + originalfilename + "' Truncated: `" + barefilename + "'");
Stella.STANDARD_WARNING.nativeStream.println();
}
;
}
}
return (barefilename);
}
} |
50191f64-fc69-4811-99da-2b3bbb35077c | public void setPaTable(JTable paTable) {
this.paTable = paTable;
} |
686e17c6-321c-4246-87f5-6c23600987ca | public static void print(PrintStream ps, String mess){
ps.print(mess);
} |
2e1f92d0-6f9d-4328-ae30-e2230e8bf010 | public java.lang.String getCustomObject3Id() {
return this.customObject3Id;
} |
73ca05d2-a4ae-4e75-8dca-eb3619e41534 | public crmondemand.xml.customobject6.query.QueryType getCustomPickList0() {
return this.customPickList0;
} |
c868af15-84a5-4155-aee5-d65134d3e6fc | public void setLeadLastName(java.lang.String leadLastName) {
this.leadLastName = leadLastName;
} |
f5ffb9c6-458f-4e59-82c9-10f7e3d29ed1 | public boolean hasIdle() {
return ((bitField2_ & 0x00001000) == 0x00001000);
} |
1a42aa7c-1fa2-46cc-b198-07bd158c0793 | public void setBusinessAccountHolderOwner(crmondemand.xml.contact.query.QueryType businessAccountHolderOwner) {
this.businessAccountHolderOwner = businessAccountHolderOwner;
} |
f3d42cd9-71f1-4254-86fd-e10d8b19da51 | public crmondemand.xml.customobject6.query.QueryType getCustomDate7() {
return this.customDate7;
} |
154c573e-b8b8-48df-bc62-7f9c375abc88 | public java.lang.String getCustomPickList65() {
return this.customPickList65;
} |
7975ee79-69b4-47a1-a662-c51598a0cef8 | public void setObjectiveStatus(crmondemand.xml.contact.query.QueryType objectiveStatus) {
this.objectiveStatus = objectiveStatus;
} |
179b92f6-ce96-4f12-85bd-4c2dbca7bd20 | public crmondemand.xml.customobject3.query.QueryType getCustomPickList54() {
return this.customPickList54;
} |
0cc76dd0-eecf-49db-ac20-d90fa3b93042 | public int curLineLengh() {
return this.lines[this.curLine].length();
} |
8e7b90d3-4673-4da2-b99f-218a8cf4c99f | public java.lang.String getProductPartNumber() {
return this.productPartNumber;
} |
f72bee3e-dfde-40b5-af10-4373e9740334 | public java.util.Calendar getCustomDate49() {
return this.customDate49;
} |
c13054d8-dff8-40e8-b7df-7aacefed8173 | public java.lang.String getCustomText73() {
return this.customText73;
} |
132eb15b-a118-4315-8a0e-92dfe9bc04d9 | public void setCertficationCertificationNum(java.lang.String certficationCertificationNum) {
this.certficationCertificationNum = certficationCertificationNum;
} |
dd1846ed-2160-4fc5-9f1b-7ef1776fb370 | public crmondemand.xml.opportunity.query.QueryType getCustomNumber11() {
return this.customNumber11;
} |
1e4ac73e-4bcb-4de8-8311-c82199a7f07f | public java.lang.String getCustomText81() {
return this.customText81;
} |
3100c11a-f604-4757-ac13-c32d41e5116c | public String getCurrency() {
return currency;
} |
6bcccc71-5a7c-4c3d-a300-f51ef9ad8239 | public java.lang.String getCustomText5() {
return this.customText5;
} |
d2a34988-fc8b-448b-b390-5660712be207 | public crmondemand.xml.customobject6.query.QueryType getCustomInteger22() {
return this.customInteger22;
} |
0f487944-4729-4a2a-924b-9c2f2c9b4de8 | private void ensureKilledUnitCountIsMutable() {
if (!((bitField0_ & 0x00040000) == 0x00040000)) {
killedUnitCount_ = new java.util.ArrayList<org.bwapi.proxy.messages.GameMessages.UnitTypeIntPair>(killedUnitCount_);
bitField0_ |= 0x00040000;
}
} |
1f7da8b9-d3f5-4f30-b934-1e6f3567b6d8 | public void setCustomInteger10(java.lang.Integer customInteger10) {
this.customInteger10 = customInteger10;
} |
81d824f1-42ce-4a92-a500-ebaacde1be9f | public java.lang.String getCustomMultiSelectPickList8() {
return this.customMultiSelectPickList8;
} |
c612e9a3-7d6b-4b7e-b7d0-a04de26022b9 | public java.lang.Boolean getCustomBoolean7() {
return this.customBoolean7;
} |
ca118c56-4659-42a7-b9b9-77f43d1c47c5 | protected XNBColorReader() {
super("Microsoft.Xna.Framework.Content.ColorReader");
} |
82ff4d6c-23da-4bd1-aeed-724b29dc7f3b | public crmondemand.xml.customobject6.query.QueryType getCustomObject1IntegrationId() {
return this.customObject1IntegrationId;
} |
401263ea-1c9c-4079-8c43-2d96d38dea46 | public void setCustomPickList36(java.lang.String customPickList36) {
this.customPickList36 = customPickList36;
} |
8735396f-8dc0-4ec3-9721-2cd6c5379d23 | public void setCustomPickList76(crmondemand.xml.customobject6.query.QueryType customPickList76) {
this.customPickList76 = customPickList76;
} |
22377cab-d406-433c-8c2c-ebc8e8586d01 | public JDialogPieces(java.awt.Frame parent, boolean modal, Vector<Piece> v) {
super(parent, modal);
initComponents();
lesPiece = v;
} |
72e02313-6249-4226-8379-3196620928f4 | public crmondemand.xml.opportunity.query.QueryType getCustomInteger1() {
return this.customInteger1;
} |
35643824-c4a4-47a2-bfdf-012b0fc59e4a | public void test_minusMonths_long_negativeOverYears() {
LocalDate t = this.TEST_2007_07_15.minusMonths(-31);
assertEquals(t, LocalDate.of(2010, 2, 15));
}
@Test(groups = { "tck" } |
53993c06-876f-474b-9d20-64c50690fd5b | public java.lang.String getOpportunityOwner() {
return this.opportunityOwner;
} |
acc6a070-20ce-4b01-973d-6f401d96ee46 | public java.math.BigDecimal getCustomNumber25() {
return this.customNumber25;
} |
e5d6a4c8-b608-4123-bbee-5c5ac346f466 | public void setCertficationCertificationNum(crmondemand.xml.contact.query.QueryType certficationCertificationNum) {
this.certficationCertificationNum = certficationCertificationNum;
} |
27a69d07-7853-4e81-a08b-8239c970c83a | public void setCustomObject1Name(crmondemand.xml.customobject6.query.QueryType customObject1Name) {
this.customObject1Name = customObject1Name;
} |
4cbf0626-fd75-4700-9f10-6c6843a973f5 | public crmondemand.xml.customobject6.query.QueryType getCustomPickList95() {
return this.customPickList95;
} |
33dff293-3e4b-4853-b449-702a9bc0fc3a | public java.lang.String getCustomObject6Name() {
return this.customObject6Name;
} |
5209b5b9-94de-4c49-94d5-80765ac2ed2a | private static double scaleX(double x) { return width * (x - xmin) / (xmax - xmin); } |
038ac45a-5de7-4a5b-ac91-216c483e8a82 | public void setZCustomDate53(java.util.Calendar zCustomDate53) {
this.zCustomDate53 = zCustomDate53;
} |
278abb57-8c64-4f94-a591-f2882f3f83fd | public com.google.protobuf.DescriptorProtos.UninterpretedOption.Builder getUninterpretedOptionBuilder(
int index) {
return getUninterpretedOptionFieldBuilder().getBuilder(index);
} |
293252ec-ece0-4050-9181-99a54476fc96 | public static MapleCharacter getDefault(MapleClient client) {
MapleCharacter ret = new MapleCharacter(false);
ret.client = client;
ret.stats.hp = 50;
ret.stats.mp = 50;
ret.map = null;
ret.stats.str = 69;
ret.stats.dex = 69;
ret.stats.luk = 69;
ret.stats.int_ = 69;
ret.exp = 0;
ret.job = 0;
ret.meso = 2000000000;
ret.level = 30;
ret.accountid = client.getAccID();
ret.buddylist = new BuddyList(200);
ret.cardNX = 0;
ret.maplePoints = 0;
ret.paypalNX = 0;
ret.incs = false;
ret.clonelimit = (byte) 0;
ret.rasengan = 0;
ret.legend = "nub";
ret.pvpdeaths = 0;
ret.pvpkills = 0;
ret.storageAp = 69;
try {
Connection con = DatabaseConnection.getConnection();
PreparedStatement ps;
ps = con.prepareStatement("SELECT * FROM accounts WHERE id = ?");
ps.setInt(1, ret.accountid);
ResultSet rs;
rs = ps.executeQuery();
if (rs.next()) {
ret.getClient().setAccountName(rs.getString("name"));
ret.paypalNX = rs.getInt("paypalNX");
ret.maplePoints = rs.getInt("maplePoints");
ret.cardNX = rs.getInt("cardNX");
ret.gmLevel = rs.getByte("gm");
ret.ninjatensu = rs.getByte("ninjatensu");
ret.dpoints = rs.getShort("dpoints");
ret.damount = rs.getShort("damount");
ret.jqPoints = rs.getShort("jqpoints");
ret.jqFinished = rs.getInt("jqfinished");
ret.footnote = rs.getString("footnote");
ret.village = rs.getByte("village");
}
rs.close();
ps.close();
} catch (SQLException e) {
System.err.println("Error loading account details from DB" + e);
}
ret.stats.recalcLocalStats();
return ret;
} |
784fc6a1-1c50-40c7-96a2-b45654d56001 | public java.lang.String getProductStatus() {
return this.productStatus;
} |
60f81e93-1d1d-41c1-b74b-331f59d86d8f | public java.lang.String getCustomText12() {
return this.customText12;
} |
92f98164-066c-4a8f-8b2f-8ca3638844f6 | public crmondemand.xml.opportunity.query.QueryType getCustomCurrency24() {
return this.customCurrency24;
} |
71c99285-ccb0-4a12-956e-a89e0977ac32 | public JPanel getNewUserPagePanel() {
return newUserPagePanel;
} |
ee4a03af-5427-4359-aaf4-2afa9b6173dd | public java.lang.String getCustomObject3Id() {
return this.customObject3Id;
} |
00d66c05-c46a-4d6f-ab7b-c7ea69aab152 | public void setCustomObject3Name(java.lang.String customObject3Name) {
this.customObject3Name = customObject3Name;
} |
e6334cc6-fd35-45e2-a5a4-c308be9e8823 | public void setUpdatedByEMailAddr(java.lang.String updatedByEMailAddr) {
this.updatedByEMailAddr = updatedByEMailAddr;
} |
cf4925d8-f1ce-4896-b1b9-611f8ac14f87 | public void setCustomPickList41(crmondemand.xml.customobject6.query.QueryType customPickList41) {
this.customPickList41 = customPickList41;
} |
219fa8d8-a1ba-42e2-9f84-2ef152c75455 | public void setFinancialPlanIntegrationId(crmondemand.xml.contact.query.QueryType financialPlanIntegrationId) {
this.financialPlanIntegrationId = financialPlanIntegrationId;
} |
09001ed0-eab8-40e1-ab38-f21466f01345 | public StringBuilder listRaceCats(Session viewerS, Enumeration<Race> these, List<String> commands)
{
final StringBuilder lines=new StringBuilder("");
if(!these.hasMoreElements())
return lines;
boolean shortList=false;
for(String c : commands)
{
if(c.equalsIgnoreCase("SHORT"))
shortList=true;
}
WikiFlag wiki=this.getWikiFlagRemoved(commands);
int column=0;
final Vector<String> raceCats=new Vector<String>();
Race R=null;
final int COL_LEN=CMLib.lister().fixColWidth(25.0,viewerS);
for(final Enumeration<Race> e=these;e.hasMoreElements();)
{
R=e.nextElement();
if(!raceCats.contains(R.racialCategory()))
raceCats.add(R.racialCategory());
}
final Object[] sortedB=(new TreeSet<String>(raceCats)).toArray();
if(shortList)
{
final String[] sortedC=new String[sortedB.length];
for(int i=0;i<sortedB.length;i++)
sortedC[i]=(String)sortedB[i];
lines.append(CMParms.toListString(sortedC));
}
else
if((wiki==WikiFlag.WIKILIST)||(wiki==WikiFlag.WIKIHELP))
{
for (final Object element : sortedB)
{
final String raceCat=(String)element;
lines.append("*[["+raceCat+"(RacialCategory)|"+raceCat+"]]\n\r");
}
}
else
{
for (final Object element : sortedB)
{
final String raceCat=(String)element;
if(++column>3)
{
lines.append("\n\r");
column=1;
}
lines.append(CMStrings.padRight(raceCat,COL_LEN));
}
}
lines.append("\n\r");
return lines;
} |
c6d74e45-2cf6-4cea-ba84-b238bdb7dc18 | public java.lang.String getCustomObject4Name() {
return this.customObject4Name;
} |
f3d40fc6-bb7a-4765-a99b-fd5b0d891278 | public java.lang.String getCustomObject15Name() {
return this.customObject15Name;
} |
9948f3cd-77bf-455b-9633-59d99131ab0e | public void setCustomPickList46(crmondemand.xml.customobject6.query.QueryType customPickList46) {
this.customPickList46 = customPickList46;
} |
47241508-3e15-4401-a22c-f2f653aab322 | public java.lang.String getCustomPickList94() {
return this.customPickList94;
} |
af6f66f0-8f89-4820-a91f-e3a79052e62d | public static boolean containsArmor(Inventory inventory) {
boolean contains = false;
for(ItemStack itemstack : inventory.getContents())
if(isArmor(itemstack))
contains = true;
if(inventory.getType() == InventoryType.PLAYER) {
PlayerInventory playerinventory = (PlayerInventory) inventory;
for(ItemStack itemstack : playerinventory.getArmorContents())
if(isArmor(itemstack))
contains = true;
}
return contains;
} |
daeed1bc-a7a4-4e67-aa0c-6196bdd473e3 | public java.lang.String getCustomPickList30() {
return this.customPickList30;
} |
59819d13-fe51-44fd-a004-3beaa2f0e11c | public crmondemand.xml.customobject6.query.QueryType getCustomNumber31() {
return this.customNumber31;
} |
8acd5d40-6758-470e-b531-4af727fbea3d | public java.math.BigDecimal getCustomCurrency20() {
return this.customCurrency20;
} |
93be3da4-4ec2-408c-aabb-1248825fa8c9 | public crmondemand.xml.customobject6.query.QueryType getCustomText8() {
return this.customText8;
} |
28359ae1-f85e-4a0f-ba99-cbf615653741 | private static Item getItem(String OfThisID,
Session session,
String areaName,
List objectData,
List objProgData,
Map<String,Item> areaItems,
Map<String,Item> doneItems,
Map<String,Room> areaRooms,
Map<String,Room> doneRooms,
boolean compileErrors,
List<Object> commands)
{
if(OfThisID.startsWith("#"))
{
if(areaItems.containsKey(OfThisID.substring(1)))
return (Item)(areaItems.get(OfThisID.substring(1))).copyOf();
if(doneItems.containsKey(OfThisID.substring(1)))
return (Item)(doneItems.get(OfThisID.substring(1))).copyOf();
}
else
{
if(areaItems.containsKey(OfThisID))
return (Item)(areaItems.get(OfThisID)).copyOf();
if(doneItems.containsKey(OfThisID))
return (Item)(doneItems.get(OfThisID)).copyOf();
}
for(int o=0;o<objectData.size();o++)
{
List<String> objV=null;
if(objectData.get(o) instanceof List)
objV=(List)objectData.get(o);
else
if(objectData.get(o) instanceof String)
{
final String s=(String)objectData.get(o);
if((!s.toUpperCase().trim().startsWith("#OBJ"))&&(s.length()>0))
returnAnError(session,"Eating immaterial line: "+objectData.get(o)+", area="+areaName,compileErrors,commands);
continue;
}
else
continue;
final String objectID=eatNextLine(objV);
if(isBadID(objectID))
{
Log.errOut("IMPORT","Eating bad object id "+objectID);
objectData.remove(o);
o--;
continue;
}
if(!objectID.equals(OfThisID))
continue;
final String simpleName=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV));
String objectName=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV));
final String objectDisplay=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV));
String objectDescription="";
if((nextLine(objV).indexOf('~')>=0)||((nextLine(objV).length()>0)&&(!Character.isDigit(nextLine(objV).charAt(0)))))
objectDescription=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV));
String codeStr1=eatNextLine(objV);
String codeStr2=eatNextLine(objV);
String codeStr3=eatNextLine(objV);
if((CMParms.numBits(codeStr1)==1)
&&CMath.isNumber(codeStr1)
&&(CMParms.numBits(codeStr2)==1)
&&CMath.isNumber(codeStr2))
{
//TODO: BZ: Figure out what codeStr1 & 2 are
codeStr1=codeStr3;
codeStr2=eatNextLine(objV);
codeStr3=eatNextLine(objV);
}
if((!objectID.startsWith("#"))
||((objectName.length()==0)
&&((CMParms.numBits(codeStr1)<3)
||(CMParms.numBits(codeStr1)>4)
||(CMParms.numBits(codeStr2)<4)
||(codeStr3.length()==0))))
{
returnAnError(session,"Malformed object! Aborting this object "+objectID+", display="+objectDisplay+", simple="+simpleName+", name="+objectName+", codeStr1="+codeStr1+", codeStr2="+codeStr2+", codeStr3="+codeStr3+", area="+areaName,compileErrors,commands);
continue;
}
if(objectName.length()==0)
objectName="Unknown";
boolean circleForm=false;
final String obj=CMParms.getBit(codeStr1,0);
if((obj.trim().length()>1)&&(Character.isLetter(obj.charAt(0))))
circleForm=true;
int objType=CMath.s_int(obj);
final String[][] itemTypes={
{ "light","1"},
{ "scroll","2"},
{ "wand","3"},
{ "staff","4"},
{ "weapon","5"},
{ "treasure","8"},
{ "armor","9"},
{ "potion","10"},
{ "clothing","11"},
{ "furniture","12"},
{ "trash","13"},
{ "container","15"},
{ "drink","17"},
{ "key","18"},
{ "food","19"},
{ "money","20"},
{ "boat","22"},
{ "npc_corpse","99"},
{ "pc_corpse","99"},
{ "fountain","25"},
{ "pill","26"},
{ "protect",""},
{ "map","28"},
{ "portal","97"},
{ "warp_stone",""},
{ "room_key","98"},
{ "gem",""},
{ "jewelry",""},
{ "jukebox",""},
{ "tattoo",""},
{ "pipe","32"}
};
if(circleForm)
{
if(obj.equalsIgnoreCase("jukebox"))
continue;// NO JUKE BOXES!
for (final String[] itemType : itemTypes)
if(obj.equalsIgnoreCase(itemType[0]))
{
objType=CMath.s_int(itemType[1]);
break;
}
}
final long extraFlag=getBitMask(codeStr1,1);
final long wearFlag=getBitMask(codeStr1,2);
Ability adjuster=CMClass.getAbility("Prop_HaveAdjuster");
switch(objType)
{
case 2:
case 3:
case 4:
case 10:
if((codeStr2.indexOf('`')<=0)
&&(nextLine(objV).indexOf('`')>=0))
codeStr2=eatNextLine(objV);
break;
default:
break;
}
boolean forgiveZeroes=false;
if((codeStr2.indexOf('~')>=0)&&(codeStr2.lastIndexOf('~')>codeStr2.indexOf('~')))
{
final List<String> V=CMParms.parseSquiggles(codeStr2);
if(V.size()==4)
{
forgiveZeroes=true;
codeStr2="'"+(V.get(0))+"' "
+"'"+(V.get(1))+"' "
+"'"+(V.get(2))+"' "
+"'"+(V.get(3))+"'";
}
else
returnAnError(session,"Invalid object codeStr2 line: "+codeStr2+", item not aborted, but stuff will be wrong!",compileErrors,commands);
}
final String str1=CMParms.getBit(codeStr2,0);
final String str2=CMParms.getBit(codeStr2,1);
String str3=CMParms.getBit(codeStr2,2);
final String str4=CMParms.getBit(codeStr2,3);
final int val1=(int)getBitMask(codeStr2,0);
final int val2=(int)getBitMask(codeStr2,1);
final int val3=(int)getBitMask(codeStr2,2);
final int val4=(int)getBitMask(codeStr2,3);
Item I=null;
switch(objType)
{
case 1:
if (objectName.toUpperCase().indexOf("LANTERN") >= 0)
I = CMClass.getBasicItem("GenLantern");
else
I = CMClass.getBasicItem("GenLightSource");
((Light) I).setDuration(val3 * 80);
break;
case 2:
I = CMClass.getMiscMagic("GenScroll");
I.basePhyStats().setLevel(val1);
I.setUsesRemaining(3);
((SpellHolder) I).setSpellList(getSpell(str2, val2) + ";" + getSpell(str3, val3) + ";" + getSpell(str4, val4));
break;
case 3:
I = CMClass.getMiscMagic("GenWand");
I.basePhyStats().setLevel(val1);
I.setUsesRemaining(val2);
((Wand) I).setSpell(CMClass.getAbility(getSpell(str4, val4)));
break;
case 4:
I = CMClass.getWeapon("GenStaff");
I.basePhyStats().setLevel(val1);
I.setUsesRemaining(val2);
((Wand) I).setSpell(CMClass.getAbility(getSpell(str4, val4)));
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 5:
I = CMClass.getWeapon("GenWeapon");
doWeapon((Weapon) I, objectName, val1, str1, val2, val3, val4, str4);
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 6:
I = CMClass.getWeapon("GenWeapon");
doWeapon((Weapon) I, objectName, val1, str1, val2, val3, val4, str4);
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 7:
I = CMClass.getWeapon("GenWeapon");
doWeapon((Weapon) I, objectName, val1, str1, val2, val3, val4, str4);
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 8:
I = CMClass.getBasicItem("GenItem");
break;
case 9:
if (objectName.toUpperCase().indexOf("SHIELD") >= 0)
I = CMClass.getArmor("GenShield");
else
I = CMClass.getArmor("GenArmor");
I.basePhyStats().setArmor((int) Math.round(CMath.div((val1 + val2 + val3 + val4 + 1), 4.0) + 1));
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 10:
I = CMClass.getMiscMagic("GenPotion");
I.basePhyStats().setLevel(val1);
((Potion) I).setSpellList(getSpell(str2, val2) + ";" + getSpell(str3, val3) + ";" + getSpell(str4, val4));
break;
case 11:
I = CMClass.getArmor("GenArmor");
I.basePhyStats().setArmor(0);
adjuster = CMClass.getAbility("Prop_WearAdjuster");
break;
case 12:
I = CMClass.getBasicItem("GenItem");
if (hasReadableContent(objectName))
I = CMClass.getBasicItem("GenReadable");
break;
case 13:
I = CMClass.getBasicItem("GenItem");
if (hasReadableContent(objectName))
I = CMClass.getBasicItem("GenReadable");
break;
case 14:
I = CMClass.getBasicItem("GenItem");
break;
case 15:
if (CMLib.english().containsString(objectName, "belt")
|| CMLib.english().containsString(objectName, "bandolier")
|| CMLib.english().containsString(objectName, "sheath"))
I = CMClass.getArmor("GenArmor");
else
I = CMClass.getBasicItem("GenContainer");
((Container) I).setCapacity(val1);
boolean lid = false;
boolean open = true;
boolean lock = false;
boolean locked = false;
if ((val2 & 1) == 1)
lid = true;
if ((val2 & 2) == 2)
{
lock = true;
locked = true;
open = false;
lid = true;
I.basePhyStats().setLevel(100);
}
if ((val2 & 4) == 4)
{
lid = true;
open = false;
}
if ((val2 & 8) == 8)
{
lock = true;
locked = true;
open = false;
lid = true;
}
((Container) I).setDoorsNLocks(lid, open, !open, lock, locked, locked);
if (((Container) I).hasADoor() && ((Container) I).hasALock())
((Container) I).setKeyName(areaName + "#" + val3);
break;
case 16:
I = CMClass.getBasicItem("GenItem");
break;
case 17:
I = CMClass.getBasicItem("GenDrink");
str3 = str3.toUpperCase().trim();
if (((val3 > 0) && (val3 < 6))
|| (str3.indexOf("BEER") >= 0)
|| (str3.indexOf("ALE") >= 0)
|| (str3.indexOf("BREW") >= 0)
|| (str3.indexOf("WINE") >= 0))
{
((Drink) I).setLiquidType(RawMaterial.RESOURCE_LIQUOR);
I.addEffect(CMClass.getAbility("Poison_Beer"));
((Drink) I).setLiquidHeld(val1 * 10);
((Drink) I).setLiquidRemaining(val2);
}
else
if (str3.indexOf("FIREBREATHER") >= 0)
{
((Drink) I).setLiquidType(RawMaterial.RESOURCE_LIQUOR);
I.addEffect(CMClass.getAbility("Poison_Firebreather"));
((Drink) I).setLiquidHeld(val1 * 10);
((Drink) I).setLiquidRemaining(val2);
}
else
if (str3.indexOf("LOCAL SPECIALTY") >= 0)
{
((Drink) I).setLiquidType(RawMaterial.RESOURCE_LIQUOR);
I.addEffect(CMClass.getAbility("Poison_Liquor"));
((Drink) I).setLiquidHeld(val1 * 10);
((Drink) I).setLiquidRemaining(val2);
}
else
if (str3.indexOf("WHISKEY") >= 0)
{
((Drink) I).setLiquidType(RawMaterial.RESOURCE_LIQUOR);
I.addEffect(CMClass.getAbility("Poison_Liquor"));
((Drink) I).setLiquidHeld(val1 * 10);
((Drink) I).setLiquidRemaining(val2);
}
else
if ((val4 > 0) || (str3.indexOf("POISON") >= 0))
{
((Drink) I).setLiquidType(RawMaterial.RESOURCE_POISON);
I.addEffect(CMClass.getAbility("Poison"));
((Drink) I).setLiquidHeld(val1 * 10);
((Drink) I).setLiquidRemaining(val2);
}
else
{
((Drink) I).setLiquidHeld(val1 * 30);
((Drink) I).setLiquidRemaining(val2 * 10);
}
break;
case 18:
I = CMClass.getBasicItem("GenKey");
((DoorKey) I).setKey(areaName + objectID);
break;
case 19:
I = CMClass.getBasicItem("GenFood");
if (val4 > 0)
{
I = CMClass.getMiscMagic("GenPill");
((Pill) I).setSpellList("Poison;");
}
((Food) I).setNourishment(20 * val1);
break;
case 20:
I = CMClass.getBasicItem("StdCoins");
((Coins) I).setNumberOfCoins(val1);
((Coins) I).setDenomination(1.0);
((Coins) I).setCurrency("");
break;
case 21:
I = CMClass.getBasicItem("GenItem");
break;
case 22:
I = CMClass.getBasicItem("GenBoat");
break;
case 23:
I = CMClass.getBasicItem("GenCorpse");
break;
case 24:
I = CMClass.getBasicItem("GenCorpse");
break;
case 25:
I = CMClass.getBasicItem("GenWater");
CMLib.flags().setGettable(I, false);
((Drink) I).setLiquidHeld(Integer.MAX_VALUE - 5000);
((Drink) I).setLiquidRemaining(((Drink) I).liquidHeld());
break;
case 26:
I = CMClass.getMiscMagic("GenPill");
I.basePhyStats().setLevel(val1);
((Pill) I).setSpellList(getSpell(str2, val2) + ";" + getSpell(str3, val3) + ";" + getSpell(str4, val4));
break;
case 27:
I = CMClass.getBasicItem("GenItem");
break;
case 28:
I = CMClass.getBasicItem("GenReadable"); // don't use GemMaps
// any more...
break;
case 29:
I = CMClass.getBasicItem("GenItem");
break;
case 97:
I = CMClass.getBasicItem("GenPortal");
if ((str4.length() > 0) && (!str4.equals("0")))
{
Room R = getRoom(areaRooms, doneRooms, areaName, str4);
if (R != null)
I.setReadableText(R.roomID());
else
{
for (final Enumeration<Room> e = CMLib.map().rooms(); e.hasMoreElements();)
{
R = e.nextElement();
if (R.roomID().endsWith("#" + str4))
{
I.setReadableText(R.roomID());
break;
}
}
}
if (I.readableText().length() == 0)
I.setReadableText("#" + str4);
}
break;
case 98:
I = CMClass.getBasicItem("GenKey");
((DoorKey) I).setKey(areaName + objectID);
break;
case 99:
I = CMClass.getBasicItem("GenCorpse");
break;
case -1:
I = CMClass.getBasicItem("GenWallpaper");
break;
default:
I = CMClass.getBasicItem("GenItem");
break;
}
if(!CMath.isSet(wearFlag,0))
CMLib.flags().setGettable(I,false);
if(CMath.isSet(wearFlag,1))
I.setRawProperLocationBitmap(Wearable.WORN_LEFT_FINGER|Wearable.WORN_RIGHT_FINGER|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,2))
I.setRawProperLocationBitmap(Wearable.WORN_NECK|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,3))
I.setRawProperLocationBitmap(Wearable.WORN_TORSO|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,4))
I.setRawProperLocationBitmap(Wearable.WORN_HEAD|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,5))
I.setRawProperLocationBitmap(Wearable.WORN_LEGS|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,6))
I.setRawProperLocationBitmap(Wearable.WORN_FEET|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,7))
I.setRawProperLocationBitmap(Wearable.WORN_HANDS|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,8))
I.setRawProperLocationBitmap(Wearable.WORN_ARMS|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,9))
I.setRawProperLocationBitmap(Wearable.WORN_HELD|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,10))
I.setRawProperLocationBitmap(Wearable.WORN_ABOUT_BODY|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,11))
I.setRawProperLocationBitmap(Wearable.WORN_WAIST|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,12))
I.setRawProperLocationBitmap(Wearable.WORN_LEFT_WRIST|Wearable.WORN_RIGHT_WRIST|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,13))
I.setRawProperLocationBitmap(Wearable.WORN_WIELD|Wearable.WORN_HELD|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,14))
I.setRawProperLocationBitmap(Wearable.WORN_HELD|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,15))
I.setRawLogicalAnd(true);
if(CMath.isSet(wearFlag,17))
I.setRawProperLocationBitmap(Wearable.WORN_EARS|I.rawProperLocationBitmap());
if(CMath.isSet(wearFlag,18)) // ankles
I.setRawProperLocationBitmap(Wearable.WORN_FEET|I.rawProperLocationBitmap());
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// the relation of this stuff is vital! must follow properlocation setting
// and the getttable setting ONLY!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if((adjuster.ID().equals("Prop_HaveAdjuster"))
&&(I.rawProperLocationBitmap()>0)
)
{
adjuster=CMClass.getAbility("Prop_WearAdjuster");
if(I.ID().equals("GenItem"))
{
final long wear=I.rawProperLocationBitmap();
final boolean bool=I.rawLogicalAnd();
final boolean gettable=CMLib.flags().isGettable(I);
I=CMClass.getArmor("GenArmor");
I.setRawProperLocationBitmap(wear);
I.setRawLogicalAnd(bool);
I.basePhyStats().setArmor(0);
CMLib.flags().setGettable(I,gettable);
}
}
Ability resister=CMClass.getAbility("Prop_HaveResister");
Ability caster=CMClass.getAbility("Prop_HaveSpellCast");
if(adjuster.ID().equals("Prop_WearAdjuster"))
{
resister=CMClass.getAbility("Prop_WearResister");
caster=CMClass.getAbility("Prop_WearSpellCast");
}
if(CMParms.numBits(codeStr3)>2)
{
final int level=CMath.s_int(CMParms.getCleanBit(codeStr3,0).trim());
I.basePhyStats().setLevel(level);
I.basePhyStats().setWeight(CMath.s_int(CMParms.getCleanBit(codeStr3,1).trim()) / 10);
if(I.basePhyStats().weight()<1)
I.basePhyStats().setWeight(1);
if(I instanceof Rideable)
I.basePhyStats().setWeight(CMath.s_int(CMParms.getCleanBit(codeStr3,1).trim()) * 10);
I.setBaseValue(CMath.s_int(CMParms.getCleanBit(codeStr3,2).trim()));
}
else
{
final int level=CMath.s_int(codeStr3);
I.basePhyStats().setLevel(level);
}
I.setName(objectName);
I.setDisplayText(objectDisplay);
if(!objectDescription.trim().equalsIgnoreCase("OLDSTYLE"))
I.setDescription(objectDescription);
if((I instanceof Weapon)
&&((objectName.toUpperCase().indexOf("TWO-HANDED")>=0)
||(objectName.toUpperCase().indexOf("TWO HANDED")>=0)))
{
I.setRawLogicalAnd(true);
I.setRawProperLocationBitmap(Wearable.WORN_HELD|I.rawProperLocationBitmap());
}
boolean materialchange=false;
for (final String[] objDesc : objDescs)
{
if(objectDescription.equalsIgnoreCase(objDesc[0]))
{
I.setMaterial(CMath.s_int(objDesc[1]));
materialchange=true;
break;
}
}
// correction for certain rings
if((((I.material()&RawMaterial.MATERIAL_MASK)==RawMaterial.MATERIAL_CLOTH)
||((I.material()&RawMaterial.MATERIAL_MASK)==RawMaterial.MATERIAL_PAPER))
&&(I.fitsOn(Wearable.WORN_LEFT_FINGER)))
{
I.setMaterial(RawMaterial.RESOURCE_SILVER);
materialchange=true;
}
if(materialchange)
I.setDescription("");
if((I instanceof Container)&&(((Container)I).containTypes()==Container.CONTAIN_ANYTHING))
{
if(CMLib.english().containsString(objectName,"belt")
||CMLib.english().containsString(objectName,"bandolier")
||CMLib.english().containsString(objectName,"sheath"))
{
((Container)I).setContainTypes(Container.CONTAIN_ONEHANDWEAPONS);
if(((Container)I).capacity()-I.basePhyStats().weight()<30)
((Container)I).setCapacity(I.basePhyStats().weight()+30);
}
else
if(CMLib.english().containsString(objectName,"boot")
||CMLib.english().containsString(objectName,"bracer")
||CMLib.english().containsString(objectName,"sheath"))
{
((Container)I).setContainTypes(Container.CONTAIN_DAGGERS);
if(((Container)I).capacity()-I.basePhyStats().weight()<10)
((Container)I).setCapacity(I.basePhyStats().weight()+10);
}
}
if(CMath.isSet(extraFlag,0))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_GLOWING);
//if((extraFlag&2)==2) coffeemud has no hummers
if(CMath.isSet(extraFlag,2))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_DARK);
if(CMath.isSet(extraFlag,4))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_EVIL);
if(CMath.isSet(extraFlag,5))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_INVISIBLE);
if(CMath.isSet(extraFlag,6))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_BONUS);
if(CMath.isSet(extraFlag,7))
CMLib.flags().setDroppable(I,false);
if(CMath.isSet(extraFlag,8))
I.addNonUninvokableEffect(CMClass.getAbility("Prayer_Bless"));
final Ability prop_WearZapper = CMClass.getAbility("Prop_WearZapper");
if(CMath.isSet(extraFlag,9))
prop_WearZapper.setMiscText(prop_WearZapper.text()+" -good");
if(CMath.isSet(extraFlag,10))
prop_WearZapper.setMiscText(prop_WearZapper.text()+" -evil");
if(CMath.isSet(extraFlag,11))
prop_WearZapper.setMiscText(prop_WearZapper.text()+" -neutral");
if(prop_WearZapper.text().length()>0)
I.addNonUninvokableEffect(prop_WearZapper);
if(CMath.isSet(extraFlag,12))
CMLib.flags().setRemovable(I,false);
//if(extraFlag&4096)==4096) coffeemud doesn't support rotting cargo
if(CMath.isSet(extraFlag,14))
CMLib.flags().setGettable(I,false);
//if(extraFlag&16384)==16384) coffeemud doesn't support rotting cargo
if(CMath.isSet(extraFlag,16))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_INVISIBLE);
if(CMath.isSet(extraFlag,17))
I.basePhyStats().setDisposition(I.basePhyStats().disposition()|PhyStats.IS_GOOD);
if(CMath.isSet(extraFlag,18))
if((I.material()&RawMaterial.MATERIAL_MASK)==RawMaterial.MATERIAL_METAL)
I.setMaterial(RawMaterial.RESOURCE_GLASS);
if(CMath.isSet(extraFlag,20))
I.basePhyStats().setSensesMask(I.basePhyStats().sensesMask()|PhyStats.SENSE_UNLOCATABLE);
//if(CMath.isSet(extraFlag,22))
//nothing is unidentifiable
// now all those funny tags
while(objV.size()>0)
{
String codeLine=nextLine(objV).trim().toUpperCase();
if(codeLine.equals("E"))
{
eatNextLine(objV);
if((CMClass.getItem(I.ID())!=null)
&&(I.description().equals(CMClass.getItem(I.ID()).description())))
I.setDescription("");
else
if(I.description().length()>0)
I.setDescription((I.description()+"%0D"));
eatLineSquiggle(objV);
boolean squiggleFound=false;
for(int y=0;y<objV.size();y++)
{
final String ts=objV.get(y);
if(ts.indexOf('~')>=0)
{
squiggleFound=true;
break;
}
if(ts.equals("A")
||ts.equals("E")
||ts.equals("L")
||ts.equals("F"))
{
objV.add(y,"~");
squiggleFound=true;
break;
}
}
if(!squiggleFound)
objV.add("~");
final String desc=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV));
I.setDescription(I.description()+desc);
if(I.ID().equals("GenReadable"))
I.setReadableText(fixReadableContent(I.description()));
}
else
if(codeLine.equals("L"))
{
eatNextLine(objV);
// need to figure this one out.
eatLine(objV);
}
else
if(codeLine.startsWith("X "))
{
codeLine=eatLineSquiggle(objV);
Behavior B=I.fetchBehavior("Sounder");
if(B==null)
{
B=CMClass.getBehavior("Sounder");
if(B!=null)
I.addBehavior(B);
}
// no else please
if(B!=null)
{
if(B.getParms().length()==0)
B.setParms(codeLine.substring(1).trim());
else
B.setParms(B.getParms()+";"+codeLine.substring(1).trim());
}
}
else
if(codeLine.equals("A"))
{
eatNextLine(objV);
final String codesLine=eatNextLine(objV);
if(CMParms.numBits(codesLine)!=2)
returnAnError(session,"Malformed 'A' code for item "+objectID+", "+I.Name()+": "+codesLine+", area="+areaName,compileErrors,commands);
else
applyItemApplyCode(codesLine,I, adjuster, caster, resister);
}
else
if(codeLine.equals("F"))
{
eatNextLine(objV);
final String codesLine=eatNextLine(objV);
if(CMParms.numBits(codesLine)!=4)
returnAnError(session,"Malformed 'F' code for item "+objectID+", "+I.Name()+": "+codesLine+", area="+areaName,compileErrors,commands);
else
{
final String codeType=CMParms.getBit(codesLine,0);
if(codeType.equals("V"))
{
final long res=getBitMask(codesLine,3);
final long imm=getBitMask(codesLine,3);
final String[] resistances={
" teleport",
" mind",
" magic",
" weapons",
" blunt",
" pierce",
" slash",
" fire",
" cold",
" elec",
" acid",
" poison",
" evil",
" holy",
"",
" mind",
" disease",
" gas"};
for(int rei=0;rei<resistances.length;rei++)
{
if((CMath.isSet(res,rei))&&(resistances[rei].length()>0))
resister.setMiscText(resister.text()+resistances[rei]+" -25%");
else
if((CMath.isSet(imm,rei))&&(resistances[rei].length()>0))
resister.setMiscText(resister.text()+resistances[rei]+" -100%");
}
}
else
if(codeType.equals("A"))
{
int dis=0;
int sense=0;
final long codeBits=getBitMask(codesLine,3);
if(CMath.isSet(codeBits,0))
sense=sense|PhyStats.CAN_NOT_SEE;
if(CMath.isSet(codeBits,1))
dis=dis|PhyStats.IS_INVISIBLE;
if(CMath.isSet(codeBits,2))
sense=sense|PhyStats.CAN_SEE_EVIL;
if(CMath.isSet(codeBits,3))
sense=sense|PhyStats.CAN_SEE_INVISIBLE;
if(CMath.isSet(codeBits,4))
sense=sense|PhyStats.CAN_SEE_BONUS;
if(CMath.isSet(codeBits,5))
sense=sense|PhyStats.CAN_SEE_HIDDEN|PhyStats.CAN_SEE_SNEAKERS;
if(CMath.isSet(codeBits,6))
caster.setMiscText(caster.text()+("Spell_IronGrip")+";");
if(CMath.isSet(codeBits,7))
caster.setMiscText(caster.text()+("Prayer_Sanctuary")+";");
if(CMath.isSet(codeBits,8))
caster.setMiscText(caster.text()+("Spell_FaerieFire")+";");
if(CMath.isSet(codeBits,9))
sense=sense|PhyStats.CAN_SEE_INFRARED;
if(CMath.isSet(codeBits,10))
caster.setMiscText(caster.text()+("Prayer_Curse")+";");
if(CMath.isSet(codeBits,11))
caster.setMiscText(caster.text()+"Specialization_Weapon;");
if(CMath.isSet(codeBits,12))
caster.setMiscText(caster.text()+("Poison")+";");
if(CMath.isSet(codeBits,13))
caster.setMiscText(caster.text()+("Prayer_ProtEvil")+";");
if(CMath.isSet(codeBits,14))
caster.setMiscText(caster.text()+("Prayer_ProtGood")+";");
if(CMath.isSet(codeBits,15))
dis=dis|PhyStats.IS_SNEAKING;
if(CMath.isSet(codeBits,16))
caster.setMiscText(caster.text()+("Skill_Hide")+";");
if(CMath.isSet(codeBits,17))
{
dis=dis|PhyStats.IS_SLEEPING;
caster.setMiscText(caster.text()+("Spell_Sleep")+";");
}
//if(CMath.isSet(codeBits,18)) item cannot charm you
// caster.setMiscText(caster.text()+(new Poison().ID())+";");
if(CMath.isSet(codeBits,19))
dis=dis|PhyStats.IS_FLYING;
if(CMath.isSet(codeBits,20))
caster.setMiscText(caster.text()+("Spell_PassDoor")+";");
if(CMath.isSet(codeBits,21))
caster.setMiscText(caster.text()+("Spell_Haste")+";");
if(CMath.isSet(codeBits,22))
caster.setMiscText(caster.text()+("Prayer_Calm")+";");
if(CMath.isSet(codeBits,23))
caster.setMiscText(caster.text()+("Prayer_Plague")+";");
if(CMath.isSet(codeBits,24))
caster.setMiscText(caster.text()+("Spell_Awe")+";");
if(CMath.isSet(codeBits,25))
sense=sense|PhyStats.CAN_SEE_DARK;
if(CMath.isSet(codeBits,26))
caster.setMiscText(caster.text()+("Fighter_Berzerk")+";");
if(CMath.isSet(codeBits,27))
caster.setMiscText(caster.text()+("Regeneration")+";");
if(CMath.isSet(codeBits,28))
sense=sense|PhyStats.CAN_SEE_GOOD;
if(CMath.isSet(codeBits,29))
caster.setMiscText(caster.text()+("Spell_Slow")+";");
if(sense>0)
adjuster.setMiscText(adjuster.text()+" sen+"+sense);
if(dis>0)
adjuster.setMiscText(adjuster.text()+" dis+"+dis);
}
else
{
final long res=getBitMask(codesLine,3);
final long imm=getBitMask(codesLine,3);
final String[] resistances={
" teleport",
" mind",
" magic",
" weapons",
" blunt",
" pierce",
" slash",
" fire",
" cold",
" elec",
" acid",
" poison",
" evil",
" holy",
"",
" mind",
" disease",
" gas"};
for(int rei=0;rei<resistances.length;rei++)
{
if((CMath.isSet(res,rei))&&(resistances[rei].length()>0))
resister.setMiscText(resister.text()+resistances[rei]+" 25%");
else
if((CMath.isSet(imm,rei))&&(resistances[rei].length()>0))
resister.setMiscText(resister.text()+resistances[rei]+" 100%");
}
if(CMath.isSet(res,14))
caster.setMiscText(caster.text()+"Spell_ResistMagicMissiles;");
//if(CMath.isSet(res,18)) no light resistance
//if(CMath.isSet(res,18)) no sound resistance
}
}
}
else
if(codeLine.startsWith(">"))
{
codeLine=eatLineSquiggle(objV);
String scriptStuff="";
if(!codeLine.substring(1).trim().toUpperCase().startsWith("IN_FILE_PROG"))
{
scriptStuff+=codeLine.substring(1).trim()+";";
codeLine=nextLine(objV);
while(codeLine.indexOf('~')<0)
{
scriptStuff+=codeLine.trim()+";";
eatLine(objV);
codeLine=nextLine(objV);
}
codeLine=eatLineSquiggle(objV).trim();
scriptStuff+=codeLine+"~";
}
codeLine=scriptStuff;
// nothing done with the script. :(
}
else
if(codeLine.equals("|"))
{
eatNextLine(objV);
// have no idea, but we skip it
}
else
if((forgiveZeroes)
&&(codeLine.length()>0)
&&(CMath.isNumber(""+codeLine.charAt(0)))
&&(CMParms.numBits(codeLine)>1))
{
eatNextLine(objV);
// eos support
}
else
if((forgiveZeroes)
&&(codeLine.endsWith("~")))
{
eatNextLine(objV);
// eos support
}
else
if((codeLine.startsWith("#"))||(codeLine.length()==0))
{
eatNextLine(objV);
}
else
if(codeLine.equals("EXTRA"))
{
eatNextLine(objV); // extra
eatLineSquiggle(objV); // key word
final String desc=CMLib.coffeeFilter().safetyFilter(eatLineSquiggle(objV)); // description
I.setDescription(I.description()+desc);
if(I.ID().equals("GenReadable"))
I.setReadableText(fixReadableContent(I.description()));
}
else
if(codeLine.equals("APPLY"))
{
eatNextLine(objV); // apply
final String codesLine = eatNextLine(objV);
if(CMParms.numBits(codesLine)!=2)
returnAnError(session,"Malformed 'A' code for item "+objectID+", "+I.Name()+": "+codesLine+", area="+areaName,compileErrors,commands);
else
applyItemApplyCode(codesLine,I, adjuster, caster, resister);
}
else
if(codeLine.startsWith("A "))
{
eatNextLine(objV); // apply
final String codesLine = codeLine.substring(2).trim();
if(CMParms.numBits(codesLine)!=2)
returnAnError(session,"Malformed 'A' code for item "+objectID+", "+I.Name()+": "+codesLine+", area="+areaName,compileErrors,commands);
else
applyItemApplyCode(codesLine,I, adjuster, caster, resister);
}
else
{
eatNextLine(objV);
returnAnError(session,"Unknown code for item "+objectID+", "+I.Name()+": "+codeLine+", area="+areaName,compileErrors,commands);
}
}
if(adjuster.text().length()>0)
I.addNonUninvokableEffect(adjuster);
if(caster.text().length()>0)
I.addNonUninvokableEffect(caster);
if(resister.text().length()>0)
I.addNonUninvokableEffect(resister);
I.recoverPhyStats();
I.text();
I.recoverPhyStats();
if(OfThisID.startsWith("#"))
{
areaItems.put(OfThisID.substring(1),I);
doneItems.put(OfThisID.substring(1),I);
}
else
{
areaItems.put(OfThisID,I);
doneItems.put(OfThisID,I);
}
return I;
}
return null;
} |
987587b2-5d59-45fd-82dd-f15da39af6d0 | public crmondemand.xml.customobject6.query.QueryType getCustomDate25() {
return this.customDate25;
} |
41e20479-ec12-4730-b7c8-01c19ad30981 | public void setInvtPeriodExternalSystemId(crmondemand.xml.contact.query.QueryType invtPeriodExternalSystemId) {
this.invtPeriodExternalSystemId = invtPeriodExternalSystemId;
} |
5080cc81-d182-4445-8eb4-04f665202ed3 | public void setUpdatedByFullName(java.lang.String updatedByFullName) {
this.updatedByFullName = updatedByFullName;
} |
dbd3af6c-f55b-4031-98df-5e8b26e3c4bb | public void setIndexedPick1(java.lang.String indexedPick1) {
this.indexedPick1 = indexedPick1;
} |
8789e806-5431-4b6b-a646-22f69ff5f2fa | public static byte[] updateQuest(MapleQuestStatus quest) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
mplew.write(1);
mplew.writeShort(quest.getQuest().getId());
mplew.write(quest.getStatus());
switch (quest.getStatus()) {
case 0:
mplew.write(0);
break;
case 1:
mplew.writeMapleAsciiString(quest.getCustomData() != null ? quest.getCustomData() : "");
break;
case 2:
mplew.writeLong(PacketHelper.getTime(System.currentTimeMillis()));
}
return mplew.getPacket();
} |
af470a0f-63fe-4ac0-a6a6-a8cb6391cade | public crmondemand.xml.customobject6.query.QueryType getHouseholdExternalSystemId() {
return this.householdExternalSystemId;
} |
2ffba73b-e929-4f45-83c9-6c580b3c8e2a | public crmondemand.xml.customobject3.query.QueryType getCustomDate30() {
return this.customDate30;
} |
8f177ed5-b226-4027-a25f-f895a4100d0a | public crmondemand.xml.customobject6.query.QueryType getCustomPickList41() {
return this.customPickList41;
} |
95dd2e39-ac7e-4e02-9c20-5679c33032e9 | public crmondemand.xml.customobject6.query.QueryType getCustomPickList22() {
return this.customPickList22;
} |
b5e81cc9-ea7c-4b2a-94c0-edfd75ebfd99 | public crmondemand.xml.contact.query.QueryType getCustomText40() {
return this.customText40;
} |
247e148b-16e4-4a39-9340-8c6f85524df6 | public void setCustomText60(crmondemand.xml.customobject6.query.QueryType customText60) {
this.customText60 = customText60;
} |