Browse Source

removed non-gold drops form safehold mobs

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
dcc92fd89d
  1. 21
      src/engine/gameManager/LootManager.java

21
src/engine/gameManager/LootManager.java

@ -117,6 +117,7 @@ public enum LootManager { @@ -117,6 +117,7 @@ public enum LootManager {
float dropRate = NORMAL_DROP_RATE;
//roll the geenric world drop table
if(mob.parentZone.getSafeZone() == 0) {
GenerateLootDrop(mob, 1300);
if(ThreadLocalRandom.current().nextInt(1, 10000) == 5000) {
MobLoot extraLoot = rollForGlass(mob);
@ -124,10 +125,11 @@ public enum LootManager { @@ -124,10 +125,11 @@ public enum LootManager {
mob.getCharItemManager().addItemToInventory(extraLoot);
}
}
}
// Iterate all entries in this bootySet and process accordingly
boolean hasExtraRolled = false;
for (BootySetEntry bse : entries) {
switch (bse.bootyType) {
case "GOLD":
GenerateGoldDrop(mob, bse);
@ -135,8 +137,7 @@ public enum LootManager { @@ -135,8 +137,7 @@ public enum LootManager {
case "LOOT":
if (ThreadLocalRandom.current().nextInt(1, 100 + 1) < (bse.dropChance * dropRate))
GenerateLootDrop(mob, bse.genTable); //generate normal loot drop
if(mob.parentZone.getSafeZone() == 0) {
if (hasExtraRolled == false && ThreadLocalRandom.current().nextInt(1, 10000) < 5 * dropRate) {
if (mob.parentZone.getSafeZone() == 0 && hasExtraRolled == false && ThreadLocalRandom.current().nextInt(1, 10000) < 5 * dropRate) {
int roll = ThreadLocalRandom.current().nextInt(1, 101);
MobLoot extraLoot = null;
if (roll >= 1 && roll <= 50) {
@ -153,7 +154,6 @@ public enum LootManager { @@ -153,7 +154,6 @@ public enum LootManager {
}
hasExtraRolled = true;
}
}
break;
case "ITEM":
GenerateInventoryDrop(mob, bse);
@ -338,7 +338,9 @@ public enum LootManager { @@ -338,7 +338,9 @@ public enum LootManager {
public static void GenerateLootDrop(Mob mob, int tableID) {
try {
if(mob.parentZone.getSafeZone() == 1) {
return;
}
MobLoot toAdd = getGenTableItem(tableID, mob);
if(toAdd.getItemBase().getType().equals(Enum.ItemType.CONTRACT) || toAdd.getItemBase().getType().equals(Enum.ItemType.RUNE))
return;//block all contracts and runes that drop outside the confines of the new system
@ -354,6 +356,10 @@ public enum LootManager { @@ -354,6 +356,10 @@ public enum LootManager {
public static void GenerateEquipmentDrop(Mob mob) {
if(mob.parentZone.getSafeZone() == 1) {
return;
}
//do equipment here
int dropCount = 0;
if (mob.getEquip() != null)
@ -403,6 +409,10 @@ public enum LootManager { @@ -403,6 +409,10 @@ public enum LootManager {
public static void GenerateInventoryDrop(Mob mob, BootySetEntry bse) {
if(mob.parentZone.getSafeZone() == 1) {
return;
}
int chanceRoll = ThreadLocalRandom.current().nextInt(1, 100 + 1);
//early exit, failed to hit minimum chance roll
@ -501,6 +511,7 @@ public enum LootManager { @@ -501,6 +511,7 @@ public enum LootManager {
}
public static MobLoot rollForContract(int table, Mob mob){
int roll = 99;
if (table == 1900 || table == 1500)
roll = 73;

Loading…
Cancel
Save