Browse Source

replace rune with wrapped rune

lakebane
FatBoy-DOTC 2 weeks ago
parent
commit
9caeb80ccc
  1. 54
      src/engine/gameManager/HotzoneManager.java
  2. 66
      src/engine/gameManager/LootManager.java

54
src/engine/gameManager/HotzoneManager.java

@ -89,59 +89,8 @@ public class HotzoneManager { @@ -89,59 +89,8 @@ public class HotzoneManager {
public static void GenerateHotzoneEpicLoot(Mob mob) {
mob.getCharItemManager().clearInventory();
Random random = new Random();
int roll = random.nextInt(100);
int roll;
int itemId;
//ItemBase runeBase;
// if (roll >= 90) {
//35 or 40
// roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_high.size() + 1);
// itemId = HellgateManager.static_rune_ids_high.get(0);
// try {
// itemId = HellgateManager.static_rune_ids_high.get(roll);
// } catch (Exception e) {
// }
// runeBase = ItemBase.getItemBase(itemId);
// if (runeBase != null) {
// MobLoot rune = new MobLoot(mob, runeBase, true);
// if (rune != null)
// mob.getCharItemManager().addItemToInventory(rune);
// }
//} else if (roll >= 65 && roll <= 89) {
//30,35 or 40
// roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_mid.size() + 1);
// itemId = HellgateManager.static_rune_ids_mid.get(0);
// try {
// itemId = HellgateManager.static_rune_ids_mid.get(roll);
// } catch (Exception e) {
// }
// runeBase = ItemBase.getItemBase(itemId);
// if (runeBase != null) {
// MobLoot rune = new MobLoot(mob, runeBase, true);
// if (rune != null)
// mob.getCharItemManager().addItemToInventory(rune);
// }
// } else {
//5-30
// roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_low.size() + 1);
// itemId = HellgateManager.static_rune_ids_low.get(0);
// try {
// itemId = HellgateManager.static_rune_ids_low.get(roll);
// } catch (Exception ignored) {
// }
// runeBase = ItemBase.getItemBase(itemId);
// if (runeBase != null) {
// MobLoot rune = new MobLoot(mob, runeBase, true);
// if (rune != null)
// mob.getCharItemManager().addItemToInventory(rune);
// }
//}
//wrapped rune:
ItemBase runeBase = ItemBase.getItemBase(971070);
if (runeBase != null) {
@ -151,7 +100,6 @@ public class HotzoneManager { @@ -151,7 +100,6 @@ public class HotzoneManager {
mob.getCharItemManager().addItemToInventory(rune);
}
roll = ThreadLocalRandom.current().nextInt(1, 101);
if (roll >= 95) {
//glass

66
src/engine/gameManager/LootManager.java

@ -17,10 +17,7 @@ import engine.objects.*; @@ -17,10 +17,7 @@ import engine.objects.*;
import engine.server.MBServerStatics;
import org.pmw.tinylog.Logger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
/**
@ -614,17 +611,58 @@ public enum LootManager { @@ -614,17 +611,58 @@ public enum LootManager {
return;
switch (ib.getUUID()) {
case 971070: //wrapped rune
ItemBase runeBase = null;
int roll = ThreadLocalRandom.current().nextInt(static_rune_ids.size() + 1);
int itemId = static_rune_ids.get(0);
try {
itemId = static_rune_ids.get(roll);
}catch(Exception e){
Random random = new Random();
int roll = random.nextInt(100);
int itemId;
ItemBase runeBase;
if (roll >= 90) {
//35 or 40
roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_high.size() + 1);
itemId = HellgateManager.static_rune_ids_high.get(0);
try {
itemId = HellgateManager.static_rune_ids_high.get(roll);
} catch (Exception e) {
}
runeBase = ItemBase.getItemBase(itemId);
if(runeBase != null) {
winnings = new MobLoot(playerCharacter, runeBase, 1, false);
}
runeBase = ItemBase.getItemBase(itemId);
if (runeBase != null) {
MobLoot rune = new MobLoot(playerCharacter, runeBase, true);
if (rune != null)
playerCharacter.getCharItemManager().addItemToInventory(rune);
}
} else if (roll >= 65 && roll <= 89) {
//30,35 or 40
roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_mid.size() + 1);
itemId = HellgateManager.static_rune_ids_mid.get(0);
try {
itemId = HellgateManager.static_rune_ids_mid.get(roll);
} catch (Exception e) {
}
runeBase = ItemBase.getItemBase(itemId);
if (runeBase != null) {
MobLoot rune = new MobLoot(playerCharacter, runeBase, true);
if (rune != null)
playerCharacter.getCharItemManager().addItemToInventory(rune);
}
} else {
//5-30
roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_low.size() + 1);
itemId = HellgateManager.static_rune_ids_low.get(0);
try {
itemId = HellgateManager.static_rune_ids_low.get(roll);
} catch (Exception ignored) {
}
runeBase = ItemBase.getItemBase(itemId);
if (runeBase != null) {
MobLoot rune = new MobLoot(playerCharacter, runeBase, true);
if (rune != null)
playerCharacter.getCharItemManager().addItemToInventory(rune);
}
}
break;
case 971012: //wrapped glass

Loading…
Cancel
Save