Merge pull request #47 from P0nk/mobskill-targets
Fix mobskill target count. Fixes Horntail mass seduce. Thanks xinyifly.
This commit is contained in:
@@ -46,7 +46,7 @@ public class MobSkill {
|
|||||||
|
|
||||||
private int skillId, skillLevel, mpCon;
|
private int skillId, skillLevel, mpCon;
|
||||||
private List<Integer> toSummon = new ArrayList<>();
|
private List<Integer> toSummon = new ArrayList<>();
|
||||||
private int spawnEffect, hp, x, y;
|
private int spawnEffect, hp, x, y, count;
|
||||||
private long duration, cooltime;
|
private long duration, cooltime;
|
||||||
private float prop;
|
private float prop;
|
||||||
private Point lt, rb;
|
private Point lt, rb;
|
||||||
@@ -81,6 +81,10 @@ public class MobSkill {
|
|||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCount(int count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
public void setDuration(long duration) {
|
public void setDuration(long duration) {
|
||||||
this.duration = duration;
|
this.duration = duration;
|
||||||
}
|
}
|
||||||
@@ -326,7 +330,7 @@ public class MobSkill {
|
|||||||
for (MapleCharacter character : getPlayersInRange(monster)) {
|
for (MapleCharacter character : getPlayersInRange(monster)) {
|
||||||
if (!character.hasActiveBuff(2321005)) { // holy shield
|
if (!character.hasActiveBuff(2321005)) { // holy shield
|
||||||
if (disease.equals(MapleDisease.SEDUCE)) {
|
if (disease.equals(MapleDisease.SEDUCE)) {
|
||||||
if (i < 10) {
|
if (i < count) {
|
||||||
character.giveDebuff(MapleDisease.SEDUCE, this);
|
character.giveDebuff(MapleDisease.SEDUCE, this);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class MobSkillFactory {
|
|||||||
int hp = MapleDataTool.getInt("hp", skillData, 100);
|
int hp = MapleDataTool.getInt("hp", skillData, 100);
|
||||||
int x = MapleDataTool.getInt("x", skillData, 1);
|
int x = MapleDataTool.getInt("x", skillData, 1);
|
||||||
int y = MapleDataTool.getInt("y", skillData, 1);
|
int y = MapleDataTool.getInt("y", skillData, 1);
|
||||||
|
int count = MapleDataTool.getInt("count", skillData, 1);
|
||||||
long duration = MapleDataTool.getInt("time", skillData, 0) * 1000;
|
long duration = MapleDataTool.getInt("time", skillData, 0) * 1000;
|
||||||
long cooltime = MapleDataTool.getInt("interval", skillData, 0) * 1000;
|
long cooltime = MapleDataTool.getInt("interval", skillData, 0) * 1000;
|
||||||
int iprop = MapleDataTool.getInt("prop", skillData, 100);
|
int iprop = MapleDataTool.getInt("prop", skillData, 100);
|
||||||
@@ -103,6 +104,7 @@ public class MobSkillFactory {
|
|||||||
ret.setSpawnEffect(effect);
|
ret.setSpawnEffect(effect);
|
||||||
ret.setX(x);
|
ret.setX(x);
|
||||||
ret.setY(y);
|
ret.setY(y);
|
||||||
|
ret.setCount(count);
|
||||||
ret.setProp(prop);
|
ret.setProp(prop);
|
||||||
ret.setLimit(limit);
|
ret.setLimit(limit);
|
||||||
ret.setLtRb(lt, rb);
|
ret.setLtRb(lt, rb);
|
||||||
|
|||||||
Reference in New Issue
Block a user