From f9e6716ef064f7a07cbf6b6ead29e1d0fc4a519e Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 23 May 2018 12:18:45 +0000 Subject: [PATCH] Item grade changes to match newer branches. --- .../scripts/handlers/effecthandlers/Heal.java | 2 +- .../itemhandlers/BlessedSpiritShot.java | 2 +- .../handlers/itemhandlers/CharmOfCourage.java | 2 +- .../handlers/itemhandlers/FishShots.java | 2 +- .../handlers/itemhandlers/SoulShots.java | 2 +- .../handlers/itemhandlers/SpiritShot.java | 2 +- .../data/xml/impl/EnchantItemHPBonusData.java | 2 +- .../l2jmobius/gameserver/enums/ItemGrade.java | 66 +++++++++++++++++++ .../gameserver/model/actor/L2Character.java | 2 +- .../model/actor/instance/L2PcInstance.java | 4 +- .../model/itemcontainer/Inventory.java | 4 +- .../gameserver/model/items/L2Item.java | 27 ++++---- .../model/items/L2WarehouseItem.java | 2 +- .../items/enchant/AbstractEnchantItem.java | 2 +- .../model/items/type/CrystalType.java | 14 ++-- .../model/stats/functions/FuncEnchant.java | 23 +++---- .../clientpackets/AbstractRefinePacket.java | 2 +- .../clientpackets/RequestAutoSoulShot.java | 2 +- .../clientpackets/RequestConfirmGemStone.java | 2 +- .../RequestConfirmRefinerItem.java | 2 +- .../clientpackets/RequestCrystallizeItem.java | 2 +- .../network/clientpackets/RequestRefine.java | 2 +- .../serverpackets/ShopPreviewList.java | 4 +- 23 files changed, 117 insertions(+), 57 deletions(-) create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/ItemGrade.java diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Heal.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Heal.java index 8d56467ac3..c4f420f60e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Heal.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/effecthandlers/Heal.java @@ -91,7 +91,7 @@ public final class Heal extends AbstractEffect final L2ItemInstance weaponInst = activeChar.getActiveWeaponInstance(); if (weaponInst != null) { - mAtkMul = weaponInst.getItem().getItemGrade() == CrystalType.S84 ? 4 : weaponInst.getItem().getItemGrade() == CrystalType.S80 ? 2 : 1; + mAtkMul = weaponInst.getItem().getCrystalType() == CrystalType.S84 ? 4 : weaponInst.getItem().getCrystalType() == CrystalType.S80 ? 2 : 1; } // shot dynamic bonus mAtkMul = bss ? mAtkMul * 4 : mAtkMul + 1; diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index ecc8936d87..8e95f64e87 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -71,7 +71,7 @@ public class BlessedSpiritShot implements IItemHandler } // Check for correct grade - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getItemGradeSPlus() == item.getItem().getItemGradeSPlus()); + final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); if (!gradeCheck) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/CharmOfCourage.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/CharmOfCourage.java index 1306e92ddf..1f6c381951 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/CharmOfCourage.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/CharmOfCourage.java @@ -42,7 +42,7 @@ public class CharmOfCourage implements IItemHandler final L2PcInstance activeChar = playable.getActingPlayer(); int level = activeChar.getLevel(); - final int itemLevel = item.getItem().getItemGrade().getId(); + final int itemLevel = item.getItem().getCrystalType().getLevel(); if (level < 20) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/FishShots.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/FishShots.java index 894c85271b..70505ff938 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/FishShots.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/FishShots.java @@ -69,7 +69,7 @@ public class FishShots implements IItemHandler return false; } - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.FISHINGSHOT) && (weaponInst.getItem().getItemGradeSPlus() == item.getItem().getItemGradeSPlus()); + final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.FISHINGSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); if (!gradeCheck) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index dfc3cdb840..ad42a270d6 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -65,7 +65,7 @@ public class SoulShots implements IItemHandler return false; } - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SOULSHOT) && (weaponInst.getItem().getItemGradeSPlus() == item.getItem().getItemGradeSPlus()); + final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SOULSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); if (!gradeCheck) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index 03dc3321a1..7d0c4be896 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -70,7 +70,7 @@ public class SpiritShot implements IItemHandler return false; } - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getItemGradeSPlus() == item.getItem().getItemGradeSPlus()); + final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); if (!gradeCheck) { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/EnchantItemHPBonusData.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/EnchantItemHPBonusData.java index a6fdee53ec..9618ac6c4c 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/EnchantItemHPBonusData.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/EnchantItemHPBonusData.java @@ -129,7 +129,7 @@ public class EnchantItemHPBonusData implements IGameXmlReader */ public final int getHPBonus(L2ItemInstance item) { - final List values = _armorHPBonuses.get(item.getItem().getItemGradeSPlus()); + final List values = _armorHPBonuses.get(item.getItem().getCrystalTypePlus()); if ((values == null) || values.isEmpty() || (item.getOlyEnchantLevel() <= 0)) { return 0; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/ItemGrade.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/ItemGrade.java new file mode 100644 index 0000000000..73346ff3c0 --- /dev/null +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/enums/ItemGrade.java @@ -0,0 +1,66 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jmobius.gameserver.enums; + +import com.l2jmobius.gameserver.model.items.type.CrystalType; + +/** + * @author UnAfraid + */ +public enum ItemGrade +{ + NONE, + D, + C, + B, + A, + S; + + public static ItemGrade valueOf(CrystalType type) + { + switch (type) + { + case NONE: + { + return NONE; + } + case D: + { + return D; + } + case C: + { + return C; + } + case B: + { + return B; + } + case A: + { + return A; + } + case S: + case S80: + case S84: + { + return S; + } + } + return null; + } +} diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 2352ee74ac..a740ff610f 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -988,7 +988,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe final int timeAtk = calculateTimeBetweenAttacks(); final int timeToHit = timeAtk / 2; - final Attack attack = new Attack(this, target, isChargedShot(ShotType.SOULSHOTS), (weaponItem != null) ? weaponItem.getItemGradeSPlus().getId() : 0); + final Attack attack = new Attack(this, target, isChargedShot(ShotType.SOULSHOTS), (weaponItem != null) ? weaponItem.getCrystalTypePlus().getLevel() : 0); setHeading(Util.calculateHeadingFrom(this, target)); final int reuse = calculateReuseTime(weaponItem); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 4e8a91d3b2..87337c2556 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -2038,7 +2038,7 @@ public final class L2PcInstance extends L2Playable { if ((item != null) && item.isEquipped() && (item.getItemType() != EtcItemType.ARROW) && (item.getItemType() != EtcItemType.BOLT)) { - crystaltype = item.getItem().getCrystalType().getId(); + crystaltype = item.getItem().getCrystalType().getLevel(); if (crystaltype > expertiseLevel) { if (item.isWeapon() && (crystaltype > weaponPenalty)) @@ -9385,7 +9385,7 @@ public final class L2PcInstance extends L2Playable { for (int itemId : _activeSoulShots) { - if (ItemTable.getInstance().getTemplate(itemId).getCrystalType().getId() == crystalType) + if (ItemTable.getInstance().getTemplate(itemId).getCrystalType().getLevel() == crystalType) { disableAutoShot(itemId); } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java index 7f6fb2ca85..ceeb569e19 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -1752,7 +1752,7 @@ public abstract class Inventory extends ItemContainer for (L2ItemInstance item : getItems()) { - if (item.isEtcItem() && (item.getItem().getItemGradeSPlus() == bow.getItemGradeSPlus()) && (item.getEtcItem().getItemType() == EtcItemType.ARROW)) + if (item.isEtcItem() && (item.getItem().getCrystalTypePlus() == bow.getCrystalTypePlus()) && (item.getEtcItem().getItemType() == EtcItemType.ARROW)) { arrow = item; break; @@ -1774,7 +1774,7 @@ public abstract class Inventory extends ItemContainer for (L2ItemInstance item : getItems()) { - if (item.isEtcItem() && (item.getItem().getItemGradeSPlus() == crossbow.getItemGradeSPlus()) && (item.getEtcItem().getItemType() == EtcItemType.BOLT)) + if (item.isEtcItem() && (item.getItem().getCrystalTypePlus() == crossbow.getCrystalTypePlus()) && (item.getEtcItem().getItemType() == EtcItemType.BOLT)) { bolt = item; break; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2Item.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2Item.java index c796ceef17..157d34655b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2Item.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2Item.java @@ -24,6 +24,7 @@ import java.util.logging.Logger; import com.l2jmobius.Config; import com.l2jmobius.gameserver.datatables.ItemTable; +import com.l2jmobius.gameserver.enums.ItemGrade; import com.l2jmobius.gameserver.model.Elementals; import com.l2jmobius.gameserver.model.L2Object; import com.l2jmobius.gameserver.model.PcCondOverride; @@ -384,6 +385,14 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable return (_crystalType != CrystalType.NONE) && (_crystalCount > 0); } + /** + * @return return General item grade (No S80, S84) + */ + public ItemGrade getItemGrade() + { + return ItemGrade.valueOf(_crystalType); + } + /** * Return the type of crystal if item is crystallizable * @return CrystalType @@ -402,25 +411,13 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable return _crystalType.getCrystalId(); } - /** - * Returns the grade of the item.
- *
- * Concept :
- * In fact, this function returns the type of crystal of the item. - * @return CrystalType - */ - public final CrystalType getItemGrade() - { - return getCrystalType(); - } - /** * For grades S80 and S84 return S * @return the grade of the item. */ - public final CrystalType getItemGradeSPlus() + public final CrystalType getCrystalTypePlus() { - switch (getItemGrade()) + switch (_crystalType) { case S80: case S84: @@ -429,7 +426,7 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable } default: { - return getItemGrade(); + return _crystalType; } } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2WarehouseItem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2WarehouseItem.java index 32f47837e5..e5f8238ef2 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2WarehouseItem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/L2WarehouseItem.java @@ -72,7 +72,7 @@ public class L2WarehouseItem _enchant = item.getEnchantLevel(); _customType1 = item.getCustomType1(); _customType2 = item.getCustomType2(); - _grade = item.getItem().getItemGrade(); + _grade = item.getItem().getCrystalType(); if (item.isAugmented()) { _isAugmented = true; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/enchant/AbstractEnchantItem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/enchant/AbstractEnchantItem.java index 7f94105358..68da753fc9 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/enchant/AbstractEnchantItem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/enchant/AbstractEnchantItem.java @@ -135,7 +135,7 @@ public abstract class AbstractEnchantItem { return false; } - else if (_grade != itemToEnchant.getItem().getItemGradeSPlus()) + else if (_grade != itemToEnchant.getItem().getCrystalTypePlus()) { return false; } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/type/CrystalType.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/type/CrystalType.java index e14132653a..fe85b20e7d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/type/CrystalType.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/items/type/CrystalType.java @@ -31,14 +31,14 @@ public enum CrystalType S80(6, 1462, 25, 250), S84(7, 1462, 25, 250); - private final int _id; + private final int _level; private final int _crystalId; private final int _crystalEnchantBonusArmor; private final int _crystalEnchantBonusWeapon; - CrystalType(int id, int crystalId, int crystalEnchantBonusArmor, int crystalEnchantBonusWeapon) + CrystalType(int level, int crystalId, int crystalEnchantBonusArmor, int crystalEnchantBonusWeapon) { - _id = id; + _level = level; _crystalId = crystalId; _crystalEnchantBonusArmor = crystalEnchantBonusArmor; _crystalEnchantBonusWeapon = crystalEnchantBonusWeapon; @@ -48,9 +48,9 @@ public enum CrystalType * Gets the crystal type ID. * @return the crystal type ID */ - public int getId() + public int getLevel() { - return _id; + return _level; } /** @@ -74,11 +74,11 @@ public enum CrystalType public boolean isGreater(CrystalType crystalType) { - return getId() > crystalType.getId(); + return getLevel() > crystalType.getLevel(); } public boolean isLesser(CrystalType crystalType) { - return getId() < crystalType.getId(); + return getLevel() < crystalType.getLevel(); } } diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/functions/FuncEnchant.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/functions/FuncEnchant.java index 773d29bef0..45219abb01 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/functions/FuncEnchant.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/model/stats/functions/FuncEnchant.java @@ -55,19 +55,16 @@ public class FuncEnchant extends AbstractFunction enchant = 3; } - if (effector.isPlayer()) + if (effector.isPlayer() && effector.getActingPlayer().isInOlympiadMode() && (Config.ALT_OLY_ENCHANT_LIMIT >= 0) && ((enchant + overenchant) > Config.ALT_OLY_ENCHANT_LIMIT)) { - if (effector.getActingPlayer().isInOlympiadMode() && (Config.ALT_OLY_ENCHANT_LIMIT >= 0) && ((enchant + overenchant) > Config.ALT_OLY_ENCHANT_LIMIT)) + if (Config.ALT_OLY_ENCHANT_LIMIT > 3) { - if (Config.ALT_OLY_ENCHANT_LIMIT > 3) - { - overenchant = Config.ALT_OLY_ENCHANT_LIMIT - 3; - } - else - { - overenchant = 0; - enchant = Config.ALT_OLY_ENCHANT_LIMIT; - } + overenchant = Config.ALT_OLY_ENCHANT_LIMIT - 3; + } + else + { + overenchant = 0; + enchant = Config.ALT_OLY_ENCHANT_LIMIT; } } @@ -78,7 +75,7 @@ public class FuncEnchant extends AbstractFunction if (getStat() == Stats.MAGIC_ATTACK) { - switch (item.getItem().getItemGradeSPlus()) + switch (item.getItem().getCrystalTypePlus()) { case S: { @@ -111,7 +108,7 @@ public class FuncEnchant extends AbstractFunction if (item.isWeapon()) { final WeaponType type = (WeaponType) item.getItemType(); - switch (item.getItem().getItemGradeSPlus()) + switch (item.getItem().getCrystalTypePlus()) { case S: { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/AbstractRefinePacket.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/AbstractRefinePacket.java index 8c10561256..c2c780952b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/AbstractRefinePacket.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/AbstractRefinePacket.java @@ -225,7 +225,7 @@ public abstract class AbstractRefinePacket implements IClientIncomingPacket return false; } - final CrystalType grade = item.getItem().getItemGrade(); + final CrystalType grade = item.getItem().getCrystalType(); final LifeStone ls = _lifeStones.get(refinerItem.getId()); // Check for item id diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestAutoSoulShot.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestAutoSoulShot.java index 15d8a8eaaa..22d6a71a48 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestAutoSoulShot.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestAutoSoulShot.java @@ -111,7 +111,7 @@ public final class RequestAutoSoulShot implements IClientIncomingPacket } else { - if ((activeChar.getActiveWeaponItem() != activeChar.getFistsWeaponItem()) && (item.getItem().getCrystalType() == activeChar.getActiveWeaponItem().getItemGradeSPlus())) + if ((activeChar.getActiveWeaponItem() != activeChar.getFistsWeaponItem()) && (item.getItem().getCrystalType() == activeChar.getActiveWeaponItem().getCrystalTypePlus())) { activeChar.addAutoSoulShot(_itemId); activeChar.sendPacket(new ExAutoSoulShot(_itemId, _type)); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmGemStone.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmGemStone.java index 0ac795b0a6..57b5c2fab6 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmGemStone.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmGemStone.java @@ -82,7 +82,7 @@ public final class RequestConfirmGemStone extends AbstractRefinePacket return; } - if (_gemStoneCount != getGemStoneCount(targetItem.getItem().getItemGrade(), ls.getGrade())) + if (_gemStoneCount != getGemStoneCount(targetItem.getItem().getCrystalType(), ls.getGrade())) { activeChar.sendPacket(SystemMessageId.GEMSTONE_QUANTITY_IS_INCORRECT); return; diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmRefinerItem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmRefinerItem.java index a48461d616..7a7eed8be4 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmRefinerItem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestConfirmRefinerItem.java @@ -69,7 +69,7 @@ public class RequestConfirmRefinerItem extends AbstractRefinePacket } final int refinerItemId = refinerItem.getItem().getId(); - final CrystalType grade = targetItem.getItem().getItemGrade(); + final CrystalType grade = targetItem.getItem().getCrystalType(); final LifeStone ls = getLifeStone(refinerItemId); final int gemStoneId = getGemStoneId(grade); final int gemStoneCount = getGemStoneCount(grade, ls.getGrade()); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java index 30dc374415..af2cc7e7ca 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestCrystallizeItem.java @@ -133,7 +133,7 @@ public final class RequestCrystallizeItem implements IClientIncomingPacket // Check if the char can crystallize items and return if false; boolean canCrystallize = true; - switch (itemToRemove.getItem().getItemGradeSPlus()) + switch (itemToRemove.getItem().getCrystalTypePlus()) { case C: { diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestRefine.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestRefine.java index 1e431a4e08..695604b8ad 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestRefine.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/clientpackets/RequestRefine.java @@ -87,7 +87,7 @@ public final class RequestRefine extends AbstractRefinePacket final int lifeStoneLevel = ls.getLevel(); final int lifeStoneGrade = ls.getGrade(); - if (_gemStoneCount != getGemStoneCount(targetItem.getItem().getItemGrade(), lifeStoneGrade)) + if (_gemStoneCount != getGemStoneCount(targetItem.getItem().getCrystalType(), lifeStoneGrade)) { activeChar.sendPacket(new ExVariationResult(0, 0, 0)); activeChar.sendPacket(SystemMessageId.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS); diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java index a555d87323..ef34b08b2b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java @@ -61,7 +61,7 @@ public class ShopPreviewList implements IClientOutgoingPacket int newlength = 0; for (Product product : _list) { - if ((product.getItem().getCrystalType().getId() <= _expertise) && product.getItem().isEquipable()) + if ((product.getItem().getCrystalType().getLevel() <= _expertise) && product.getItem().isEquipable()) { newlength++; } @@ -70,7 +70,7 @@ public class ShopPreviewList implements IClientOutgoingPacket for (Product product : _list) { - if ((product.getItem().getCrystalType().getId() <= _expertise) && product.getItem().isEquipable()) + if ((product.getItem().getCrystalType().getLevel() <= _expertise) && product.getItem().isEquipable()) { packet.writeD(product.getItemId()); packet.writeH(product.getItem().getType2()); // item type2