Equipment slot refactor started.
This commit is contained in:
@@ -16,8 +16,6 @@ import engine.powers.EffectsBase;
|
||||
import engine.powers.poweractions.AbstractPowerAction;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class MobEquipment extends AbstractGameObject {
|
||||
@@ -58,39 +56,6 @@ public class MobEquipment extends AbstractGameObject {
|
||||
setMagicValue();
|
||||
}
|
||||
|
||||
public MobEquipment(ItemBase itemBase, int slot, int parentID, String pIDString, String sIDString, int pValue, int sValue) {
|
||||
super(MobEquipment.getNewID());
|
||||
this.itemBase = itemBase;
|
||||
this.templateID = this.itemBase.getUUID();
|
||||
this.template = ItemTemplate.itemTemplates.get(templateID);
|
||||
this.slot = slot;
|
||||
this.parentID = parentID;
|
||||
|
||||
//add effects
|
||||
this.prefix = PowersManager.getPowerActionByIDString(pIDString);
|
||||
this.suffix = PowersManager.getPowerActionByIDString(sIDString);
|
||||
|
||||
this.pValue = pValue;
|
||||
this.sValue = sValue;
|
||||
this.enchanted = this.prefix == null || this.suffix == null;
|
||||
setMagicValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
public MobEquipment(ResultSet rs) throws SQLException {
|
||||
super(MobEquipment.getNewID());
|
||||
int itemBaseID = rs.getInt("ItemID");
|
||||
this.itemBase = ItemBase.getItemBase(itemBaseID);
|
||||
this.templateID = this.itemBase.getUUID();
|
||||
this.template = ItemTemplate.itemTemplates.get(itemBaseID);
|
||||
this.slot = rs.getInt("slot");
|
||||
this.parentID = rs.getInt("mobID");
|
||||
setMagicValue();
|
||||
}
|
||||
|
||||
|
||||
public MobEquipment(int itemBaseID, float dropChance) {
|
||||
super(MobEquipment.getNewID());
|
||||
this.itemBase = ItemBase.getItemBase(itemBaseID);
|
||||
|
||||
Reference in New Issue
Block a user