Drop of IntIntHolder class.
This commit is contained in:
@@ -438,7 +438,7 @@ public class L2SchemeBufferInstance extends L2FolkInstance
|
||||
int fee = 0;
|
||||
for (int sk : list)
|
||||
{
|
||||
fee += BufferTable.getInstance().getAvailableBuff(sk).getValue();
|
||||
fee += BufferTable.getInstance().getAvailableBuff(sk).getPrice();
|
||||
}
|
||||
|
||||
return fee;
|
||||
|
@@ -19,19 +19,31 @@ package com.l2jmobius.gameserver.model.holders;
|
||||
/**
|
||||
* A container used for schemes buffer.
|
||||
*/
|
||||
public final class BuffSkillHolder extends IntIntHolder
|
||||
public final class BuffSkillHolder
|
||||
{
|
||||
private final int _id;
|
||||
private final int _price;
|
||||
private final String _type;
|
||||
private final String _description;
|
||||
|
||||
public BuffSkillHolder(int id, int price, String type, String description)
|
||||
{
|
||||
super(id, price);
|
||||
|
||||
_id = id;
|
||||
_price = price;
|
||||
_type = type;
|
||||
_description = description;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getPrice()
|
||||
{
|
||||
return _price;
|
||||
}
|
||||
|
||||
public final String getType()
|
||||
{
|
||||
return _type;
|
||||
|
@@ -16,54 +16,40 @@
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model.holders;
|
||||
|
||||
import com.l2jmobius.gameserver.datatables.SkillTable;
|
||||
import com.l2jmobius.gameserver.model.L2Skill;
|
||||
|
||||
/**
|
||||
* A generic int/int container.
|
||||
* A simple DTO for items; contains item ID and count.<br>
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class IntIntHolder
|
||||
public class ItemHolder
|
||||
{
|
||||
private int _id;
|
||||
private int _value;
|
||||
private final int _id;
|
||||
private final long _count;
|
||||
|
||||
public IntIntHolder(int id, int value)
|
||||
public ItemHolder(int id, long count)
|
||||
{
|
||||
_id = id;
|
||||
_value = value;
|
||||
_count = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ID of the item contained in this object
|
||||
*/
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getValue()
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
public void setId(int id)
|
||||
{
|
||||
_id = id;
|
||||
}
|
||||
|
||||
public void setValue(int value)
|
||||
{
|
||||
_value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the L2Skill associated to the id/value.
|
||||
* @return the count of items contained in this object
|
||||
*/
|
||||
public final L2Skill getSkill()
|
||||
public long getCount()
|
||||
{
|
||||
return SkillTable.getInstance().getInfo(_id, _value);
|
||||
return _count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getClass().getSimpleName() + ": Id: " + _id + ", Value: " + _value;
|
||||
return "[" + getClass().getSimpleName() + "] ID: " + _id + ", count: " + _count;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user