mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-22 03:19:12 +01:00
Remove Fallhaven prisoner when reaching quest farrik:70
This commit is contained in:
@@ -374,6 +374,11 @@
|
||||
"rewardType": "questProgress",
|
||||
"rewardID": "farrik",
|
||||
"value": 70
|
||||
},
|
||||
{
|
||||
"rewardType": "removeSpawnArea",
|
||||
"mapName": "fallhaven_prison",
|
||||
"rewardID": "fallhaven_prisoner"
|
||||
}
|
||||
],
|
||||
"replies": [
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.gpl.rpg.AndorsTrail.model.ability.SkillInfo;
|
||||
import com.gpl.rpg.AndorsTrail.model.actor.Player;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.Inventory;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.QuestProgress;
|
||||
import com.gpl.rpg.AndorsTrail.util.Range;
|
||||
|
||||
@@ -103,6 +105,20 @@ public final class LegacySavegameFormatReaderForPlayer {
|
||||
player.addQuestProgress(new QuestProgress("lodar13_rest", 65));
|
||||
}
|
||||
}
|
||||
|
||||
if (fileversion <= 40) {
|
||||
if (player.hasExactQuestProgress("farrik", 70)) {
|
||||
deactivateSpawnArea(world, controllers, "fallhaven_prison", "fallhaven_prisoner");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void deactivateSpawnArea(WorldContext world, ControllerContext controllers, String mapName, String monsterTypeSpawnGroup) {
|
||||
PredefinedMap map = world.maps.findPredefinedMap("fallhaven_prison");
|
||||
for (MonsterSpawnArea area : map.spawnAreas) {
|
||||
if (!area.monsterTypeSpawnGroup.equals("fallhaven_prisoner")) continue;
|
||||
controllers.monsterSpawnController.deactivateSpawnArea(area, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getExpectedNumberOfSkillpointsForLevel(int level) {
|
||||
|
||||
Reference in New Issue
Block a user