Exp gain & Chaos scroll fix + Diet's MK Overhaul

Fixed issues with negative experience being distributed to characters
when killing a mob, rendering "Exp reset". Fixed chaos scroll behaving
oddly. Refactored debuff expirations to manage one list with registered
debuffs and expire times, thus lifting some load from the TimerManager.
Added concurrency protection on how World deals with parties. Thanks to
the DietStory dev team, fixed some issues with the MK maps.
This commit is contained in:
ronancpl
2017-10-04 02:35:52 -03:00
parent 6445f0b4e4
commit 3a882c7f31
141 changed files with 1719 additions and 524 deletions

View File

@@ -1,4 +1,4 @@
#Fri, 29 Sep 2017 17:49:16 -0300
#Wed, 04 Oct 2017 01:18:34 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=

BIN
dist/MapleSolaxia.jar vendored

Binary file not shown.

View File

@@ -558,4 +558,11 @@ Adicionado Owl of Minerva.
Corrigido um bug no sistema de checagem de slots.
28 Setembro 2017,
Adidionado wish tickets à AmoriaPQ.
Adidionado wish tickets à AmoriaPQ.
02 - 03 Outubro 2017,
Adicionado proteção de acesso concorrente em MapleParty.
Corrigido bug em sistema de distribuição de EXP para party.
Corrigido bug de overflow em distribuição de EXP.
Corrigido bug com scrolls não usando slots quando resultam em sucesso.
Refatorado sistema de schedules para disease expiretimes.

View File

@@ -3,28 +3,15 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="1"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/RecvOpcode.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/data/input/GenericLittleEndianAccessor.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/maps/MapleHiredMerchant.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/PacketProcessor.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/SendOpcode.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/TakeDamageHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/AbstractPlayerInteraction.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/constants/ServerConstants.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/world/World.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/FredrickHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/OwlWarpHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/RemoteStoreHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/PlayerInteractionHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/inventory/MapleInventory.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/UseCashItemHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/handlers/UseOwlOfMinervaHandler.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleTrade.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleInventoryManipulator.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleMiniGame.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MaplePlayerShop.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/data/output/GenericLittleEndianWriter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleClient.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/net/server/channel/Channel.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/data/input/LittleEndianAccessor.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/life/MobSkill.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/server/MapleItemInformationProvider.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/tools/MaplePacketCreator.java</file>
</group>
</open-files>
</project-private>

View File

@@ -0,0 +1,110 @@
var minPlayers = 1;
var timeLimit = 20; //20 minutes
var eventTimer = 1000 * 60 * timeLimit;
var exitMap = 106021400;
function init(){}
function setup(difficulty, lobbyId){
var eim = em.newInstance("KingPepe_" +lobbyId);
eim.getInstanceMap(106021500).resetFully();
eim.getInstanceMap(106021500).allowSummonState(false);
respawn(eim);
eim.startEventTimer(eventTimer);
return eim;
}
function afterSetup(eim){}
function respawn(eim){
var map = eim.getMapInstance(exitMap);
map.allowSummonState(true);
map.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player){
var yetiMap = eim.getMapInstance(106021500);
player.changeMap(yetiMap, yetiMap.getPortal(1));
}
function scheduledTimeout(eim){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(exitMap);
return false;
}
function playerDead(eim, player){}
function playerDisconnected(eim, player){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++){
if(party.get(i).equals(player))
removePlayer(eim, player);
else
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterValue(eim, mobId){
return -1;
}
function leftParty(eim, player){
var party = eim.getPlayers();
if(party.size() < minPlayers){
for(var i = 0; i < party.size(); i++){
playerExit(eim, party.get(i));
}
eim.dispose();
}
else{
playerExit(eim, player);
}
}
function disbandParty(eim){}
function playerUnregistered(eim, player){}
function playerExit(eim, player){
eim.unregisterPlayer(player);
player.changeMap(exitMap, 2);
}
function moveMap(eim, player){
if(player.getMap().getId() == exitMap){
removePlayer(eim, player);
eim.dispose();
}
}
function removePlayer(eim, player){
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(exitMap);
}
function cancelSchedule(){}
function dispose(){}
function clearPQ(eim){}
function monsterKilled(mob, eim){}
function allMonstersDead(eim){}

View File

@@ -0,0 +1,108 @@
var minPlayers = 1;
var entryMap = 106021402;
var exitMap = 106021600;
function init(){}
function setup(difficulty, lobbyId){
var eim = em.newInstance("MK_PrimeMinister_" +lobbyId);
eim.getInstanceMap(106021601).resetFully();
eim.getInstanceMap(106021601).allowSummonState(false);
respawn(eim);
return eim;
}
function afterSetup(eim){}
function respawn(eim){
var map = eim.getMapInstance(entryMap);
map.allowSummonState(true);
map.instanceMapRespawn();
eim.schedule("respawn", 10000);
}
function playerEntry(eim, player){
var weddinghall = eim.getMapInstance(106021601);
player.changeMap(weddinghall, weddinghall.getPortal(1));
}
function scheduledTimeout(eim){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++)
playerExit(eim, party.get(i));
eim.dispose();
}
function playerRevive(eim, player){
player.setHp(50);
player.setStance(0);
eim.unregisterPlayer(player);
player.changeMap(entryMap);
return false;
}
function playerDead(eim, player){}
function playerDisconnected(eim, player){
var party = eim.getPlayers();
for(var i = 0; i < party.size(); i++){
if(party.get(i).equals(player))
removePlayer(eim, player);
else
playerExit(eim, party.get(i));
}
eim.dispose();
}
function monsterValue(eim, mobId){
return -1;
}
function leftParty(eim, player){
var party = eim.getPlayers();
if(party.size() < minPlayers){
for(var i = 0; i < party.size(); i++){
playerExit(eim, party.get(i));
}
eim.dispose();
}
else{
playerExit(eim, player);
}
}
function disbandParty(eim){}
function playerUnregistered(eim, player){}
function playerExit(eim, player){
eim.unregisterPlayer(player);
player.changeMap(entryMap, 2);
}
function moveMap(eim, player){
if(player.getMap().getId() == exitMap || player.getMap().getId() == entryMap){
removePlayer(eim, player);
eim.dispose();
}
}
function removePlayer(eim, player){
eim.unregisterPlayer(player);
player.getMap().removePlayer(player);
player.setMap(entryMap);
}
function cancelSchedule(){}
function dispose(){}
function clearPQ(eim){}
function monsterKilled(mob, eim){}
function allMonstersDead(eim){}

