forked from MagicBane/Server
enable r8 hotzone
This commit is contained in:
@@ -26,6 +26,7 @@ public class HotzoneManager {
|
|||||||
hotzoneMob.killCharacter("Hotzone Over");
|
hotzoneMob.killCharacter("Hotzone Over");
|
||||||
hotzoneMob.despawn();
|
hotzoneMob.despawn();
|
||||||
hotzoneMob.spawnTime = 1000000000;
|
hotzoneMob.spawnTime = 1000000000;
|
||||||
|
DbManager.MobQueries.DELETE_MOB( hotzoneMob);
|
||||||
}
|
}
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
Zone newHotzone = null;
|
Zone newHotzone = null;
|
||||||
@@ -97,7 +98,7 @@ public class HotzoneManager {
|
|||||||
if (rune != null)
|
if (rune != null)
|
||||||
mob.getCharItemManager().addItemToInventory(rune);
|
mob.getCharItemManager().addItemToInventory(rune);
|
||||||
}
|
}
|
||||||
}else if (roll >= 76 && roll <= 89){
|
} else if (roll >= 50 && roll <= 89) {
|
||||||
//30,35 or 40
|
//30,35 or 40
|
||||||
roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_mid.size() + 1);
|
roll = ThreadLocalRandom.current().nextInt(HellgateManager.static_rune_ids_mid.size() + 1);
|
||||||
itemId = HellgateManager.static_rune_ids_mid.get(0);
|
itemId = HellgateManager.static_rune_ids_mid.get(0);
|
||||||
@@ -130,10 +131,9 @@ public class HotzoneManager {
|
|||||||
mob.getCharItemManager().addItemToInventory(rune);
|
mob.getCharItemManager().addItemToInventory(rune);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
roll = ThreadLocalRandom.current().nextInt(1, 101);
|
||||||
if (roll >= 95) {
|
if (roll >= 95) {
|
||||||
//glass
|
//glass
|
||||||
int glassRoll = ThreadLocalRandom.current().nextInt(1,101);
|
|
||||||
if(glassRoll < 5){
|
|
||||||
int glassID = LootManager.rollRandomItem(126);
|
int glassID = LootManager.rollRandomItem(126);
|
||||||
ItemBase glassItem = ItemBase.getItemBase(glassID);
|
ItemBase glassItem = ItemBase.getItemBase(glassID);
|
||||||
if (glassItem != null) {
|
if (glassItem != null) {
|
||||||
@@ -143,8 +143,22 @@ public class HotzoneManager {
|
|||||||
mob.getCharItemManager().addItemToInventory(glass);
|
mob.getCharItemManager().addItemToInventory(glass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
roll = ThreadLocalRandom.current().nextInt(1, 101);
|
||||||
|
if (roll >= 95) {
|
||||||
|
//r8 banescroll
|
||||||
|
int baneID = 910018;
|
||||||
|
ItemBase baneItem = ItemBase.getItemBase(baneID);
|
||||||
|
if (baneItem != null) {
|
||||||
|
MobLoot bane = new MobLoot(mob, baneItem, true);
|
||||||
|
|
||||||
|
if (bane != null)
|
||||||
|
mob.getCharItemManager().addItemToInventory(bane);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
roll = ThreadLocalRandom.current().nextInt(1, 101);
|
||||||
|
if (roll >= 95) {
|
||||||
//guard captain
|
//guard captain
|
||||||
roll = ThreadLocalRandom.current().nextInt(LootManager.racial_guard_uuids.size() + 1);
|
roll = ThreadLocalRandom.current().nextInt(LootManager.racial_guard_uuids.size() + 1);
|
||||||
itemId = LootManager.racial_guard_uuids.get(0);
|
itemId = LootManager.racial_guard_uuids.get(0);
|
||||||
@@ -161,6 +175,7 @@ public class HotzoneManager {
|
|||||||
mob.getCharItemManager().addItemToInventory(rune);
|
mob.getCharItemManager().addItemToInventory(rune);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ClearHotzone(){
|
public static void ClearHotzone(){
|
||||||
ZoneManager.hotZone = null;
|
ZoneManager.hotZone = null;
|
||||||
|
|||||||
@@ -534,8 +534,8 @@ public class WorldServer {
|
|||||||
printThreads();
|
printThreads();
|
||||||
Logger.info("Threads Running:");
|
Logger.info("Threads Running:");
|
||||||
|
|
||||||
//Logger.info("Starting Hotzone...");
|
Logger.info("Starting Hotzone...");
|
||||||
//HotzoneManager.SelectRandomHotzone();
|
HotzoneManager.SelectRandomHotzone();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class HourlyJobThread implements Runnable {
|
|||||||
|
|
||||||
ConcurrentHashMap<Integer, AbstractGameObject> map = DbManager.getMap(Enum.GameObjectType.City);
|
ConcurrentHashMap<Integer, AbstractGameObject> map = DbManager.getMap(Enum.GameObjectType.City);
|
||||||
|
|
||||||
//HotzoneManager.SelectRandomHotzone();
|
HotzoneManager.SelectRandomHotzone();
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
|
|
||||||
for (AbstractGameObject ago : map.values()) {
|
for (AbstractGameObject ago : map.values()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user