- Fixed appearance stones target item, to be available only for exact grade.
- Fixed char selection to be shown with appearance items; - Fixed private store sell, not to show 2 same items. - Added one missing referenced library to classpath.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* @author Erlandas
|
||||
*/
|
||||
@@ -44,17 +46,26 @@ public class AppearanceStone
|
||||
int _itemId;
|
||||
StoneType _type;
|
||||
AppearanceItemType _itemType;
|
||||
int _maxGrade;
|
||||
ArrayList<Integer> _grades;
|
||||
long _price;
|
||||
int _targetItem;
|
||||
long _timeForAppearance;
|
||||
int _maxGrade;
|
||||
|
||||
public AppearanceStone(int itemId, StoneType type, AppearanceItemType itemType, int maxGrade, long price, int targetItem, long timeForAppearance)
|
||||
public AppearanceStone(int itemId, StoneType type, AppearanceItemType itemType, ArrayList<Integer> grades, long price, int targetItem, long timeForAppearance)
|
||||
{
|
||||
_itemId = itemId;
|
||||
_type = type;
|
||||
_itemType = itemType;
|
||||
_maxGrade = maxGrade;
|
||||
_grades = grades;
|
||||
_maxGrade = grades.get(0);
|
||||
for (int gr : _grades)
|
||||
{
|
||||
if (_maxGrade < gr)
|
||||
{
|
||||
_maxGrade = gr;
|
||||
}
|
||||
}
|
||||
_price = price;
|
||||
_targetItem = targetItem;
|
||||
_timeForAppearance = timeForAppearance;
|
||||
@@ -75,6 +86,11 @@ public class AppearanceStone
|
||||
return _itemType;
|
||||
}
|
||||
|
||||
public ArrayList<Integer> getGrades()
|
||||
{
|
||||
return _grades;
|
||||
}
|
||||
|
||||
public int getMaxGrade()
|
||||
{
|
||||
return _maxGrade;
|
||||
|
||||
@@ -897,7 +897,7 @@ public class PcInventory extends Inventory
|
||||
{
|
||||
int[][] paperdoll = new int[33][4];
|
||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement2 = con.prepareStatement("SELECT object_id,item_id,loc_data,enchant_level FROM items WHERE owner_id=? AND loc='PAPERDOLL'"))
|
||||
PreparedStatement statement2 = con.prepareStatement("SELECT object_id,item_id,loc_data,enchant_level,appearance_id FROM items WHERE owner_id=? AND loc='PAPERDOLL'"))
|
||||
{
|
||||
statement2.setInt(1, objectId);
|
||||
try (ResultSet invdata = statement2.executeQuery())
|
||||
@@ -908,6 +908,7 @@ public class PcInventory extends Inventory
|
||||
paperdoll[slot][0] = invdata.getInt("object_id");
|
||||
paperdoll[slot][1] = invdata.getInt("item_id");
|
||||
paperdoll[slot][2] = invdata.getInt("enchant_level");
|
||||
paperdoll[slot][3] = invdata.getInt("appearance_id");
|
||||
/*
|
||||
* if (slot == Inventory.PAPERDOLL_RHAND) { paperdoll[Inventory.PAPERDOLL_RHAND][0] = invdata.getInt("object_id"); paperdoll[Inventory.PAPERDOLL_RHAND][1] = invdata.getInt("item_id"); paperdoll[Inventory.PAPERDOLL_RHAND][2] = invdata.getInt("enchant_level"); }
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user