Maintain ensoul options for maintain enchant multisells.

This commit is contained in:
MobiusDev 2016-03-11 10:05:33 +00:00
parent 44102eacfc
commit 3924addbeb

View File

@ -33,6 +33,7 @@ import com.l2jmobius.gameserver.model.multisell.Entry;
import com.l2jmobius.gameserver.model.multisell.Ingredient; import com.l2jmobius.gameserver.model.multisell.Ingredient;
import com.l2jmobius.gameserver.model.multisell.PreparedListContainer; import com.l2jmobius.gameserver.model.multisell.PreparedListContainer;
import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.clientpackets.ensoul.SoulCrystalOption;
import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight; import com.l2jmobius.gameserver.network.serverpackets.ExUserInfoInvenWeight;
import com.l2jmobius.gameserver.network.serverpackets.ItemList; import com.l2jmobius.gameserver.network.serverpackets.ItemList;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
@ -225,6 +226,9 @@ public class MultiSellChoose extends L2GameClientPacket
final List<L2Augmentation> augmentation = new ArrayList<>(); final List<L2Augmentation> augmentation = new ArrayList<>();
Elementals[] elemental = null; Elementals[] elemental = null;
SoulCrystalOption[] commonSoulCrystalOptions = null;
SoulCrystalOption specialSoulCrystalOption = null;
/** All ok, remove items and add final product */ /** All ok, remove items and add final product */
for (Ingredient e : entry.getIngredients()) for (Ingredient e : entry.getIngredients())
@ -291,6 +295,14 @@ public class MultiSellChoose extends L2GameClientPacket
player.setMultiSell(null); player.setMultiSell(null);
return; return;
} }
if (inventoryContents[i].getCommonSoulCrystalOptions() != null)
{
commonSoulCrystalOptions = inventoryContents[i].getCommonSoulCrystalOptions();
}
if (inventoryContents[i].getSpecialSoulCrystalOption() != null)
{
specialSoulCrystalOption = inventoryContents[i].getSpecialSoulCrystalOption();
}
} }
} }
else else
@ -418,6 +430,14 @@ public class MultiSellChoose extends L2GameClientPacket
product.setElementAttr(elm.getElement(), elm.getValue()); product.setElementAttr(elm.getElement(), elm.getValue());
} }
} }
if (commonSoulCrystalOptions != null)
{
product.setCommonSoulCrystalOptions(commonSoulCrystalOptions);
}
if (specialSoulCrystalOption != null)
{
product.setSpecialSoulCrystalOption(specialSoulCrystalOption);
}
product.setEnchantLevel(e.getEnchantLevel()); product.setEnchantLevel(e.getEnchantLevel());
product.updateDatabase(); product.updateDatabase();
} }