Addition of NpcTemplate removeDrops method.
This commit is contained in:
		| @@ -614,6 +614,8 @@ public class NpcData implements IXmlReader | ||||
| 						 | ||||
| 						if (dropLists != null) | ||||
| 						{ | ||||
| 							template.removeDrops(); | ||||
| 							 | ||||
| 							// Drops are sorted by chance (high to low). | ||||
| 							Collections.sort(dropLists, (d1, d2) -> Double.valueOf(d2.getChance()).compareTo(Double.valueOf(d1.getChance()))); | ||||
| 							for (DropHolder dropHolder : dropLists) | ||||
|   | ||||
| @@ -650,6 +650,12 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable | ||||
| 		_ignoreClanNpcIds = ignoreClanNpcIds != null ? Collections.unmodifiableSet(ignoreClanNpcIds) : null; | ||||
| 	} | ||||
| 	 | ||||
| 	public void removeDrops() | ||||
| 	{ | ||||
| 		_dropListDeath = null; | ||||
| 		_dropListSpoil = null; | ||||
| 	} | ||||
| 	 | ||||
| 	public void addDrop(DropHolder dropHolder) | ||||
| 	{ | ||||
| 		if (_dropListDeath == null) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment