mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-06 21:12:59 -04:00
Merge remote-tracking branch 'origin/master' into Wave_Collections
This commit is contained in:
@@ -71,7 +71,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* @see datatables/collection/collections.iff
|
||||
*
|
||||
* Count and exploration count badges are added automatically.
|
||||
@@ -185,17 +185,17 @@ public class CollectionService implements INetworkDispatch {
|
||||
((String) collectionTable.getObject(c, 32))
|
||||
};
|
||||
|
||||
if (bookName == "") {
|
||||
if (bookName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (pageName == "") {
|
||||
if (pageName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collectionName == "") {
|
||||
if (collectionName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection");
|
||||
throw new Exception();
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
}
|
||||
} else {
|
||||
if (numAltTitles > 0 || alternateTitles.length > 0) {
|
||||
System.out.println(slotName + ": slot " + slotName + " cannot have any alternative titles unless it is defined as \"titleable\"");
|
||||
//System.out.println(slotName + ": slot " + slotName + " cannot have any alternative titles unless it is defined as \"titleable\"");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* @param creature The player's CreatureObject instance.
|
||||
* @param collection slotName or collectionName from collection.iff.
|
||||
*
|
||||
@@ -460,30 +460,30 @@ public class CollectionService implements INetworkDispatch {
|
||||
if (slotName.equals(collection)) {
|
||||
int beginSlotId = ((Integer) collectionTable.getObject(c, 4));
|
||||
|
||||
if (bookName == "") {
|
||||
if (bookName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (pageName == "") {
|
||||
if (pageName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collectionName == "") {
|
||||
if (collectionName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collection == bookName) {
|
||||
if (collection.equals(bookName)) {
|
||||
System.out.println("Checking if a book is complete is unsupported at this time.");
|
||||
throw new Exception();
|
||||
} else if (collection == pageName) {
|
||||
} else if (collection.equals(pageName)) {
|
||||
System.out.println("Checking if a page is complete is unsupported at this time.");
|
||||
throw new Exception();
|
||||
} else if (collection == collectionName) {
|
||||
} else if (collection.equals(collectionName)) {
|
||||
return collections.get(beginSlotId);
|
||||
} else if (collection == slotName) {
|
||||
} else if (collection.equals(slotName)) {
|
||||
return collections.get(beginSlotId);
|
||||
}
|
||||
}
|
||||
@@ -497,7 +497,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Returns number of completed bits in a slot or the number of completed
|
||||
* slots in a collection, page or book.
|
||||
*
|
||||
@@ -545,34 +545,34 @@ public class CollectionService implements INetworkDispatch {
|
||||
int maxSlotValue = ((Integer) collectionTable.getObject(c, 6));
|
||||
int bits = 0;
|
||||
|
||||
if (bookName == "") {
|
||||
if (bookName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (pageName == "") {
|
||||
if (pageName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collectionName == "") {
|
||||
if (collectionName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collection == bookName) {
|
||||
if (collection.equals(bookName)) {
|
||||
found += getCollection(creature, pageName);
|
||||
continue;
|
||||
} else if (collection == pageName) {
|
||||
} else if (collection.equals(pageName)) {
|
||||
found += getCollection(creature, collectionName);
|
||||
continue;
|
||||
} else if (collection == collectionName) {
|
||||
} else if (collection.equals(collectionName)) {
|
||||
if (collections.get(beginSlotId)) {
|
||||
found++;
|
||||
}
|
||||
|
||||
continue;
|
||||
} else if (collection == slotName) {
|
||||
} else if (collection.equals(slotName)) {
|
||||
if (endSlotId != -1) {
|
||||
if (beginSlotId >= endSlotId) {
|
||||
System.out.println(slotName + ", row " + c + ": begin slot id " + beginSlotId + " must be < end slot id" + endSlotId);
|
||||
@@ -623,7 +623,8 @@ public class CollectionService implements INetworkDispatch {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
/**
|
||||
* Registers an exploration badge location.
|
||||
*
|
||||
* @param planet Name from Planet.getName().
|
||||
@@ -640,7 +641,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
explorationLocations.get(planet).put(badgeName, new ExplorationRegion(new Point3D(x, 0, z), range));
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Checks if the player is in range of any exploration regions
|
||||
* and grants any ungranted badges.
|
||||
*
|
||||
@@ -660,7 +661,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Clears the specified slot, collection, page or book.
|
||||
*
|
||||
* @param creature The player's CreatureObject instance.
|
||||
@@ -705,23 +706,23 @@ public class CollectionService implements INetworkDispatch {
|
||||
int beginSlotId = ((Integer) collectionTable.getObject(c, 4));
|
||||
int endSlotId = ((Integer) collectionTable.getObject(c, 5));
|
||||
|
||||
if (bookName == "") {
|
||||
if (bookName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (pageName == "") {
|
||||
if (pageName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collectionName == "") {
|
||||
if (collectionName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collection == bookName || collection == pageName ||
|
||||
collection == collectionName || collection == slotName) {
|
||||
if (collection.equals(bookName) || collection.equals(pageName) ||
|
||||
collection.equals(collectionName) || collection.equals(slotName)) {
|
||||
found = true;
|
||||
|
||||
if (collections.get(beginSlotId, endSlotId + 1).cardinality() > 0) {
|
||||
@@ -749,7 +750,7 @@ public class CollectionService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Clears all collections.
|
||||
*
|
||||
* This must cycle through all the collections because
|
||||
@@ -794,17 +795,17 @@ public class CollectionService implements INetworkDispatch {
|
||||
int beginSlotId = ((Integer) collectionTable.getObject(c, 4));
|
||||
int endSlotId = ((Integer) collectionTable.getObject(c, 5));
|
||||
|
||||
if (bookName == "") {
|
||||
if (bookName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a book");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (pageName == "") {
|
||||
if (pageName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a page");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
if (collectionName == "") {
|
||||
if (collectionName.equals("")) {
|
||||
System.out.println(slotName + ", row " + c + ": slot " + slotName + " must be in a collection");
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user