drop rate work
This commit is contained in:
@@ -55,7 +55,7 @@ public class SimulateBootyCmd extends AbstractDevCmd {
|
||||
int failures = 0;
|
||||
int goldAmount = 0;
|
||||
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
for (int i = 0; i < 10000; ++i) {
|
||||
|
||||
try {
|
||||
mob.loadInventory();
|
||||
@@ -83,7 +83,11 @@ public class SimulateBootyCmd extends AbstractDevCmd {
|
||||
goldAmount += lootItem.getNumOfItems();
|
||||
break;
|
||||
default:
|
||||
OtherDrops.add(lootItem);
|
||||
if(Warehouse.maxResources.containsKey(lootItem.getItemBaseID())){
|
||||
Resources.add(lootItem);
|
||||
} else {
|
||||
OtherDrops.add(lootItem);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,9 +200,13 @@ public enum LootManager {
|
||||
|
||||
if (ItemBase.getItemBase(itemUUID).getType().ordinal() == Enum.ItemType.RESOURCE.ordinal()) {
|
||||
int chance = ThreadLocalRandom.current().nextInt(1,101);
|
||||
if(chance > 5)
|
||||
if(chance > 10)
|
||||
return null;
|
||||
int amount = ThreadLocalRandom.current().nextInt(tableRow.minSpawn, tableRow.maxSpawn + 1);
|
||||
int amount = ThreadLocalRandom.current().nextInt((int)(tableRow.minSpawn * 0.5f), (int)((tableRow.maxSpawn + 1) * 0.5f));
|
||||
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " HAS FOUND " + amount + " " + ItemBase.getItemBase(itemUUID).getName() + ". ");
|
||||
chatMsg.setMessageType(10);
|
||||
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
|
||||
DispatchMessage.dispatchMsgToAll(chatMsg);
|
||||
return new MobLoot(mob, ItemBase.getItemBase(itemUUID), amount, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -249,6 +249,9 @@ public class MobAI {
|
||||
if(target.isPet() && target.isAlive() == false && target.guardCaptain.isAlive() == true){
|
||||
mob.setCombatTarget(target.guardCaptain);
|
||||
}
|
||||
if(target.level > 75){
|
||||
AttackMob(target,mob);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: AttackMob" + " " + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user