vorg HA fix
This commit is contained in:
@@ -375,13 +375,18 @@ public enum LootManager {
|
|||||||
}
|
}
|
||||||
MobLoot ml = new MobLoot(mob, genericIB, false);
|
MobLoot ml = new MobLoot(mob, genericIB, false);
|
||||||
|
|
||||||
if (ml != null && dropCount < 1) {
|
if (ml != null && dropCount < 1 && genericIB.isVorg() == false) {
|
||||||
ml.setIsID(true);
|
ml.setIsID(true);
|
||||||
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
|
ml.setDurabilityCurrent((short) (ml.getDurabilityCurrent() - ThreadLocalRandom.current().nextInt(5) + 1));
|
||||||
mob.getCharItemManager().addItemToInventory(ml);
|
mob.getCharItemManager().addItemToInventory(ml);
|
||||||
dropCount = 1;
|
dropCount = 1;
|
||||||
//break; // Exit on first successful roll.
|
//break; // Exit on first successful roll.
|
||||||
}
|
}
|
||||||
|
if(ml != null && genericIB.isVorg()){
|
||||||
|
ml.setIsID(true);
|
||||||
|
ml.setDurabilityCurrent(ml.getDurabilityMax());
|
||||||
|
mob.getCharItemManager().addItemToInventory(ml);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ public class Item extends AbstractWorldObject {
|
|||||||
this.customName = name;
|
this.customName = name;
|
||||||
|
|
||||||
loadEnchantments();
|
loadEnchantments();
|
||||||
bakeInStats();
|
if(this.getItemBase().isVorg() == false)
|
||||||
|
bakeInStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item(ItemBase itemBase, int ownerID,
|
public Item(ItemBase itemBase, int ownerID,
|
||||||
@@ -1232,15 +1233,6 @@ public class Item extends AbstractWorldObject {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.getItemBase() != null)
|
if (this.getItemBase() != null)
|
||||||
if(this.getItemBase().isVorg()){
|
|
||||||
this.getEnchants().clear();
|
|
||||||
for(String powerString : this.getItemBase().getVorgStats()){
|
|
||||||
//AbstractPowerAction apa = PowersManager.getPowerActionByIDString(powerString);
|
|
||||||
//apa.applyBakedInStatsForItem(this, 0);
|
|
||||||
this.addPermanentEnchantment(powerString,0);
|
|
||||||
}
|
|
||||||
this.setName(this.getItemBase().getName());
|
|
||||||
}else {
|
|
||||||
for (Integer token : this.getItemBase().getBakedInStats().keySet()) {
|
for (Integer token : this.getItemBase().getBakedInStats().keySet()) {
|
||||||
|
|
||||||
effect = PowersManager.getEffectByToken(token);
|
effect = PowersManager.getEffectByToken(token);
|
||||||
@@ -1253,7 +1245,6 @@ public class Item extends AbstractWorldObject {
|
|||||||
apa.applyBakedInStatsForItem(this, this.getItemBase().getBakedInStats().get(token));
|
apa.applyBakedInStatsForItem(this, this.getItemBase().getBakedInStats().get(token));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void loadEnchantments() {
|
public final void loadEnchantments() {
|
||||||
|
|||||||
@@ -164,6 +164,13 @@ public final class MobLoot extends Item {
|
|||||||
item.addPermanentEnchantment(this.suffix, 0);
|
item.addPermanentEnchantment(this.suffix, 0);
|
||||||
|
|
||||||
this.junk();
|
this.junk();
|
||||||
|
if (item.getItemBase().isVorg()) {
|
||||||
|
item.getEnchants().clear();
|
||||||
|
for (String powerString : item.getItemBase().getVorgStats()) {
|
||||||
|
item.addPermanentEnchantment(powerString, 0);
|
||||||
|
}
|
||||||
|
this.setName(item.getItemBase().getName());
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user