forked from MagicBane/Server
Begin constructor refactor
This commit is contained in:
@@ -572,8 +572,8 @@ public enum BuildingManager {
|
||||
|
||||
String pirateName = NPCManager.getPirateName(contract.getMobbaseID());
|
||||
|
||||
if (item.getChargesRemaining() > 0)
|
||||
rank = item.getChargesRemaining() * 10;
|
||||
if ((byte) item.chargesRemaining > 0)
|
||||
rank = (byte) item.chargesRemaining * 10;
|
||||
else
|
||||
rank = 10;
|
||||
|
||||
|
||||
@@ -612,7 +612,7 @@ public enum ChatManager {
|
||||
name = amount + " gold ";
|
||||
else {
|
||||
String vowels = "aeiou";
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(item.getItemBaseID());
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(item.getTemplsteID());
|
||||
String iName = template.item_base_name;
|
||||
if (iName.length() > 0)
|
||||
if (vowels.indexOf(iName.substring(0, 1).toLowerCase()) >= 0)
|
||||
|
||||
@@ -87,7 +87,7 @@ public enum LootManager {
|
||||
if (ib == null)
|
||||
break;
|
||||
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(it.getItemBaseID());
|
||||
ItemTemplate template = ItemTemplate.itemTemplates.get(it.getTemplsteID());
|
||||
|
||||
if (ib.isDiscRune() || template.item_base_name.toLowerCase().contains("of the gods")) {
|
||||
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + template.item_base_name + ". Are you tough enough to take it?");
|
||||
@@ -354,7 +354,7 @@ public enum LootManager {
|
||||
|
||||
if (ml != null && dropCount < 1) {
|
||||
ml.setIsID(true);
|
||||
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
|
||||
ml.setDurabilityCurrent((short) ((short) ml.durabilityCurrent - ThreadLocalRandom.current().nextInt(5) + 1));
|
||||
mob.getCharItemManager().addItemToInventory(ml);
|
||||
dropCount = 1;
|
||||
//break; // Exit on first successful roll.
|
||||
@@ -383,8 +383,8 @@ public enum LootManager {
|
||||
|
||||
int tableID = 0;
|
||||
|
||||
if (_bootySetMap.get(gift.getItemBaseID()) != null)
|
||||
tableID = _bootySetMap.get(gift.getItemBaseID()).get(ThreadLocalRandom.current().nextInt(_bootySetMap.get(gift.getItemBaseID()).size())).genTable;
|
||||
if (_bootySetMap.get(gift.getTemplsteID()) != null)
|
||||
tableID = _bootySetMap.get(gift.getTemplsteID()).get(ThreadLocalRandom.current().nextInt(_bootySetMap.get(gift.getTemplsteID()).size())).genTable;
|
||||
|
||||
if (tableID == 0)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user