Improved item & drop-point checking + Dojo fixes + Duey revamp

Fixed some issues with items being dropped sometimes out-of-reach and in a weird way.
Improved item checking function, now looking up one-of-a-kind items properly.
Fixed some issues with dojo skills and possible exploits in dojo progression.
Improved Duey, now displaying better info to players.
This commit is contained in:
ronancpl
2018-01-03 18:45:56 -02:00
parent 012f965f6a
commit 1190513d0c
69 changed files with 781 additions and 423 deletions

View File

@@ -345,7 +345,7 @@ public class Commands {
public static boolean executeHeavenMsCommandLv0(Channel cserv, Server srv, MapleClient c, String[] sub) { //Player
MapleCharacter player = c.getPlayer();
switch(sub[0]) {
switch(sub[0]) {
case "help":
case "commands":
case "playercommands":
@@ -1158,7 +1158,7 @@ public class Commands {
MapleInventoryManipulator.addById(c, itemId, quantity, player.getName(), -1, flag, -1);
} else {
Item toDrop;
if (MapleItemInformationProvider.getInstance().getInventoryType(itemId) == MapleInventoryType.EQUIP) {
if (ItemConstants.getInventoryType(itemId) == MapleInventoryType.EQUIP) {
toDrop = MapleItemInformationProvider.getInstance().getEquipById(itemId);
} else {
toDrop = new Item(itemId, (short) 0, quantity);
@@ -1813,6 +1813,10 @@ public class Commands {
}
break;
case "energy":
System.out.println(c.getPlayer().getDojoEnergy());
break;
case "maxenergy":
c.getPlayer().setDojoEnergy(10000);
c.announce(MaplePacketCreator.getEnergy("energy", 10000));
@@ -2162,7 +2166,7 @@ public class Commands {
short multiply = Short.parseShort(sub[2]);
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
MapleInventoryType type = ii.getInventoryType(itemid);
MapleInventoryType type = ItemConstants.getInventoryType(itemid);
if (type.equals(MapleInventoryType.EQUIP)) {
Item it = ii.getEquipById(itemid);
it.setOwner(player.getName());