The great MCPQ Merge offensive
Fulfilled the lovely pull request #427 from @dragoso, which added in backing code content to HeavenMS. Implemented structural changes for the Marriage wishlist, in order to receive, maintain and distribute gifts to spouses. Added untradeable check on wishlist gift handler. Adjusted CPQ drops to actually load from DB rathe than hard-coded. Fixed CPQ "random disease to player/party" functionality not applying properly. Adjusted how CPQ maps are generated. It directly loads a new area from WZ (this process should at least removes the player's spawned mobs) rather than reset the cache at every MCPQ creation.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
package client;
|
||||
|
||||
import tools.Randomizer;
|
||||
import constants.GameConstants;
|
||||
|
||||
public enum MapleDisease {
|
||||
NULL(0x0),
|
||||
@@ -39,16 +39,20 @@ public enum MapleDisease {
|
||||
|
||||
private long i;
|
||||
private boolean first;
|
||||
private int disease;
|
||||
private int mobskill;
|
||||
|
||||
private MapleDisease(long i) {
|
||||
this.i = i;
|
||||
this.first = false;
|
||||
this(i, false, 0);
|
||||
}
|
||||
|
||||
private MapleDisease(long i, int disease) {
|
||||
private MapleDisease(long i, int skill) {
|
||||
this(i, false, skill);
|
||||
}
|
||||
|
||||
private MapleDisease(long i, boolean first, int skill) {
|
||||
this.i = i;
|
||||
this.disease = disease;
|
||||
this.first = first;
|
||||
this.mobskill = skill;
|
||||
}
|
||||
|
||||
public long getValue() {
|
||||
@@ -56,11 +60,11 @@ public enum MapleDisease {
|
||||
}
|
||||
|
||||
public boolean isFirst() {
|
||||
return first;
|
||||
return first;
|
||||
}
|
||||
|
||||
|
||||
public int getDisease() {
|
||||
return disease;
|
||||
return mobskill;
|
||||
}
|
||||
|
||||
public static MapleDisease ordinal(int ord) {
|
||||
@@ -72,13 +76,8 @@ public enum MapleDisease {
|
||||
}
|
||||
|
||||
public static final MapleDisease getRandom() {
|
||||
while (true) {
|
||||
for (MapleDisease dis : MapleDisease.values()) {
|
||||
if (Randomizer.nextInt(MapleDisease.values().length) == 0) {
|
||||
return dis;
|
||||
}
|
||||
}
|
||||
}
|
||||
MapleDisease[] diseases = GameConstants.CPQ_DISEASES;
|
||||
return diseases[(int) (Math.random() * diseases.length)];
|
||||
}
|
||||
|
||||
public static final MapleDisease getBySkill(final int skill) {
|
||||
@@ -90,4 +89,4 @@ public enum MapleDisease {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user