|
|
|
@ -12,7 +12,7 @@ package engine.db.handlers;
@@ -12,7 +12,7 @@ package engine.db.handlers;
|
|
|
|
|
import engine.Enum; |
|
|
|
|
import engine.gameManager.DbManager; |
|
|
|
|
import engine.objects.Contract; |
|
|
|
|
import engine.objects.ItemBase; |
|
|
|
|
import engine.objects.ItemTemplate; |
|
|
|
|
import engine.objects.MobEquipment; |
|
|
|
|
import org.pmw.tinylog.Logger; |
|
|
|
|
|
|
|
|
@ -63,19 +63,16 @@ public class dbContractHandler extends dbHandlerBase {
@@ -63,19 +63,16 @@ public class dbContractHandler extends dbHandlerBase {
|
|
|
|
|
|
|
|
|
|
while (rs.next()) { |
|
|
|
|
|
|
|
|
|
//handle item base
|
|
|
|
|
int itemBaseID = rs.getInt("itembaseID"); |
|
|
|
|
int templateID = rs.getInt("itembaseID"); |
|
|
|
|
|
|
|
|
|
ItemBase ib = ItemBase.getItemBase(itemBaseID); |
|
|
|
|
|
|
|
|
|
if (ib != null) { |
|
|
|
|
|
|
|
|
|
MobEquipment me = new MobEquipment(ib, Enum.EquipSlotType.NONE, 0); |
|
|
|
|
MobEquipment me = new MobEquipment(ItemTemplate.templates.get(templateID), Enum.EquipSlotType.NONE, 0); |
|
|
|
|
contract.getSellInventory().add(me); |
|
|
|
|
|
|
|
|
|
//handle magic effects
|
|
|
|
|
|
|
|
|
|
String prefix = rs.getString("prefix"); |
|
|
|
|
int pRank = rs.getInt("pRank"); |
|
|
|
|
|
|
|
|
|
String suffix = rs.getString("suffix"); |
|
|
|
|
int sRank = rs.getInt("sRank"); |
|
|
|
|
|
|
|
|
@ -90,7 +87,6 @@ public class dbContractHandler extends dbHandlerBase {
@@ -90,7 +87,6 @@ public class dbContractHandler extends dbHandlerBase {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
Logger.error(e); |
|
|
|
|
} |
|
|
|
|