Added more a full inventory to NPCs, selectable on two tabs and double-point values for NPC droprates.

This commit is contained in:
luisc committed 2022-01-27 03:50:36 -06:00
1 parent f14337f1bb
commit 989effb5c5
6 files changed
+116 -48

No files matched your search

@@ -532,7 +532,7 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
* @param slot The slot from the NPC's drop list to return (0-8)
* @return The chance of dropping the item in this slot. Returns 100 if the slot is not found.
*/
public int getLootChance(int slot) {
public double getLootChance(int slot) {
if(!npc.inventory.dropchance.containsKey(slot))
return 100;
@@ -544,8 +544,8 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
* @param slot The slot from the NPC's drop list to change
* @param chance The new chance of dropping the item in this slot
*/
public void setLootChance(int slot, int chance) {
if(slot < 0 || slot > 8)
public void setLootChance(int slot, double chance) {
if(!npc.inventory.dropchance.containsKey(slot))
return;
if(chance < 0)