Addition of NpcTemplate removeDrops method.

This commit is contained in:
MobiusDevelopment
2022-02-22 22:16:52 +00:00
parent dbc0d906d0
commit 86c4d5cd5c
46 changed files with 184 additions and 0 deletions

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -632,6 +632,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -588,6 +588,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -632,6 +632,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -588,6 +588,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -650,6 +650,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -650,6 +650,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -614,6 +614,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -650,6 +650,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -617,6 +617,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -665,6 +665,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -617,6 +617,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -665,6 +665,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -617,6 +617,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -665,6 +665,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -624,6 +624,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Drops are sorted by chance (high to low). // Drops are sorted by chance (high to low).
Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance())));
for (DropHolder dropHolder : dropLists) for (DropHolder dropHolder : dropLists)

View File

@ -649,6 +649,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -620,6 +620,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Add LCoin drop for bosses. // Add LCoin drop for bosses.
if (type.contains("boss")) if (type.contains("boss"))
{ {

View File

@ -664,6 +664,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -620,6 +620,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Add LCoin drop for bosses. // Add LCoin drop for bosses.
if (type.contains("boss")) if (type.contains("boss"))
{ {

View File

@ -664,6 +664,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)

View File

@ -620,6 +620,8 @@ public class NpcData implements IXmlReader
if (dropLists != null) if (dropLists != null)
{ {
template.removeDrops();
// Add LCoin drop for bosses. // Add LCoin drop for bosses.
if (type.contains("boss")) if (type.contains("boss"))
{ {

View File

@ -664,6 +664,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; _ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null;
} }
public void removeDrops()
{
_dropListDeath = null;
_dropListSpoil = null;
}
public void addDrop(DropHolder dropHolder) public void addDrop(DropHolder dropHolder)
{ {
if (_dropListDeath == null) if (_dropListDeath == null)