universal rune drops
This commit is contained in:
@@ -258,38 +258,48 @@ public enum LootManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void SpecialCaseRuneDrop(Mob mob,ArrayList<BootySetEntry> entries){
|
public static void SpecialCaseRuneDrop(Mob mob,ArrayList<BootySetEntry> entries){
|
||||||
int lootTableID = 0;
|
// int lootTableID = 0;
|
||||||
for(BootySetEntry entry : entries){
|
// for(BootySetEntry entry : entries){
|
||||||
if(entry.bootyType.equals("LOOT")){
|
// if(entry.bootyType.equals("LOOT")){
|
||||||
lootTableID = entry.genTable;
|
// lootTableID = entry.genTable;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//if(lootTableID == 0)
|
||||||
|
// return;
|
||||||
|
//
|
||||||
|
//int RuneTableID = 0;
|
||||||
|
//for(GenTableEntry entry : _genTables.get(lootTableID)){
|
||||||
|
// try {
|
||||||
|
// if (ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RUNE)) {
|
||||||
|
// RuneTableID = entry.itemTableID;
|
||||||
|
// break;
|
||||||
|
/// }
|
||||||
|
// }catch(Exception e){
|
||||||
|
|
||||||
if(lootTableID == 0)
|
// }
|
||||||
return;
|
//}
|
||||||
|
|
||||||
int RuneTableID = 0;
|
//if(RuneTableID == 0)
|
||||||
for(GenTableEntry entry : _genTables.get(lootTableID)){
|
// return;
|
||||||
try {
|
|
||||||
if (ItemBase.getItemBase(_itemTables.get(entry.itemTableID).get(0).cacheID).getType().equals(Enum.ItemType.RUNE)) {
|
|
||||||
RuneTableID = entry.itemTableID;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}catch(Exception e){
|
|
||||||
|
|
||||||
}
|
NPC RuneMerchant = NPC.getNPC(801321);
|
||||||
}
|
if(RuneMerchant != null) {
|
||||||
|
ArrayList<MobEquipment> runeItems = RuneMerchant.contract.getSellInventory();
|
||||||
if(RuneTableID == 0)
|
int roll = ThreadLocalRandom.current().nextInt(0, runeItems.size());
|
||||||
return;
|
MobEquipment me = runeItems.get(roll);
|
||||||
|
if (me != null) {
|
||||||
ItemBase ib = ItemBase.getItemBase(rollRandomItem(RuneTableID));
|
ItemBase ib = me.getItemBase();
|
||||||
if(ib != null){
|
if (ib != null) {
|
||||||
MobLoot toAdd = new MobLoot(mob,ib,false);
|
MobLoot toAdd = new MobLoot(mob, ib, false);
|
||||||
mob.getCharItemManager().addItemToInventory(toAdd);
|
mob.getCharItemManager().addItemToInventory(toAdd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static void SpecialCaseResourceDrop(Mob mob,ArrayList<BootySetEntry> entries){
|
public static void SpecialCaseResourceDrop(Mob mob,ArrayList<BootySetEntry> entries){
|
||||||
int lootTableID = 0;
|
int lootTableID = 0;
|
||||||
@@ -572,7 +582,7 @@ public enum LootManager {
|
|||||||
ItemBase itemBase = me.getItemBase();
|
ItemBase itemBase = me.getItemBase();
|
||||||
if(isVorg) {
|
if(isVorg) {
|
||||||
mob.spawnTime = ThreadLocalRandom.current().nextInt(300, 2700);
|
mob.spawnTime = ThreadLocalRandom.current().nextInt(300, 2700);
|
||||||
dropChance = 10;
|
dropChance = 7.5f;
|
||||||
itemBase = getRandomVorg(itemBase);
|
itemBase = getRandomVorg(itemBase);
|
||||||
}
|
}
|
||||||
if (equipmentRoll > dropChance)
|
if (equipmentRoll > dropChance)
|
||||||
@@ -708,7 +718,7 @@ public enum LootManager {
|
|||||||
public static ItemBase getRandomVorg(ItemBase itemBase){
|
public static ItemBase getRandomVorg(ItemBase itemBase){
|
||||||
int roll = 0;
|
int roll = 0;
|
||||||
if(vorg_ha_uuids.contains(itemBase.getUUID())) {
|
if(vorg_ha_uuids.contains(itemBase.getUUID())) {
|
||||||
roll = ThreadLocalRandom.current().nextInt(0, 10);
|
roll = ThreadLocalRandom.current().nextInt(0, 9);
|
||||||
switch (roll) {
|
switch (roll) {
|
||||||
case 1:
|
case 1:
|
||||||
return ItemBase.getItemBase(vorg_ha_uuids.get(0));
|
return ItemBase.getItemBase(vorg_ha_uuids.get(0));
|
||||||
@@ -732,7 +742,7 @@ public enum LootManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(vorg_ma_uuids.contains(itemBase.getUUID())) {
|
if(vorg_ma_uuids.contains(itemBase.getUUID())) {
|
||||||
roll = ThreadLocalRandom.current().nextInt(0, 10);
|
roll = ThreadLocalRandom.current().nextInt(0, 8);
|
||||||
switch (roll) {
|
switch (roll) {
|
||||||
case 1:
|
case 1:
|
||||||
return ItemBase.getItemBase(vorg_ma_uuids.get(0));
|
return ItemBase.getItemBase(vorg_ma_uuids.get(0));
|
||||||
@@ -754,7 +764,7 @@ public enum LootManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(vorg_la_uuids.contains(itemBase.getUUID())) {
|
if(vorg_la_uuids.contains(itemBase.getUUID())) {
|
||||||
roll = ThreadLocalRandom.current().nextInt(0, 10);
|
roll = ThreadLocalRandom.current().nextInt(0, 8);
|
||||||
switch (roll) {
|
switch (roll) {
|
||||||
case 1:
|
case 1:
|
||||||
return ItemBase.getItemBase(vorg_la_uuids.get(0));
|
return ItemBase.getItemBase(vorg_la_uuids.get(0));
|
||||||
@@ -776,7 +786,7 @@ public enum LootManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(vorg_cloth_uuids.contains(itemBase.getUUID())) {
|
if(vorg_cloth_uuids.contains(itemBase.getUUID())) {
|
||||||
roll = ThreadLocalRandom.current().nextInt(0, 10);
|
roll = ThreadLocalRandom.current().nextInt(0, 5);
|
||||||
switch (roll) {
|
switch (roll) {
|
||||||
case 1:
|
case 1:
|
||||||
return ItemBase.getItemBase(vorg_cloth_uuids.get(0));
|
return ItemBase.getItemBase(vorg_cloth_uuids.get(0));
|
||||||
|
|||||||
Reference in New Issue
Block a user