Browse Source

replace rune with wrapped rune

lakebane
FatBoy-DOTC 2 weeks ago
parent
commit
0e3e334cc1
  1. 101
      src/engine/gameManager/HotzoneManager.java

101
src/engine/gameManager/HotzoneManager.java

@ -24,7 +24,6 @@ public class HotzoneManager { @@ -24,7 +24,6 @@ public class HotzoneManager {
public static boolean three_quarter_health = false;
public static boolean half_health = false;
public static boolean quarter_health = false;
public static long lastAnnounce = 0L;
public static void SelectRandomHotzone(){
if(hotzoneMob != null){
hotzoneMob.killCharacter("Hotzone Over");
@ -92,56 +91,67 @@ public class HotzoneManager { @@ -92,56 +91,67 @@ public class HotzoneManager {
Random random = new Random();
int roll = random.nextInt(100);
int itemId;
ItemBase runeBase;
if (roll >= 90) {
//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) {
// 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);
// }
// 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) {
// 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) {
// 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);
// }
// runeBase = ItemBase.getItemBase(itemId);
// if (runeBase != null) {
// MobLoot rune = new MobLoot(mob, runeBase, true);
if (rune != null)
mob.getCharItemManager().addItemToInventory(rune);
}
} else {
// 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) {
// 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);
// }
// runeBase = ItemBase.getItemBase(itemId);
// if (runeBase != null) {
// MobLoot rune = new MobLoot(mob, runeBase, true);
if (rune != null)
mob.getCharItemManager().addItemToInventory(rune);
}
// if (rune != null)
// mob.getCharItemManager().addItemToInventory(rune);
// }
//}
//wrapped rune:
ItemBase runeBase = ItemBase.getItemBase(971070);
if (runeBase != null) {
MobLoot rune = new MobLoot(mob, runeBase, true);
if (rune != null)
mob.getCharItemManager().addItemToInventory(rune);
}
roll = ThreadLocalRandom.current().nextInt(1, 101);
if (roll >= 95) {
//glass
@ -238,14 +248,7 @@ public class HotzoneManager { @@ -238,14 +248,7 @@ public class HotzoneManager {
DispatchMessage.dispatchMsgToAll(chatMsg);
}else if (health > 75000){
//mob at 75% - 100% health
if(lastAnnounce + MBServerStatics.FIVE_MINUTES < System.currentTimeMillis()){
lastAnnounce = System.currentTimeMillis();
String name = hotzoneMob.getName();
ChatSystemMsg chatMsg = new ChatSystemMsg(null, name + " In The Hotzone Is Still Alive");
chatMsg.setMessageType(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
}
}
}

Loading…
Cancel
Save