Possible fix for duplicated drop lists issue.
This commit is contained in:
parent
b5e821c313
commit
4597d64b3d
@ -689,12 +689,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
@ -689,12 +689,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
@ -689,12 +689,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
@ -689,12 +689,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
private Map<AISkillScope, List<Skill>> _aiSkillLists;
|
private Map<AISkillScope, List<Skill>> _aiSkillLists;
|
||||||
private Set<Integer> _clans;
|
private Set<Integer> _clans;
|
||||||
private Set<Integer> _ignoreClanNpcIds;
|
private Set<Integer> _ignoreClanNpcIds;
|
||||||
private CopyOnWriteArrayList<DropHolder> _dropListDeath;
|
private List<DropHolder> _dropListDeath;
|
||||||
private CopyOnWriteArrayList<DropHolder> _dropListSpoil;
|
private List<DropHolder> _dropListSpoil;
|
||||||
private double _collisionRadiusGrown;
|
private double _collisionRadiusGrown;
|
||||||
private double _collisionHeightGrown;
|
private double _collisionHeightGrown;
|
||||||
|
|
||||||
@ -546,12 +546,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
@ -689,12 +689,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
|||||||
|
|
||||||
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
public Collection<ItemHolder> calculateDrops(DropType dropType, L2Character victim, L2Character killer)
|
||||||
{
|
{
|
||||||
final List<DropHolder> dropList = getDropList(dropType);
|
if (getDropList(dropType) == null)
|
||||||
if (dropList == null)
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final List<DropHolder> dropList = new ArrayList<>(getDropList(dropType));
|
||||||
|
|
||||||
// randomize drop order
|
// randomize drop order
|
||||||
Collections.shuffle(dropList);
|
Collections.shuffle(dropList);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user