Set buff skill level for Scheme Buffer.
Contributed by G-hamsteR.
This commit is contained in:
@@ -115,7 +115,7 @@ public class SchemeBufferTable
|
||||
|
||||
final NamedNodeMap attrs = c.getAttributes();
|
||||
final int skillId = Integer.parseInt(attrs.getNamedItem("id").getNodeValue());
|
||||
_availableBuffs.put(skillId, new BuffSkillHolder(skillId, Integer.parseInt(attrs.getNamedItem("price").getNodeValue()), category, attrs.getNamedItem("desc").getNodeValue()));
|
||||
_availableBuffs.put(skillId, new BuffSkillHolder(skillId, Integer.parseInt(attrs.getNamedItem("level").getNodeValue()), Integer.parseInt(attrs.getNamedItem("price").getNodeValue()), category, attrs.getNamedItem("desc").getNodeValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -116,7 +116,7 @@ public class SchemeBufferInstance extends FolkInstance
|
||||
{
|
||||
for (int skillId : SchemeBufferTable.getInstance().getScheme(player.getObjectId(), schemeName))
|
||||
{
|
||||
SkillTable.getInstance().getSkill(skillId, SkillTable.getInstance().getMaxLevel(skillId, 1)).getEffects(this, target);
|
||||
SkillTable.getInstance().getSkill(skillId, SchemeBufferTable.getInstance().getAvailableBuff(skillId).getLevel()).getEffects(this, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,13 +22,15 @@ package org.l2jmobius.gameserver.model.holders;
|
||||
public class BuffSkillHolder
|
||||
{
|
||||
private final int _id;
|
||||
private final int _level;
|
||||
private final int _price;
|
||||
private final String _type;
|
||||
private final String _description;
|
||||
|
||||
public BuffSkillHolder(int id, int price, String type, String description)
|
||||
public BuffSkillHolder(int id, int level, int price, String type, String description)
|
||||
{
|
||||
_id = id;
|
||||
_level = level;
|
||||
_price = price;
|
||||
_type = type;
|
||||
_description = description;
|
||||
@@ -39,6 +41,11 @@ public class BuffSkillHolder
|
||||
return _id;
|
||||
}
|
||||
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
|
||||
public int getPrice()
|
||||
{
|
||||
return _price;
|
||||
|
Reference in New Issue
Block a user