Savior Commit
Fixed some bugs regarding dojo, updated drop data, minor tweaks on Mystic Doors, added expeditions for Showa Manor, Zakum and Pink Bean, smart search for item slots on quest/npc rewarding system, attempt on boss HPbar to focus on player's current target, quests with selectable rewards now hands the item correctly, after the first PQ instance next ones are loaded more smoothly.
This commit is contained in:
@@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package net.server.channel.handlers;
|
||||
|
||||
import tools.LogHelper;
|
||||
import tools.FilePrinter;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.data.input.SeekableLittleEndianAccessor;
|
||||
@@ -33,50 +32,49 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
|
||||
public final class GeneralChatHandler extends net.AbstractMaplePacketHandler {
|
||||
|
||||
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
|
||||
String s = slea.readMapleAsciiString();
|
||||
MapleCharacter chr = c.getPlayer();
|
||||
if(chr.getAutobanManager().getLastSpam(7) + 200 > System.currentTimeMillis()) {
|
||||
return;
|
||||
}
|
||||
if (s.length() > Byte.MAX_VALUE && !chr.isGM()) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit in General Chat.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to send text with length of " + s.length() + "\r\n");
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
char heading = s.charAt(0);
|
||||
if (heading == '/' || heading == '!' || heading == '@') {
|
||||
String[] sp = s.split(" ");
|
||||
sp[0] = sp[0].toLowerCase().substring(1);
|
||||
if (!Commands.executePlayerCommand(c, sp, heading)) {
|
||||
if (chr.isGM()) {
|
||||
if (!Commands.executeGMCommand(c, sp, heading)) {
|
||||
Commands.executeAdminCommand(c, sp, heading);
|
||||
}
|
||||
String command = "";
|
||||
for (String used : sp) {
|
||||
command += used + " ";
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
||||
FilePrinter.print(FilePrinter.USED_COMMANDS, c.getPlayer().getName() + " used: " + heading + command + "on " + sdf.format(Calendar.getInstance().getTime()) + "\r\n");
|
||||
@Override
|
||||
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
|
||||
String s = slea.readMapleAsciiString();
|
||||
MapleCharacter chr = c.getPlayer();
|
||||
if(chr.getAutobanManager().getLastSpam(7) + 200 > System.currentTimeMillis()) {
|
||||
c.announce(MaplePacketCreator.enableActions());
|
||||
return;
|
||||
}
|
||||
if (s.length() > Byte.MAX_VALUE && !chr.isGM()) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit in General Chat.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to send text with length of " + s.length() + "\r\n");
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
char heading = s.charAt(0);
|
||||
if (heading == '/') {
|
||||
String[] sp = s.split(" ");
|
||||
sp[0] = sp[0].toLowerCase().substring(1);
|
||||
|
||||
if(Commands.executeSolaxiaPlayerCommand(c, sp, heading)) {
|
||||
String command = "";
|
||||
for (String used : sp) {
|
||||
command += used + " ";
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
||||
FilePrinter.print(FilePrinter.USED_COMMANDS, c.getPlayer().getName() + " used: " + heading + command + "on " + sdf.format(Calendar.getInstance().getTime()) + "\r\n");
|
||||
}
|
||||
} else {
|
||||
int show = slea.readByte();
|
||||
if(chr.getMap().isMuted() && !chr.isGM()) {
|
||||
chr.dropMessage(5, "The map you are in is currently muted. Please try again later.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!chr.isHidden()) {
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, chr.getWhiteChat(), show));
|
||||
} else {
|
||||
chr.getMap().broadcastGMMessage(MaplePacketCreator.getChatText(chr.getId(), s, chr.getWhiteChat(), show));
|
||||
}
|
||||
|
||||
chr.getAutobanManager().spam(7);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int show = slea.readByte();
|
||||
if(chr.getMap().isMuted() && !chr.isGM()) {
|
||||
chr.dropMessage(5, "The map you are in is currently muted. Please try again later.");
|
||||
return;
|
||||
}
|
||||
if (!chr.isHidden()) {
|
||||
chr.getMap().broadcastMessage(MaplePacketCreator.getChatText(chr.getId(), s, chr.getWhiteChat(), show));
|
||||
} else {
|
||||
chr.getMap().broadcastGMMessage(MaplePacketCreator.getChatText(chr.getId(), s, chr.getWhiteChat(), show));
|
||||
}
|
||||
}
|
||||
chr.getAutobanManager().spam(7);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user