Fixed items enchanted by specific scrolls.
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@@ -130,6 +131,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Set;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -93,6 +94,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -101,6 +107,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@@ -130,6 +131,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -21,6 +21,7 @@ import java.util.Set;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -93,6 +94,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -101,6 +107,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.l2jmobius.gameserver.data.xml.impl;
|
package org.l2jmobius.gameserver.data.xml.impl;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@@ -132,6 +133,11 @@ public class EnchantItemData implements IXmlReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<EnchantScroll> getScrolls()
|
||||||
|
{
|
||||||
|
return _scrolls.values();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the enchant scroll.
|
* Gets the enchant scroll.
|
||||||
* @param scroll the scroll
|
* @param scroll the scroll
|
||||||
|
@@ -20,6 +20,7 @@ import java.util.HashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
import org.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||||
import org.l2jmobius.gameserver.model.StatsSet;
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
@@ -99,6 +100,11 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
_items.add(itemId);
|
_items.add(itemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<Integer> getItems()
|
||||||
|
{
|
||||||
|
return _items;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param itemToEnchant the item to be enchanted
|
* @param itemToEnchant the item to be enchanted
|
||||||
* @param supportItem the support item used when enchanting (can be null)
|
* @param supportItem the support item used when enchanting (can be null)
|
||||||
@@ -107,6 +113,18 @@ public class EnchantScroll extends AbstractEnchantItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
public boolean isValid(ItemInstance itemToEnchant, EnchantSupportItem supportItem)
|
||||||
{
|
{
|
||||||
|
for (EnchantScroll scroll : EnchantItemData.getInstance().getScrolls())
|
||||||
|
{
|
||||||
|
if (scroll.getId() == getId())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final Set<Integer> scrollItems = scroll.getItems();
|
||||||
|
if ((scrollItems != null) && scrollItems.contains(itemToEnchant.getId()))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
if ((_items != null) && !_items.contains(itemToEnchant.getId()))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user