Fix mob summoning mobskill not working
This commit is contained in:
@@ -290,7 +290,7 @@ public class MobSkill {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void summonMonsters(Monster monster) {
|
private void summonMonsters(Monster monster) {
|
||||||
int skillLimit = this.getLimit();
|
int skillLimit = this.limit;
|
||||||
MapleMap map = monster.getMap();
|
MapleMap map = monster.getMap();
|
||||||
|
|
||||||
if (MapId.isDojo(map.getId())) { // spawns in dojo should be unlimited
|
if (MapId.isDojo(map.getId())) { // spawns in dojo should be unlimited
|
||||||
@@ -298,7 +298,7 @@ public class MobSkill {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (map.getSpawnedMonstersOnMap() < 80) {
|
if (map.getSpawnedMonstersOnMap() < 80) {
|
||||||
List<Integer> summons = getSummons();
|
List<Integer> summons = new ArrayList<>(toSummon);
|
||||||
int summonLimit = monster.countAvailableMobSummons(summons.size(), skillLimit);
|
int summonLimit = monster.countAvailableMobSummons(summons.size(), skillLimit);
|
||||||
if (summonLimit >= 1) {
|
if (summonLimit >= 1) {
|
||||||
boolean bossRushMap = MapId.isBossRush(map.getId());
|
boolean bossRushMap = MapId.isBossRush(map.getId());
|
||||||
@@ -354,7 +354,7 @@ public class MobSkill {
|
|||||||
if (toSpawn.getId() == MobId.LOW_DARKSTAR) {
|
if (toSpawn.getId() == MobId.LOW_DARKSTAR) {
|
||||||
map.spawnFakeMonster(toSpawn);
|
map.spawnFakeMonster(toSpawn);
|
||||||
} else {
|
} else {
|
||||||
map.spawnMonsterWithEffect(toSpawn, getSpawnEffect(), toSpawn.getPosition());
|
map.spawnMonsterWithEffect(toSpawn, spawnEffect, toSpawn.getPosition());
|
||||||
}
|
}
|
||||||
monster.addSummonedMob(toSpawn);
|
monster.addSummonedMob(toSpawn);
|
||||||
}
|
}
|
||||||
@@ -409,14 +409,6 @@ public class MobSkill {
|
|||||||
return mpCon;
|
return mpCon;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> getSummons() {
|
|
||||||
return toSummon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSpawnEffect() {
|
|
||||||
return spawnEffect;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getHP() {
|
public int getHP() {
|
||||||
return hp;
|
return hp;
|
||||||
}
|
}
|
||||||
@@ -437,18 +429,6 @@ public class MobSkill {
|
|||||||
return cooltime;
|
return cooltime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Point getLt() {
|
|
||||||
return lt;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Point getRb() {
|
|
||||||
return rb;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getLimit() {
|
|
||||||
return limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean makeChanceResult() {
|
public boolean makeChanceResult() {
|
||||||
return prop == 1.0 || Math.random() < prop;
|
return prop == 1.0 || Math.random() < prop;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user