Check if item template exists on loading droplists.
This commit is contained in:
parent
882e9fb7a0
commit
9ad05be44a
@ -495,7 +495,7 @@
|
||||
<item id="1539" min="1" max="1" chance="93.258796448537" /> <!-- Major Healing Potion -->
|
||||
<item id="36537" min="1" max="1" chance="4.932587964485" /> <!-- Leather Braid -->
|
||||
<item id="36557" min="1" max="1" chance="1.644195988162" /> <!-- Accessory Gem -->
|
||||
<item id="49929" min="1" max="4" chance="0.164419598816" /> <!-- Spirit Stone -->
|
||||
<item id="45929" min="1" max="4" chance="0.164419598816" /> <!-- Spirit Stone -->
|
||||
</group>
|
||||
<group chance="20">
|
||||
<item id="8600" min="1" max="1" chance="50" /> <!-- Herb of Life -->
|
||||
|
@ -37,6 +37,7 @@ import org.w3c.dom.Node;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.AISkillScope;
|
||||
import com.l2jmobius.gameserver.enums.MpRewardAffectType;
|
||||
import com.l2jmobius.gameserver.enums.MpRewardType;
|
||||
@ -659,7 +660,11 @@ public class NpcData implements IGameXmlReader
|
||||
case "item":
|
||||
{
|
||||
final IDropItem dropItem = dropListScope.newDropItem(parseInteger(attrs, "id"), parseLong(attrs, "min"), parseLong(attrs, "max"), parseDouble(attrs, "chance"));
|
||||
if (dropItem != null)
|
||||
if (ItemTable.getInstance().getTemplate(parseInteger(attrs, "id")) == null)
|
||||
{
|
||||
LOGGER.warning("DropListItem: Could not find item with id " + parseInteger(attrs, "id") + ".");
|
||||
}
|
||||
else if (dropItem != null)
|
||||
{
|
||||
drops.add(dropItem);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@
|
||||
<item id="1539" min="1" max="1" chance="93.258796448537" /> <!-- Major Healing Potion -->
|
||||
<item id="36537" min="1" max="1" chance="4.932587964485" /> <!-- Leather Braid -->
|
||||
<item id="36557" min="1" max="1" chance="1.644195988162" /> <!-- Accessory Gem -->
|
||||
<item id="49929" min="1" max="4" chance="0.164419598816" /> <!-- Spirit Stone -->
|
||||
<item id="45929" min="1" max="4" chance="0.164419598816" /> <!-- Spirit Stone -->
|
||||
</group>
|
||||
<group chance="20">
|
||||
<item id="8600" min="1" max="1" chance="50" /> <!-- Herb of Life -->
|
||||
|
@ -37,6 +37,7 @@ import org.w3c.dom.Node;
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.util.CommonUtil;
|
||||
import com.l2jmobius.commons.util.IGameXmlReader;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.AISkillScope;
|
||||
import com.l2jmobius.gameserver.enums.MpRewardAffectType;
|
||||
import com.l2jmobius.gameserver.enums.MpRewardType;
|
||||
@ -659,7 +660,11 @@ public class NpcData implements IGameXmlReader
|
||||
case "item":
|
||||
{
|
||||
final IDropItem dropItem = dropListScope.newDropItem(parseInteger(attrs, "id"), parseLong(attrs, "min"), parseLong(attrs, "max"), parseDouble(attrs, "chance"));
|
||||
if (dropItem != null)
|
||||
if (ItemTable.getInstance().getTemplate(parseInteger(attrs, "id")) == null)
|
||||
{
|
||||
LOGGER.warning("DropListItem: Could not find item with id " + parseInteger(attrs, "id") + ".");
|
||||
}
|
||||
else if (dropItem != null)
|
||||
{
|
||||
drops.add(dropItem);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user