diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break; diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_10.1_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break; diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break; diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break; diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_Essence_6.1_BattleChronicle/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break; diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/CollectionData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/CollectionData.java index baf3bcf2b8..fd7be1aaa5 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/CollectionData.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/CollectionData.java @@ -32,7 +32,7 @@ import org.l2jmobius.commons.util.IXmlReader; import org.l2jmobius.gameserver.data.ItemTable; import org.l2jmobius.gameserver.model.StatSet; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.item.ItemTemplate; /** @@ -88,7 +88,7 @@ public class CollectionData implements IXmlReader final int id = parseInteger(attrs, "id"); final int optionId = parseInteger(attrs, "optionId"); final int category = parseInteger(attrs, "category"); - List items = new ArrayList<>(); + final List items = new ArrayList<>(); for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) { attrs = b.getAttributes(); @@ -103,7 +103,7 @@ public class CollectionData implements IXmlReader LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " collection item: " + id); continue; } - items.add(new ItemCollectionData(itemId, itemCount, itemEnchantLevel)); + items.add(new ItemEnchantHolder(itemId, itemCount, itemEnchantLevel)); } } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java index 9d6629d241..6c329673e5 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/CollectionDataHolder.java @@ -26,9 +26,9 @@ public class CollectionDataHolder private final int _collectionId; private final int _optionId; private final int _category; - private final List _items; + private final List _items; - public CollectionDataHolder(int collectionId, int optionId, int category, List items) + public CollectionDataHolder(int collectionId, int optionId, int category, List items) { _collectionId = collectionId; _optionId = optionId; @@ -51,7 +51,7 @@ public class CollectionDataHolder return _category; } - public List getItems() + public List getItems() { return _items; } diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java deleted file mode 100644 index b4b9f1df43..0000000000 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/model/holders/ItemCollectionData.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * 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 org.l2jmobius.gameserver.model.holders; - -/** - * Written by Berezkin Nikolay, on 04.05.2021 - */ -public class ItemCollectionData -{ - private final int _enchantLevel; - private final int _itemId; - private final long _count; - - public ItemCollectionData(int itemId, long count, int enchantLevel) - { - _itemId = itemId; - _count = count; - _enchantLevel = enchantLevel; - } - - public int getItemId() - { - return _itemId; - } - - public int getEnchantLevel() - { - return _enchantLevel; - } - - public long getCount() - { - return _count; - } -} diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java index b602edf72b..e78a554fe4 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/network/clientpackets/collection/RequestCollectionRegister.java @@ -21,7 +21,7 @@ import org.l2jmobius.gameserver.data.xml.CollectionData; import org.l2jmobius.gameserver.data.xml.OptionData; import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.CollectionDataHolder; -import org.l2jmobius.gameserver.model.holders.ItemCollectionData; +import org.l2jmobius.gameserver.model.holders.ItemEnchantHolder; import org.l2jmobius.gameserver.model.holders.PlayerCollectionData; import org.l2jmobius.gameserver.model.item.instance.Item; import org.l2jmobius.gameserver.model.options.Options; @@ -72,9 +72,9 @@ public class RequestCollectionRegister implements IClientIncomingPacket } long count = 0; - for (ItemCollectionData data : collection.getItems()) + for (ItemEnchantHolder data : collection.getItems()) { - if ((data.getItemId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) + if ((data.getId() == item.getId()) && ((data.getEnchantLevel() == 0) || (data.getEnchantLevel() == item.getEnchantLevel()))) { count = data.getCount(); break;