Meso patch + Swift Dmg Reflect buff + GPQ Rewards + Starting Q. items
Fixed several RNG pool issues within several handler classes. Fixed an overflow issue with mesos, that would cause players to lose all amount on inventory. Changed the code coupon SQL structure. Now nxcode_items.quantity is to be specified for both nx values and item quantities alike, instead of the use of "quantity" only when items are being provided. Bob Snail now appears each 4 hours, instead of any time. Removed duplicate command Warpto. Warpto merged with Reach command. Fixed solo expeditions being disposed for "lack of personnel" after changing maps (normal limitations should not apply when USE_ENABLE_SOLO_EXPEDITIONS is enabled). Fixed mobskills "Weapon/Magic Reflect" taking too long to show the active status over the mob's head. Fixed a case with clean slate scroll not working as expected. Improved reward contents for the GPQ. Fixed loot manager not acting properly when verifying one-of-a-kind contents. Implemented quest item requirement checkups to start quests. Items required to start a quest now should appear if the player did not start it yet, e.g.: SOS letter. Fixed an issue with server message/boss HPbar switch interaction that would not work the moment after a player changed channels/entered Cash Shop. Improved Victoria Island worldmap design, at the Kerning subway area.
This commit is contained in:
@@ -217,9 +217,8 @@ public class CommandsExecutor {
|
||||
addCommand("cleardrops", 2, ClearDropsCommand.class);
|
||||
addCommand("clearslot", 2, ClearSlotCommand.class);
|
||||
addCommand("warp", 2, WarpCommand.class);
|
||||
addCommand("warpto", 2, WarpToCommand.class);
|
||||
addCommand(new String[]{"warphere", "summon"}, 2, SummonCommand.class);
|
||||
addCommand(new String[]{"reach", "follow"}, 2, ReachCommand.class);
|
||||
addCommand(new String[]{"warpto", "reach", "follow"}, 2, ReachCommand.class);
|
||||
addCommand("gmshop", 2, GmShopCommand.class);
|
||||
addCommand("heal", 2, HealCommand.class);
|
||||
addCommand("item", 2, ItemCommand.class);
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
This file is part of the HeavenMS MapleStory Server, commands OdinMS-based
|
||||
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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
@Author: Arthur L - Refactored command content into modules
|
||||
*/
|
||||
package client.command.commands.gm2;
|
||||
|
||||
import client.command.Command;
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
import net.server.Server;
|
||||
import net.server.channel.Channel;
|
||||
|
||||
public class WarpToCommand extends Command {
|
||||
{
|
||||
setDescription("");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(MapleClient c, String[] params) {
|
||||
MapleCharacter player = c.getPlayer();
|
||||
if (params.length < 2) {
|
||||
player.yellowMessage("Syntax: !warpto <playername> <mapid>");
|
||||
return;
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim == null) {//If victim isn't on current channel or isnt a character try and find him by loop all channels on current world.
|
||||
for (Channel ch : Server.getInstance().getChannelsFromWorld(c.getWorld())) {
|
||||
victim = ch.getPlayerStorage().getCharacterByName(params[0]);
|
||||
if (victim != null) {
|
||||
break;//We found the person, no need to continue the loop.
|
||||
}
|
||||
}
|
||||
}
|
||||
if (victim != null) {//If target isn't null attempt to warp.
|
||||
//Remove warper from current event instance.
|
||||
if (player.getEventInstance() != null) {
|
||||
player.getEventInstance().unregisterPlayer(player);
|
||||
}
|
||||
//Attempt to join the victims warp instance.
|
||||
if (victim.getEventInstance() != null) {
|
||||
if (victim.getClient().getChannel() == player.getClient().getChannel()) {//just in case.. you never know...
|
||||
//victim.getEventInstance().registerPlayer(player);
|
||||
player.changeMap(victim.getEventInstance().getMapInstance(victim.getMapId()), victim.getMap().findClosestPortal(victim.getPosition()));
|
||||
} else {
|
||||
player.dropMessage(6, "Please change to channel " + victim.getClient().getChannel());
|
||||
}
|
||||
} else {//If victim isn't in an event instance, just warp them.
|
||||
player.changeMap(victim.getMapId(), victim.getMap().findClosestPortal(victim.getPosition()));
|
||||
}
|
||||
if (player.getClient().getChannel() != victim.getClient().getChannel()) {//And then change channel if needed.
|
||||
player.dropMessage("Changing channel, please wait a moment.");
|
||||
player.getClient().changeChannel(victim.getClient().getChannel());
|
||||
}
|
||||
} else {
|
||||
player.dropMessage(6, "Unknown player.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,18 +40,35 @@ public class GiveMesosCommand extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
String recv_;
|
||||
int value_;
|
||||
String recv_, value_;
|
||||
long mesos_ = 0;
|
||||
|
||||
if (params.length == 2) {
|
||||
recv_ = params[0];
|
||||
value_ = Integer.parseInt(params[1]);
|
||||
value_ = params[1];
|
||||
} else {
|
||||
recv_ = c.getPlayer().getName();
|
||||
value_ = Integer.parseInt(params[0]);
|
||||
value_ = params[0];
|
||||
}
|
||||
|
||||
try {
|
||||
mesos_ = Long.parseLong(value_);
|
||||
if (mesos_ > Integer.MAX_VALUE) {
|
||||
mesos_ = Integer.MAX_VALUE;
|
||||
} else if (mesos_ < Integer.MIN_VALUE) {
|
||||
mesos_ = Integer.MIN_VALUE;
|
||||
}
|
||||
} catch (NumberFormatException nfe) {
|
||||
if (value_.contentEquals("max")) { // "max" descriptor suggestion thanks to Vcoc
|
||||
mesos_ = Integer.MAX_VALUE;
|
||||
} else if (value_.contentEquals("min")) {
|
||||
mesos_ = Integer.MIN_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
MapleCharacter victim = c.getChannelServer().getPlayerStorage().getCharacterByName(recv_);
|
||||
if (victim != null) {
|
||||
victim.gainMeso(value_, true);
|
||||
victim.gainMeso((int) mesos_, true);
|
||||
player.message("MESO given.");
|
||||
} else {
|
||||
player.message("Player '" + recv_ + "' could not be found on this channel.");
|
||||
|
||||
Reference in New Issue
Block a user