View File

@@ -0,0 +1,9 @@
importPackage(Packages.server.life);
function start(ms){
var mobId = 3300000 + (Math.floor(Math.random() * 3) + 5);
var player = ms.getPlayer();
var map = player.getMap();
map.spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(mobId), new java.awt.Point(-28, -67));
}

View File

@@ -19,7 +19,7 @@
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/>.
*/
/* Trash Can
/* Trash Can 1
*/

31
scripts/npc/1052110.js Normal file
View File

@@ -0,0 +1,31 @@
/*
Trash Can 2
Kerning Subway
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

51
scripts/npc/1052111.js Normal file
View File

@@ -0,0 +1,51 @@
/*
Trash Can 3
Kerning Subway
*/
var status;
function start(){
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if(mode == -1){
cm.dispose();
return;
}
else{
if(mode == 0 && status == 0){
cm.dispose();
return;
}
else if(mode == 0)
status--;
else
status++;
if(cm.isQuestStarted(20710)){
if(!cm.hasItem(4032136)){
cm.sendNext("You have found a #b#t4032136##k in the trash can! #i4032136#");
if(cm.canHold(4032136)){
cm.gainItem(4032136, 1);
}
else{
cm.sendOk("#i4032136# Not enough space in your ETC inventory.");
}
cm.dispose();
}
else{
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
else{
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

31
scripts/npc/1052112.js Normal file
View File

@@ -0,0 +1,31 @@
/*
Trash Can 4
Kerning Subway
*/
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && type > 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if(status == 0) {
cm.sendOk("Just a trash can sitting there.");
cm.dispose();
}
}
}

View File

@@ -3,19 +3,16 @@
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
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/>.
*/
@@ -24,28 +21,37 @@
* @Author xXOsirisXx (BubblesDev)
*/
status = -1;
var status;
function start() {
cm.sendNext("Okay, I'll now send you to the stable where my cows are. Watch out for the calves that drink all the milk. You don't want your effort to go to waste.");
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection){
if (mode == -1 || !cm.isQuestStarted(2180)){
cm.dispose();
return;
} else if (mode == 0)
status--;
else
status++;
if (status == 1)
cm.sendNextPrev("It won't be easy to tell at a glance between a calf and a cow. Those calves may only be a month or two old, but they have already grown to the size of their mother. They even look alike...even I get confused at times! Good luck!");
else if (status == 2) {
if (cm.canHold(4031847)) {
cm.gainItem(4031847, 1);
cm.warp(912000100);
} else
cm.sendNextPrev("I can't give you the empty bottle because your inventory is full. Please make some room in your Etc window.");
cm.dispose();
}
if (mode == -1 || !cm.isQuestStarted(2180)){
cm.dispose();
return;
}
else{
if (mode == 1) status++;
else status --;
if (status == 0){
cm.sendNext("Okay, I'll now send you to the stable where my cows are. Watch out for the calves that drink all the milk. You don't want your effort to go to waste.");
}
else if (status == 1){
cm.sendNextPrev("It won't be easy to tell at a glance between a calf and a cow. Those calves may only be a month or two old, but they have already grown to the size of their mother. They even look alike...even I get confused at times! Good luck!");
}
else if (status == 2){
if (cm.canHold(4031847)){
cm.gainItem(4031847, 1);
cm.warp(912000100);
}
else{
cm.sendOk("I can't give you the empty bottle because your inventory is full. Please make some room in your Etc window.");
}
cm.dispose();
}
}
}

Some files were not shown because too many files have changed in this diff Show More