Enhanced map bounds + HolidayPQ + Battleship

Fixed Abdula not showing book info for Arans.
Fixed map bounds, now it hopefully doesn't let items pass through the walkable area anymore.
Implemented HolidayPQ.
Added a custom item sandbox system, to be used with items generated by the "drop" command.
Added the whole-map buff when using the Happy Birthday item.
Fixed several battleship issues:
 - Battleship now shows HP properly at the buff icon.
 - Cleared some inconsistencies on battleship when interacting with the enhanced buff system.
 - Battleship now hands out defensive buffs properly.
This commit is contained in:
ronancpl
2018-06-13 00:03:46 -03:00
parent 0b8d3a0b2b
commit dddfdcf315
46 changed files with 5494 additions and 3796 deletions

View File

@@ -57,9 +57,11 @@ public final class MobDamageMobFriendlyHandler extends AbstractMaplePacketHandle
} else if(monster.getId() == 9300093) { //tylus
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Tylus has fallen by the overwhelming forces of the ambush."));
} else if(monster.getId() == 9300137) { //juliet
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Juliet has fainted on the middle of the combat."));
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Juliet has fainted in the middle of the combat."));
} else if(monster.getId() == 9300138) { //romeo
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Romeo has fainted on the middle of the combat."));
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Romeo has fainted in the middle of the combat."));
} else if(monster.getId() == 9400322 || monster.getId() == 9400327 || monster.getId() == 9400332) {
monster.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "The Snowman has melted on the heat of the battle."));
}
c.getPlayer().getMap().killFriendlies(monster);

View File

@@ -263,11 +263,14 @@ public final class PlayerLoggedinHandler extends AbstractMaplePacketHandler {
if (!c.hasVotedAlready()){
player.announce(MaplePacketCreator.earnTitleMessage("You can vote now! Vote and earn a vote point!"));
}
*/
*/
if (player.isGM()){
Server.getInstance().broadcastGMMessage(c.getWorld(), MaplePacketCreator.earnTitleMessage((player.gmLevel() < 6 ? "GM " : "Admin ") + player.getName() + " has logged in"));
}
} else {
if(player.isRidingBattleship()) {
player.announceBattleshipHp();
}
}
showDueyNotification(c, player);

View File

@@ -409,8 +409,12 @@ public final class RingActionHandler extends AbstractMaplePacketHandler {
if(guestChr != null && MapleInventoryManipulator.checkSpace(guestChr.getClient(), newItemId, 1, "") && MapleInventoryManipulator.addById(guestChr.getClient(), newItemId, (short) 1, expiration)) {
guestChr.dropMessage(6, "[WEDDING] You've been invited to " + groom + " and " + bride + "'s Wedding!");
} else {
c.getPlayer().sendNote(name, "You've been invited to " + groom + " and " + bride + "'s Wedding! Receive your invitation from Duey!", (byte) 0);
if(guestChr != null && guestChr.isLoggedinWorld()) {
guestChr.dropMessage(6, "[WEDDING] You've been invited to " + groom + " and " + bride + "'s Wedding! Receive your invitation from Duey!");
} else {
c.getPlayer().sendNote(name, "You've been invited to " + groom + " and " + bride + "'s Wedding! Receive your invitation from Duey!", (byte) 0);
}
Item weddingTicket = new Item(newItemId, (short) 0, (short) 1);
weddingTicket.setExpiration(expiration);

View File

@@ -237,10 +237,8 @@ public final class TakeDamageHandler extends AbstractMaplePacketHandler {
}
chr.addMPHP(-damage, -mpattack);
} else {
if (chr.getBuffedValue(MapleBuffStat.MONSTER_RIDING) != null) {
if (chr.getBuffedValue(MapleBuffStat.MONSTER_RIDING).intValue() == Corsair.BATTLE_SHIP) {
chr.decreaseBattleshipHp(damage);
}
if (chr.isRidingBattleship()) {
chr.decreaseBattleshipHp(damage);
}
chr.addMPHP(-damage, -mpattack);
}

View File

@@ -31,6 +31,7 @@ import constants.ServerConstants;
import net.AbstractMaplePacketHandler;
import client.inventory.manipulator.MapleInventoryManipulator;
import server.MapleItemInformationProvider;
import server.MapleStatEffect;
import tools.MaplePacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
@@ -94,8 +95,16 @@ public final class UseItemHandler extends AbstractMaplePacketHandler {
remove(c, slot);
ii.getItemEffect(toUse.getItemId()).applyTo(chr);
chr.checkBerserk(chr.isHidden());
if(toUse.getItemId() != 2022153) {
ii.getItemEffect(toUse.getItemId()).applyTo(chr);
chr.checkBerserk(chr.isHidden());
} else {
MapleStatEffect mse = ii.getItemEffect(toUse.getItemId());
for(MapleCharacter player : chr.getMap().getCharacters()) {
mse.applyTo(player);
player.checkBerserk(player.isHidden());
}
}
}
}