- 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:
@@ -5,6 +5,7 @@
|
|||||||
<classpathentry kind="lib" path="dist/libs/javolution-5.5.1.jar" sourcepath="dist/libs/javolution-5.5.1-src.zip"/>
|
<classpathentry kind="lib" path="dist/libs/javolution-5.5.1.jar" sourcepath="dist/libs/javolution-5.5.1-src.zip"/>
|
||||||
<classpathentry kind="lib" path="dist/libs/mysql-connector-java-5.1.34-bin.jar"/>
|
<classpathentry kind="lib" path="dist/libs/mysql-connector-java-5.1.34-bin.jar"/>
|
||||||
<classpathentry kind="lib" path="dist/libs/ecj-4.4.jar"/>
|
<classpathentry kind="lib" path="dist/libs/ecj-4.4.jar"/>
|
||||||
|
<classpathentry kind="lib" path="dist/libs/mchange-commons-java-0.2.9.jar"/>
|
||||||
<classpathentry including="**/*.java" kind="src" path="dist/game/data/scripts"/>
|
<classpathentry including="**/*.java" kind="src" path="dist/game/data/scripts"/>
|
||||||
<classpathentry kind="src" path="java"/>
|
<classpathentry kind="src" path="java"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
2
trunk/dist/game/data/AppearanceStones.xml
vendored
2
trunk/dist/game/data/AppearanceStones.xml
vendored
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/AppearanceStones.xsd">
|
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/AppearanceStones.xsd">
|
||||||
<stone id="22403" type="normal" itemType="weapon" maxGrade="s84" price="800000" />
|
<stone id="22403" type="normal" itemType="weapon" grades="s;s80;s84" price="800000" />
|
||||||
</list>
|
</list>
|
@@ -8,7 +8,7 @@
|
|||||||
<xs:attribute type="xs:integer" name="id" />
|
<xs:attribute type="xs:integer" name="id" />
|
||||||
<xs:attribute type="xs:string" name="type" />
|
<xs:attribute type="xs:string" name="type" />
|
||||||
<xs:attribute type="xs:string" name="itemType" />
|
<xs:attribute type="xs:string" name="itemType" />
|
||||||
<xs:attribute type="xs:string" name="maxGrade" />
|
<xs:attribute type="xs:string" name="grades" />
|
||||||
<xs:attribute type="xs:integer" name="price" />
|
<xs:attribute type="xs:integer" name="price" />
|
||||||
<xs:attribute type="xs:integer" name="targetItem" />
|
<xs:attribute type="xs:integer" name="targetItem" />
|
||||||
<xs:attribute type="xs:integer" name="time" />
|
<xs:attribute type="xs:integer" name="time" />
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jserver.gameserver.data.xml.impl;
|
package com.l2jserver.gameserver.data.xml.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
@@ -66,16 +67,22 @@ public final class AppearanceStonesData implements IXmlReader
|
|||||||
int itemId = parseInteger(attrs, "id");
|
int itemId = parseInteger(attrs, "id");
|
||||||
String type = parseString(attrs, "type");
|
String type = parseString(attrs, "type");
|
||||||
String itemType = parseString(attrs, "itemType");
|
String itemType = parseString(attrs, "itemType");
|
||||||
String grade = parseString(attrs, "maxGrade");
|
String grades[] = parseString(attrs, "grades", "none").split(";");
|
||||||
long price = parseLong(attrs, "price", 0l);
|
long price = parseLong(attrs, "price", 0l);
|
||||||
int targetItem = parseInteger(attrs, "targetItem", 0);
|
int targetItem = parseInteger(attrs, "targetItem", 0);
|
||||||
long timeForAppearance = parseLong(attrs, "time", 0l);
|
long timeForAppearance = parseLong(attrs, "time", 0l);
|
||||||
CrystalType cType = CrystalType.valueOf(grade.toUpperCase());
|
ArrayList<Integer> gradesIds = new ArrayList<>();
|
||||||
|
CrystalType cType;
|
||||||
|
for (String gr : grades)
|
||||||
|
{
|
||||||
|
cType = CrystalType.valueOf(gr.toUpperCase());
|
||||||
|
gradesIds.add(cType.getId());
|
||||||
|
}
|
||||||
type = type.substring(0, 1).toUpperCase() + type.substring(1).toLowerCase();
|
type = type.substring(0, 1).toUpperCase() + type.substring(1).toLowerCase();
|
||||||
itemType = itemType.substring(0, 1).toUpperCase() + itemType.substring(1).toLowerCase();
|
itemType = itemType.substring(0, 1).toUpperCase() + itemType.substring(1).toLowerCase();
|
||||||
StoneType sType = StoneType.valueOf(type);
|
StoneType sType = StoneType.valueOf(type);
|
||||||
AppearanceItemType iType = AppearanceItemType.valueOf(itemType);
|
AppearanceItemType iType = AppearanceItemType.valueOf(itemType);
|
||||||
_stones.put(itemId, new AppearanceStone(itemId, sType, iType, cType.getId(), price, targetItem, timeForAppearance));
|
_stones.put(itemId, new AppearanceStone(itemId, sType, iType, gradesIds, price, targetItem, timeForAppearance));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jserver.gameserver.model.entity;
|
package com.l2jserver.gameserver.model.entity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Erlandas
|
* @author Erlandas
|
||||||
*/
|
*/
|
||||||
@@ -44,17 +46,26 @@ public class AppearanceStone
|
|||||||
int _itemId;
|
int _itemId;
|
||||||
StoneType _type;
|
StoneType _type;
|
||||||
AppearanceItemType _itemType;
|
AppearanceItemType _itemType;
|
||||||
int _maxGrade;
|
ArrayList<Integer> _grades;
|
||||||
long _price;
|
long _price;
|
||||||
int _targetItem;
|
int _targetItem;
|
||||||
long _timeForAppearance;
|
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;
|
_itemId = itemId;
|
||||||
_type = type;
|
_type = type;
|
||||||
_itemType = itemType;
|
_itemType = itemType;
|
||||||
_maxGrade = maxGrade;
|
_grades = grades;
|
||||||
|
_maxGrade = grades.get(0);
|
||||||
|
for (int gr : _grades)
|
||||||
|
{
|
||||||
|
if (_maxGrade < gr)
|
||||||
|
{
|
||||||
|
_maxGrade = gr;
|
||||||
|
}
|
||||||
|
}
|
||||||
_price = price;
|
_price = price;
|
||||||
_targetItem = targetItem;
|
_targetItem = targetItem;
|
||||||
_timeForAppearance = timeForAppearance;
|
_timeForAppearance = timeForAppearance;
|
||||||
@@ -75,6 +86,11 @@ public class AppearanceStone
|
|||||||
return _itemType;
|
return _itemType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ArrayList<Integer> getGrades()
|
||||||
|
{
|
||||||
|
return _grades;
|
||||||
|
}
|
||||||
|
|
||||||
public int getMaxGrade()
|
public int getMaxGrade()
|
||||||
{
|
{
|
||||||
return _maxGrade;
|
return _maxGrade;
|
||||||
|
@@ -897,7 +897,7 @@ public class PcInventory extends Inventory
|
|||||||
{
|
{
|
||||||
int[][] paperdoll = new int[33][4];
|
int[][] paperdoll = new int[33][4];
|
||||||
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
|
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);
|
statement2.setInt(1, objectId);
|
||||||
try (ResultSet invdata = statement2.executeQuery())
|
try (ResultSet invdata = statement2.executeQuery())
|
||||||
@@ -908,6 +908,7 @@ public class PcInventory extends Inventory
|
|||||||
paperdoll[slot][0] = invdata.getInt("object_id");
|
paperdoll[slot][0] = invdata.getInt("object_id");
|
||||||
paperdoll[slot][1] = invdata.getInt("item_id");
|
paperdoll[slot][1] = invdata.getInt("item_id");
|
||||||
paperdoll[slot][2] = invdata.getInt("enchant_level");
|
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"); }
|
* 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"); }
|
||||||
*/
|
*/
|
||||||
|
@@ -58,7 +58,7 @@ public final class RequestExTryToPut_Shape_Shifting_EnchantSupportItem extends L
|
|||||||
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
|
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (stone.getEtcItem().getAppearanceStone().getMaxGrade() < targetItem.getItem().getCrystalType().getId())
|
if (stone.getEtcItem().getAppearanceStone().getGrades().contains(targetItem.getItem().getCrystalType().getId()))
|
||||||
{
|
{
|
||||||
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
|
player.sendPacket(new ExPut_Shape_Shifting_Target_Item_Result(0));
|
||||||
return;
|
return;
|
||||||
|
@@ -153,17 +153,11 @@ public class CharSelectionInfo extends L2GameServerPacket
|
|||||||
{
|
{
|
||||||
writeD(charInfoPackage.getPaperdollItemId(slot));
|
writeD(charInfoPackage.getPaperdollItemId(slot));
|
||||||
}
|
}
|
||||||
|
for (int slot : getPaperdollOrderVisualId())
|
||||||
|
{
|
||||||
|
writeD(charInfoPackage.getPaperdollItemVisualId(slot));
|
||||||
|
}
|
||||||
|
|
||||||
writeD(0x00); // rhand item visual id
|
|
||||||
writeD(0x00); // lhand item visual id
|
|
||||||
writeD(0x00); // gloves item visual id
|
|
||||||
writeD(0x00); // chest item visual id
|
|
||||||
writeD(0x00); // legs item visual id
|
|
||||||
writeD(0x00); // feet item visual id
|
|
||||||
writeD(0x00); // hair item visual id
|
|
||||||
writeD(0x00); // hair 2 item visual id
|
|
||||||
|
|
||||||
writeD(0x00); // ??
|
|
||||||
writeD(0x00); // ??
|
writeD(0x00); // ??
|
||||||
writeD(0x00); // ??
|
writeD(0x00); // ??
|
||||||
writeH(0x00); // ??
|
writeH(0x00); // ??
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.l2jserver.gameserver.network.serverpackets;
|
package com.l2jserver.gameserver.network.serverpackets;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.l2jserver.gameserver.model.TradeItem;
|
import com.l2jserver.gameserver.model.TradeItem;
|
||||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||||
|
|
||||||
@@ -28,6 +30,7 @@ public class PrivateStoreManageListSell extends AbstractItemPacket
|
|||||||
private final boolean _packageSale;
|
private final boolean _packageSale;
|
||||||
private final TradeItem[] _itemList;
|
private final TradeItem[] _itemList;
|
||||||
private final TradeItem[] _sellList;
|
private final TradeItem[] _sellList;
|
||||||
|
ArrayList<Integer> _sellListIds = new ArrayList<>();
|
||||||
|
|
||||||
public PrivateStoreManageListSell(L2PcInstance player, boolean isPackageSale)
|
public PrivateStoreManageListSell(L2PcInstance player, boolean isPackageSale)
|
||||||
{
|
{
|
||||||
@@ -37,6 +40,10 @@ public class PrivateStoreManageListSell extends AbstractItemPacket
|
|||||||
_packageSale = isPackageSale;
|
_packageSale = isPackageSale;
|
||||||
_itemList = player.getInventory().getAvailableItems(player.getSellList());
|
_itemList = player.getInventory().getAvailableItems(player.getSellList());
|
||||||
_sellList = player.getSellList().getItems();
|
_sellList = player.getSellList().getItems();
|
||||||
|
for (TradeItem it : _sellList)
|
||||||
|
{
|
||||||
|
_sellListIds.add(it.getObjectId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -49,9 +56,13 @@ public class PrivateStoreManageListSell extends AbstractItemPacket
|
|||||||
writeQ(_playerAdena);
|
writeQ(_playerAdena);
|
||||||
|
|
||||||
// section2
|
// section2
|
||||||
writeD(_itemList.length); // for potential sells
|
writeD(_itemList.length - _sellListIds.size()); // for potential sells
|
||||||
for (TradeItem item : _itemList)
|
for (TradeItem item : _itemList)
|
||||||
{
|
{
|
||||||
|
if (_sellListIds.contains(item.getObjectId()))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
writeItem(item);
|
writeItem(item);
|
||||||
writeQ(item.getItem().getReferencePrice() * 2);
|
writeQ(item.getItem().getReferencePrice() * 2);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user