Trade results + Map-Ownership & Fishing + P. EXP distribution rework

Fixed an issue where players could lose priority over recently dropped items after switching maps.
Adjusted EXP bonus buffs to also cover party bonus gains.
Fixed items taken back from merchants not properly checking for stacking opportunities in player inventory.
Fixed some merchant references in visitors' player object not being properly cleared when owner closes shop.
Adjusted merchants to automatically close as soon as the merchant owner finishes maintenance process with it having no items in store.
Added trade result opcodes. Trade results now should work almost as intended originally.
Implemented server-side check for portal distance when deploying player shops and merchants.
Implemented server-side check for whether local or remote IP is being used when logging in a local/remote server (this should mitigate a few of the issues people may find when trying to log in game world).
Implemented commands designed for management of opened IO sessions.
Fixed chalkboard not showing up for owner player when changing maps.
Added "time left" functionality for merchant owners managing the opened store.
Fixed skillbooks not showing properly for other players in the map.
Fixed commands using lowercased-version of content inputted by player.
Implemented the Fredrick expected fee on using the Store Bank service.
Implemented "exclusive invitation management" in the system. Inviters are notified the invited players are already managing an invite, should it be visually "in-progress" for that one.
Implemented "map ownership". Non-map owners are unable to farm in an area if they are not party members with the owner or until the ownership rescinds.
Adjusted inventory sort feature, now sorting projectile items in such a fashion that commonly stronger versions comes before the basic ones.
Added a visual effect that shows up when obtaining Aran skills.
Revised party EXP gain system. Party bonuses now accounts a fraction of the accumulated EXP gained by members when defeating a mob, and raw EXP gained by a player is kept the same regardless of him/her being in a party or not (thus a bonus being REALLY a bonus).
Implemented a custom fishing system in the source, on which during "seasonal" times (that gets arbitrarily defined by both day-of-year and time-of-day) fishes are more likely to be hooked. Such likelihood also improved depending on the amount of mesos spent as lure.
This commit is contained in:
ronancpl
2019-03-10 01:30:22 -03:00
parent 799870df63
commit 9538c415e1
86 changed files with 2992 additions and 887 deletions

View File

@@ -848,18 +848,18 @@ public class AbstractPlayerInteraction {
}
public void teachSkill(int skillid, byte level, byte masterLevel, long expiration, boolean force) {
Skill skill = SkillFactory.getSkill(skillid);
if (!force && level > -1) {
Skill skill = SkillFactory.getSkill(skillid);
MapleCharacter.SkillEntry skillEntry = getPlayer().getSkills().get(skill);
if (skillEntry != null) {
getPlayer().changeSkillLevel(skill, (byte) Math.max(skillEntry.skillevel, level), Math.max(skillEntry.masterlevel, masterLevel), expiration == -1 ? -1 : Math.max(skillEntry.expiration, expiration));
return;
if (!force && level > -1) {
getPlayer().changeSkillLevel(skill, (byte) Math.max(skillEntry.skillevel, level), Math.max(skillEntry.masterlevel, masterLevel), expiration == -1 ? -1 : Math.max(skillEntry.expiration, expiration));
return;
}
} else if (GameConstants.isAranSkills(skillid)) {
c.announce(MaplePacketCreator.showInfo("Effect/BasicEff.img/AranGetSkill"));
}
}
getPlayer().changeSkillLevel(skill, level, masterLevel, expiration);
getPlayer().changeSkillLevel(skill, level, masterLevel, expiration);
}
public void removeEquipFromSlot(short slot) {

View File

@@ -1,35 +0,0 @@
/*
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 scripting.event;
/**
*
* @author Ronan
*/
public class EventInstanceInProgressException extends Exception {
public static String EIIP_KEY = "Event instance ";
public EventInstanceInProgressException(String eventName, String eventInstance) {
super(EIIP_KEY + "already in progress - " + eventName + ", EM: " + eventInstance);
}
}

View File

@@ -21,6 +21,7 @@
*/
package scripting.event;
import tools.exceptions.EventInstanceInProgressException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

View File

@@ -435,6 +435,8 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
Server.getInstance().allianceMessage(alliance.getId(), MaplePacketCreator.getGuildAlliances(alliance, c.getWorld()), -1, -1);
Server.getInstance().allianceMessage(alliance.getId(), MaplePacketCreator.allianceNotice(alliance.getId(), alliance.getNotice()), -1, -1);
c.announce(MaplePacketCreator.updateAllianceInfo(alliance, c.getWorld())); // thanks Vcoc for finding an alliance update to leader issue
}
public void disbandAlliance(MapleClient c, int allianceId) {