Fixed NPE if player does not have adena after buying lottery ticket.
Contributed by Sahar.
This commit is contained in:
parent
67dde47233
commit
1c553b962c
@ -235,7 +235,10 @@ public class Loto implements IBypassHandler
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addItem(item);
|
||||
final ItemInstance adenaupdate = player.getInventory().getItemByItemId(57);
|
||||
if (adenaupdate != null)
|
||||
{
|
||||
iu.addModifiedItem(adenaupdate);
|
||||
}
|
||||
player.sendPacket(iu);
|
||||
|
||||
filename = (npc.getHtmlPath(npcId, 6));
|
||||
|
@ -235,7 +235,10 @@ public class Loto implements IBypassHandler
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addItem(item);
|
||||
final ItemInstance adenaupdate = player.getInventory().getItemByItemId(57);
|
||||
if (adenaupdate != null)
|
||||
{
|
||||
iu.addModifiedItem(adenaupdate);
|
||||
}
|
||||
player.sendPacket(iu);
|
||||
|
||||
filename = (npc.getHtmlPath(npcId, 6));
|
||||
|
Loading…
Reference in New Issue
Block a user