Apply visual set skills only when a fixed stone was used.
This commit is contained in:
parent
585b17d38b
commit
dbfdd34850
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -394,6 +396,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
final PlayerInstance player = (PlayerInstance) inventory.getOwner();
|
||||
|
||||
final AtomicBoolean update = new AtomicBoolean();
|
||||
final AtomicBoolean updateTimestamp = new AtomicBoolean();
|
||||
|
||||
@ -487,6 +490,13 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
||||
if (update)
|
||||
{
|
||||
player.sendSkillList();
|
||||
@ -610,6 +620,12 @@ public abstract class Inventory extends ItemContainer
|
||||
remove = true;
|
||||
}
|
||||
|
||||
// verify and remove visual set bonus
|
||||
if (verifyAndRemove(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
remove = true;
|
||||
}
|
||||
|
||||
if (remove)
|
||||
{
|
||||
player.checkItemRestriction();
|
||||
|
@ -1529,7 +1529,9 @@ public final class ItemInstance extends WorldObject
|
||||
*/
|
||||
public class ItemDropTask implements Runnable
|
||||
{
|
||||
private int _x, _y, _z;
|
||||
private int _x;
|
||||
private int _y;
|
||||
private int _z;
|
||||
private final Creature _dropper;
|
||||
private final ItemInstance _itеm;
|
||||
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -510,8 +512,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -505,8 +507,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -510,8 +512,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.CommonUtil;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.AppearanceItemData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ArmorSetsData;
|
||||
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import org.l2jmobius.gameserver.enums.ItemLocation;
|
||||
@ -50,6 +51,7 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.ArmorsetSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.items.EtcItem;
|
||||
import org.l2jmobius.gameserver.model.items.Item;
|
||||
import org.l2jmobius.gameserver.model.items.appearance.AppearanceType;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.items.type.EtcItemType;
|
||||
import org.l2jmobius.gameserver.model.items.type.ItemType;
|
||||
@ -533,8 +535,9 @@ public abstract class Inventory extends ItemContainer
|
||||
update = true;
|
||||
}
|
||||
|
||||
// Very and apply visual set
|
||||
if (verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
// Verify and apply visual set
|
||||
final int itemVisualId = item.getVisualId();
|
||||
if ((itemVisualId > 0) && (AppearanceItemData.getInstance().getStone(itemVisualId).getType() == AppearanceType.FIXED) && verifyAndApply(player, item, ItemInstance::getVisualId))
|
||||
{
|
||||
update = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user