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