Fixed Pet Name Tag + quest 3927

Fixed some issues related to Pet Name Tag item and quest 3927.
This commit is contained in:
ronancpl
2017-05-17 19:27:44 -03:00
parent 3fc338467b
commit d736d00964
14 changed files with 142 additions and 56 deletions

View File

@@ -376,11 +376,14 @@ public final class UseCashItemHandler extends AbstractMaplePacketHandler {
c.announce(MaplePacketCreator.enableActions());
return;
}
Item item = player.getInventory(MapleInventoryType.CASH).getItem(pet.getPosition());
String newName = slea.readMapleAsciiString();
pet.setName(newName);
pet.saveToDb();
player.forceUpdateItem(item);
Item item = player.getInventory(MapleInventoryType.CASH).getItem(pet.getPosition());
if (item != null)
player.forceUpdateItem(item);
player.getMap().broadcastMessage(player, MaplePacketCreator.changePetName(player, newName, 1), true);
c.announce(MaplePacketCreator.enableActions());
remove(c, itemId);