Item pickup patch + Rescaled buyback fee + Tameness gain on Quests

Fixed a concurrency issue with registering picked items into the inventory, that would render some of the collected items to not be registered.
Adjusted buyback fee, now using a value sensitive to the player level (starts scaling from level 30, caps at 120).
Edited MaxHP of the boss Shade, now properly scaled to it's level.
Fixed return scroll and summon bags being usable inside BRPQ rest points.
Added missing etc drop data for the Extras/Leaders mobs from Zipangu.
Implemented pet tameness gain on quests.
Fixed a concurrency issue with the pet spawn handler, allowing possible PE exploits.
Adjusted drop rates of omok pieces and match cards, now somewhat GMS-like.
Shadow Meso now properly dispels mobs wdef/mdef up, as the skill description suggests.
Fixed Shadow Meso using up projectiles (it should use only mesos).
This commit is contained in:
ronancpl
2018-06-26 22:56:26 -03:00
parent c10856546f
commit dac5c43635
69 changed files with 925 additions and 550 deletions
+26 -16
View File
@@ -31,11 +31,12 @@ import client.status.MonsterStatus;
import client.status.MonsterStatusEffect;
import constants.ServerConstants;
import constants.skills.Crusader;
import constants.skills.DragonKnight;
import constants.skills.FPMage;
import constants.skills.Hermit;
import constants.skills.ILMage;
import constants.skills.NightLord;
import constants.skills.NightWalker;
import constants.skills.Priest;
import constants.skills.Shadower;
import constants.skills.WhiteKnight;
import java.awt.Point;
@@ -999,29 +1000,38 @@ public class MapleMonster extends AbstractLoadedMapleLife {
byte[] packet = MaplePacketCreator.cancelMonsterStatus(getObjectId(), oldEffect.getStati());
map.broadcastMessage(packet, getPosition());
MapleCharacter controller = getController();
if (controller != null && !controller.isMapObjectVisible(MapleMonster.this)) {
controller.getClient().announce(packet);
MapleCharacter chrController = getController();
if (chrController != null && !chrController.isMapObjectVisible(MapleMonster.this)) {
chrController.getClient().announce(packet);
}
stati.remove(stat);
}
}
public void debuffMob(int skillid) {
MonsterStatus[] stats = {MonsterStatus.WEAPON_ATTACK_UP, MonsterStatus.WEAPON_DEFENSE_UP, MonsterStatus.MAGIC_ATTACK_UP};
MonsterStatus[] statups = {MonsterStatus.WEAPON_ATTACK_UP, MonsterStatus.WEAPON_DEFENSE_UP, MonsterStatus.MAGIC_ATTACK_UP, MonsterStatus.MAGIC_DEFENSE_UP};
statiLock.lock();
try {
int i = (skillid == Crusader.ARMOR_CRASH ? 1 : (skillid == WhiteKnight.MAGIC_CRASH ? 2 : 0));
debuffMobStat(stats[i]);
if(ServerConstants.USE_ANTI_IMMUNITY_CRASH) {
if (skillid == Crusader.ARMOR_CRASH) {
if(!isBuffed(MonsterStatus.WEAPON_REFLECT)) debuffMobStat(MonsterStatus.WEAPON_IMMUNITY);
if(!isBuffed(MonsterStatus.MAGIC_REFLECT)) debuffMobStat(MonsterStatus.MAGIC_IMMUNITY);
} else if (skillid == WhiteKnight.MAGIC_CRASH) {
if(!isBuffed(MonsterStatus.MAGIC_REFLECT)) debuffMobStat(MonsterStatus.MAGIC_IMMUNITY);
} else {
if(!isBuffed(MonsterStatus.WEAPON_REFLECT)) debuffMobStat(MonsterStatus.WEAPON_IMMUNITY);
if(skillid == Hermit.SHADOW_MESO) {
debuffMobStat(statups[1]);
debuffMobStat(statups[3]);
} else if(skillid == Priest.DISPEL) {
for(MonsterStatus ms : statups) {
debuffMobStat(ms);
}
} else { // is a crash skill
int i = (skillid == Crusader.ARMOR_CRASH ? 1 : (skillid == WhiteKnight.MAGIC_CRASH ? 2 : 0));
debuffMobStat(statups[i]);
if(ServerConstants.USE_ANTI_IMMUNITY_CRASH) {
if (skillid == Crusader.ARMOR_CRASH) {
if(!isBuffed(MonsterStatus.WEAPON_REFLECT)) debuffMobStat(MonsterStatus.WEAPON_IMMUNITY);
if(!isBuffed(MonsterStatus.MAGIC_REFLECT)) debuffMobStat(MonsterStatus.MAGIC_IMMUNITY);
} else if (skillid == WhiteKnight.MAGIC_CRASH) {
if(!isBuffed(MonsterStatus.MAGIC_REFLECT)) debuffMobStat(MonsterStatus.MAGIC_IMMUNITY);
} else {
if(!isBuffed(MonsterStatus.WEAPON_REFLECT)) debuffMobStat(MonsterStatus.WEAPON_IMMUNITY);
}
}
}
} finally {
+3
View File
@@ -518,6 +518,9 @@ public class MapleQuest {
case SKILL:
ret = new SkillAction(this, data);
break;
case PETTAMENESS:
ret = new PetTamenessAction(this, data);
break;
default:
//FilePrinter.printError(FilePrinter.EXCEPTION_CAUGHT, "Unhandled Action Type: " + type.toString() + " QuestID: " + this.getId());
break;
+3 -1
View File
@@ -26,7 +26,7 @@ package server.quest;
* @author Matze
*/
public enum MapleQuestActionType {
UNDEFINED(-1), EXP(0), ITEM(1), NEXTQUEST(2), MESO(3), QUEST(4), SKILL(5), FAME(6), BUFF(7), PETSKILL(8), YES(9), NO(10), NPC(11), MIN_LEVEL(12), NORMAL_AUTO_START(13), ZERO(14);
UNDEFINED(-1), EXP(0), ITEM(1), NEXTQUEST(2), MESO(3), QUEST(4), SKILL(5), FAME(6), BUFF(7), PETSKILL(8), YES(9), NO(10), NPC(11), MIN_LEVEL(12), NORMAL_AUTO_START(13), PETTAMENESS(14), ZERO(15);
final byte type;
private MapleQuestActionType(int type) {
@@ -60,6 +60,8 @@ public enum MapleQuestActionType {
return MIN_LEVEL;
} else if (name.equals("normalAutoStart")) {
return NORMAL_AUTO_START;
} else if (name.equals("pettameness")) {
return PETTAMENESS;
} else if (name.equals("0")) {
return ZERO;
} else {
@@ -0,0 +1,63 @@
/*
This file is part of the HeavenMS MapleStory Server
Copyleft (L) 2016 - 2018 RonanLana
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package server.quest.actions;
import client.MapleClient;
import client.MapleCharacter;
import client.inventory.MaplePet;
import provider.MapleData;
import provider.MapleDataTool;
import server.quest.MapleQuest;
import server.quest.MapleQuestActionType;
/**
*
* @author Ronan
*/
public class PetTamenessAction extends MapleQuestAction {
int tameness;
public PetTamenessAction(MapleQuest quest, MapleData data) {
super(MapleQuestActionType.PETTAMENESS, quest);
questID = quest.getId();
processData(data);
}
@Override
public void processData(MapleData data) {
tameness = MapleDataTool.getInt(data);
}
@Override
public void run(MapleCharacter chr, Integer extSelection) {
MapleClient c = chr.getClient();
MaplePet pet = chr.getPet(0); // assuming here only the pet leader will gain tameness
if(pet == null) return;
c.lockClient();
try {
pet.gainClosenessFullness(chr, tameness, 0, 0);
} finally {
c.unlockClient();
}
}
}