Show soul crystal options on items that are in trade window or in commission system.
Contributed by Mathael.
This commit is contained in:
parent
cab0df2bcb
commit
b2605801b8
@ -21,6 +21,9 @@ import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ensoul.ExShowEnsoulWindow;
|
||||
|
||||
/**
|
||||
* @author Mathael
|
||||
*/
|
||||
public class Ensoul implements IBypassHandler
|
||||
{
|
||||
private static final String[] COMMANDS =
|
||||
|
@ -79,7 +79,9 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
writeH(0x00); // Equipped : 00-No, 01-yes
|
||||
writeC(item.getCustomType2());
|
||||
writeD(0);
|
||||
writeItemElementalAndEnchant(new ItemInfo(item));
|
||||
final ItemInfo iteminfo = new ItemInfo(item);
|
||||
writeItemElementalAndEnchant(iteminfo);
|
||||
writeItemSoulCrystalOptions(iteminfo);
|
||||
}
|
||||
|
||||
protected void writeItem(ItemInfo item)
|
||||
@ -164,7 +166,11 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
mask |= ItemListType.VISUAL_ID.getMask();
|
||||
}
|
||||
|
||||
if ((item.getCommonSoulCrystalOptions().length != 0) || (item.getSpecialSoulCrystalOption() != null))
|
||||
if (item.getSpecialSoulCrystalOption() != null)
|
||||
{
|
||||
mask |= ItemListType.SOUL_CRYSTAL.getMask();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (SoulCrystalOption sco : item.getCommonSoulCrystalOptions())
|
||||
{
|
||||
@ -174,11 +180,6 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.getSpecialSoulCrystalOption() != null)
|
||||
{
|
||||
mask |= ItemListType.SOUL_CRYSTAL.getMask();
|
||||
}
|
||||
}
|
||||
|
||||
return mask;
|
||||
@ -237,8 +238,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
writeH(item.getCustomType2());
|
||||
writeItemElementalAndEnchant(item);
|
||||
writeD(item.getVisualId());
|
||||
writeC(0);
|
||||
writeC(0);
|
||||
writeItemSoulCrystalOptions(item);
|
||||
}
|
||||
|
||||
protected void writeItemSoulCrystalOptions(ItemInfo item)
|
||||
|
Loading…
Reference in New Issue
Block a user