Boss Daily Entry + Maker enable actions + Duey Quick Delivery
Fixed Legendary Spirit UI getting stuck when trying to apply scrolls in equipments without upgrade slots available. Revised map leasing. Players no longer lose ownership when changing maps. Players are allowed to lease one map each time. Revised expeditions warping players out as soon as the leader leaves the event or the number of players inside gets to be less than the minimum required to enter. Fixed start/complete quest commands not acting properly for some quests. Refactored quest loadouts unnecessarily reloading MapleData. Implemented support for daily boss limit entry, usable on expeditions. Revised potential exploit cases within chair, face expression, quest action, summon damage and mob damage mob handlers. Adjusted displayed date in Duey. Value displayed now should be consistent with the expected expiration time. Refactored damage for friendly mobs getting handled inside packet structure. Implemented support for Quick Delivery from Duey. Fixed Horntail specifically not dropping loots after recent updates. Refactored commands system. All commands are instanced at boot time instead of at every call. Fixed usage of Maker skill not sending MAKER_RESULT packet to players. This automatically reenables the actions button (such as create) in Maker UI. Adjusted minidungeons, now using time limits specified in their respective recipes. Reviewed the "timeLimit" property utilized by maps, which was poised to work on 2 different concepts altogether. Fixed Gaga space event, should be functional now. Added RPS minigame, resources implemented by Arnah. Fixed damage taken from mob auto-destruction not working properly.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
package client;
|
||||
|
||||
import server.minigame.MapleRockPaperScissor;
|
||||
import java.awt.Point;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.sql.Connection;
|
||||
@@ -94,11 +95,10 @@ import server.maps.MapleMapObject;
|
||||
import server.maps.MapleMapObjectType;
|
||||
import server.maps.MapleMiniGame;
|
||||
import server.maps.MapleMiniGame.MiniGameResult;
|
||||
import server.life.MaplePlayerNPC;
|
||||
import server.maps.MaplePlayerShop;
|
||||
import server.maps.MaplePlayerShopItem;
|
||||
import server.maps.MapleSummon;
|
||||
import server.life.MaplePlayerNPC;
|
||||
import server.life.MonsterDropEntry;
|
||||
import server.maps.SavedLocation;
|
||||
import server.maps.SavedLocationType;
|
||||
import server.partyquest.AriantColiseum;
|
||||
@@ -221,7 +221,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
private AtomicInteger exp = new AtomicInteger();
|
||||
private AtomicInteger gachaexp = new AtomicInteger();
|
||||
private AtomicInteger meso = new AtomicInteger();
|
||||
private AtomicInteger chair = new AtomicInteger();
|
||||
private AtomicInteger chair = new AtomicInteger(-1);
|
||||
private int merchantmeso;
|
||||
private BuddyList buddylist;
|
||||
private EventInstanceManager eventInstance = null;
|
||||
@@ -233,6 +233,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
private MapleJob job = MapleJob.BEGINNER;
|
||||
private MapleMessenger messenger = null;
|
||||
private MapleMiniGame miniGame;
|
||||
private MapleRockPaperScissor rps;
|
||||
private MapleMount maplemount;
|
||||
private MapleParty party;
|
||||
private MaplePet[] pets = new MaplePet[3];
|
||||
@@ -248,6 +249,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
private SkillMacro[] skillMacros = new SkillMacro[5];
|
||||
private List<Integer> lastmonthfameids;
|
||||
private List<WeakReference<MapleMap>> lastVisitedMaps = new LinkedList<>();
|
||||
private WeakReference<MapleMap> ownedMap = new WeakReference<>(null);
|
||||
private final Map<Short, MapleQuestStatus> quests;
|
||||
private Set<MapleMonster> controlled = new LinkedHashSet<>();
|
||||
private Map<Integer, String> entered = new LinkedHashMap<>();
|
||||
@@ -826,6 +828,26 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
}
|
||||
return maxbasedamage;
|
||||
}
|
||||
|
||||
public int calculateMaxBaseMagicDamage() {
|
||||
int maxbasedamage = getTotalMagic();
|
||||
int totalint = getTotalInt();
|
||||
|
||||
if (totalint > 2000) {
|
||||
maxbasedamage -= 2000;
|
||||
maxbasedamage += (int) ((0.09033024267 * totalint) + 3823.8038);
|
||||
} else {
|
||||
maxbasedamage -= totalint;
|
||||
|
||||
if (totalint > 1700) {
|
||||
maxbasedamage += (int) (0.1996049769 * Math.pow(totalint, 1.300631341));
|
||||
} else {
|
||||
maxbasedamage += (int) (0.1996049769 * Math.pow(totalint, 1.290631341));
|
||||
}
|
||||
}
|
||||
|
||||
return (maxbasedamage * 107) / 100;
|
||||
}
|
||||
|
||||
public void setCombo(short count) {
|
||||
if (count < combocounter) {
|
||||
@@ -1664,6 +1686,14 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
petLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void setOwnedMap(MapleMap map) {
|
||||
ownedMap = new WeakReference<>(map);
|
||||
}
|
||||
|
||||
public MapleMap getOwnedMap() {
|
||||
return ownedMap.get();
|
||||
}
|
||||
|
||||
public void notifyMapTransferToPartner(int mapid) {
|
||||
if(partnerId > 0) {
|
||||
@@ -2435,7 +2465,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
}
|
||||
|
||||
private void startChairTask() {
|
||||
if (chair.get() == 0) {
|
||||
if (chair.get() < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2644,8 +2674,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
chrLock.unlock();
|
||||
}
|
||||
|
||||
if (disease == MapleDisease.SEDUCE && chair.get() != 0) {
|
||||
sitChair(0);
|
||||
if (disease == MapleDisease.SEDUCE && chair.get() < 0) {
|
||||
sitChair(-1);
|
||||
}
|
||||
|
||||
final List<Pair<MapleDisease, Integer>> debuff = Collections.singletonList(new Pair<>(disease, Integer.valueOf(skill.getX())));
|
||||
@@ -5080,7 +5110,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
public int getTotalMagic() {
|
||||
return localmagic;
|
||||
}
|
||||
|
||||
|
||||
public int getTotalWatk() {
|
||||
return localwatk;
|
||||
}
|
||||
@@ -5339,6 +5369,10 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
return playerShop;
|
||||
}
|
||||
|
||||
public MapleRockPaperScissor getRPS() { // thanks inhyuk for suggesting RPS addition
|
||||
return rps;
|
||||
}
|
||||
|
||||
public void setGMLevel(int level) {
|
||||
this.gmLevel = Math.min(level, 6);
|
||||
this.gmLevel = Math.max(level, 0);
|
||||
@@ -5356,6 +5390,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
closeTrade();
|
||||
closePlayerShop();
|
||||
closeMiniGame(true);
|
||||
closeRPS();
|
||||
closeHiredMerchant(false);
|
||||
closePlayerMessenger();
|
||||
|
||||
@@ -5512,23 +5547,19 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
|
||||
public final byte getQuestStatus(final int quest) {
|
||||
synchronized (quests) {
|
||||
for (final MapleQuestStatus q : quests.values()) {
|
||||
if (q.getQuest().getId() == quest) {
|
||||
return (byte) q.getStatus().getId();
|
||||
}
|
||||
MapleQuestStatus mqs = quests.get((short) quest);
|
||||
if (mqs != null) {
|
||||
return (byte) mqs.getStatus().getId();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public final MapleQuestStatus getMapleQuestStatus(final int quest) {
|
||||
synchronized (quests) {
|
||||
for (final MapleQuestStatus q : quests.values()) {
|
||||
if (q.getQuest().getId() == quest) {
|
||||
return q;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
MapleQuestStatus mqs = quests.get((short) quest);
|
||||
return mqs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6085,15 +6116,11 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
public void leaveMap() {
|
||||
releaseControlledMonsters();
|
||||
visibleMapObjects.clear();
|
||||
setChair(0);
|
||||
setChair(-1);
|
||||
if (hpDecreaseTask != null) {
|
||||
hpDecreaseTask.cancel(false);
|
||||
}
|
||||
|
||||
if (map.unclaimOwnership(this)) {
|
||||
map.dropMessage(5, "This lawn is now free real estate.");
|
||||
}
|
||||
|
||||
AriantColiseum arena = this.getAriantColiseum();
|
||||
if (arena != null) {
|
||||
arena.leaveArena(this);
|
||||
@@ -7411,12 +7438,12 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
|
||||
private void unsitChairInternal() {
|
||||
int chairid = chair.get();
|
||||
if (chairid != 0) {
|
||||
if (chairid >= 0) {
|
||||
if (ItemConstants.isFishingChair(chairid)) {
|
||||
this.getWorldServer().unregisterFisherPlayer(this);
|
||||
}
|
||||
|
||||
setChair(0);
|
||||
setChair(-1);
|
||||
if (unregisterChairBuff()) {
|
||||
getMap().broadcastMessage(this, MaplePacketCreator.cancelForeignChairSkillEffect(this.getId()), false);
|
||||
}
|
||||
@@ -7430,22 +7457,24 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
public void sitChair(int itemId) {
|
||||
if (client.tryacquireClient()) {
|
||||
try {
|
||||
if (itemId >= 1000000) { // sit on item chair
|
||||
if (chair.get() == 0) {
|
||||
setChair(itemId);
|
||||
getMap().broadcastMessage(this, MaplePacketCreator.showChair(this.getId(), itemId), false);
|
||||
}
|
||||
announce(MaplePacketCreator.enableActions());
|
||||
} else if (itemId != 0) { // sit on map chair
|
||||
if (chair.get() == 0) {
|
||||
setChair(itemId);
|
||||
if (registerChairBuff()) {
|
||||
getMap().broadcastMessage(this, MaplePacketCreator.giveForeignChairSkillEffect(this.getId()), false);
|
||||
if (this.isLoggedinWorld()) {
|
||||
if (itemId >= 1000000) { // sit on item chair
|
||||
if (chair.get() < 0) {
|
||||
setChair(itemId);
|
||||
getMap().broadcastMessage(this, MaplePacketCreator.showChair(this.getId(), itemId), false);
|
||||
}
|
||||
announce(MaplePacketCreator.cancelChair(itemId));
|
||||
announce(MaplePacketCreator.enableActions());
|
||||
} else if (itemId >= 0) { // sit on map chair
|
||||
if (chair.get() < 0) {
|
||||
setChair(itemId);
|
||||
if (registerChairBuff()) {
|
||||
getMap().broadcastMessage(this, MaplePacketCreator.giveForeignChairSkillEffect(this.getId()), false);
|
||||
}
|
||||
announce(MaplePacketCreator.cancelChair(itemId));
|
||||
}
|
||||
} else { // stand up
|
||||
unsitChairInternal();
|
||||
}
|
||||
} else { // stand up
|
||||
unsitChairInternal();
|
||||
}
|
||||
} finally {
|
||||
client.releaseClient();
|
||||
@@ -8955,6 +8984,18 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setRPS(MapleRockPaperScissor rps) {
|
||||
this.rps = rps;
|
||||
}
|
||||
|
||||
public void closeRPS() {
|
||||
MapleRockPaperScissor rps = this.rps;
|
||||
if (rps != null) {
|
||||
rps.dispose(client);
|
||||
setRPS(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void changeName(String name) {
|
||||
FredrickProcessor.removeFredrickReminders(this.getId());
|
||||
|
||||
Reference in New Issue
Block a user