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:
@@ -940,26 +940,17 @@ public class MapleStatEffect {
|
||||
} else if (cp != 0 && applyto.getMonsterCarnival() != null) {
|
||||
applyto.gainCP(cp);
|
||||
} else if (nuffSkill != 0 && applyto.getParty() != null && applyto.getMap().isCPQMap()) { // by Drago-Dragohe4rt
|
||||
final MCSkill skil = MapleCarnivalFactory.getInstance().getSkill(nuffSkill);
|
||||
if (skil != null) {
|
||||
final MapleDisease dis = skil.getDisease();
|
||||
MapleParty inimigos = applyfrom.getParty().getEnemy();
|
||||
if (nuffSkill == 8) {
|
||||
int amount = inimigos.getMembers().size() - 1;
|
||||
int randd = (int) Math.floor(Math.random() * amount);
|
||||
MapleCharacter chrApp = applyfrom.getClient().getChannelServer().getPlayerStorage().getCharacterById(inimigos.getMemberByPos(randd).getId());
|
||||
final MCSkill skill = MapleCarnivalFactory.getInstance().getSkill(nuffSkill);
|
||||
if (skill != null) {
|
||||
final MapleDisease dis = skill.getDisease();
|
||||
MapleParty opposition = applyfrom.getParty().getEnemy();
|
||||
for (MaplePartyCharacter enemyChrs : opposition.getPartyMembers()) {
|
||||
MapleCharacter chrApp = enemyChrs.getPlayer();
|
||||
if (chrApp != null && chrApp.getMap().isCPQMap()) {
|
||||
chrApp.dispel();
|
||||
}
|
||||
} else {
|
||||
for (MaplePartyCharacter chrsInimigos : inimigos.getPartyMembers()) {
|
||||
MapleCharacter chrApp = chrsInimigos.getPlayer();
|
||||
if (chrApp != null && chrApp.getMap().isCPQMap()) {
|
||||
if (dis == null) {
|
||||
chrApp.dispel();
|
||||
} else if (skil.getSkill() != null) {
|
||||
chrApp.giveDebuff(dis, skil.getSkill());
|
||||
}
|
||||
if (dis == null) {
|
||||
chrApp.dispel();
|
||||
} else {
|
||||
chrApp.giveDebuff(dis, MCSkill.getMobSkill(dis.getDisease()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user