Fix NPE in WhatDropsFromCommand (#299)
This commit is contained in:
@@ -59,7 +59,7 @@ public class WhatDropsFromCommand extends Command {
|
|||||||
for (MonsterDropEntry drop : MapleMonsterInformationProvider.getInstance().retrieveDrop(mobId)){
|
for (MonsterDropEntry drop : MapleMonsterInformationProvider.getInstance().retrieveDrop(mobId)){
|
||||||
try {
|
try {
|
||||||
String name = MapleItemInformationProvider.getInstance().getName(drop.itemId);
|
String name = MapleItemInformationProvider.getInstance().getName(drop.itemId);
|
||||||
if (name.equals("null") || drop.chance == 0){
|
if (name == null || name.equals("null") || drop.chance == 0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float chance = 1000000 / drop.chance / player.getDropRate();
|
float chance = 1000000 / drop.chance / player.getDropRate();
|
||||||
|
|||||||
Reference in New Issue
Block a user