dungeon drop implementation (#2215)

* dungeon drop implementation

* Update src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>

---------

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
This commit is contained in:
dragon
2023-06-18 03:56:47 +08:00
committed by GitHub
parent 06d5bf7098
commit 4ebe6fbf63
4 changed files with 17 additions and 2 deletions

View File

@@ -80,6 +80,14 @@ public final class DropSystem extends BaseGameSystem {
return dropData.getDropId();
}
public List<GameItem> handleDungeonRewardDrop(int dropId, boolean doubleReward) {
if (!dropTable.containsKey(dropId)) return List.of();
var dropData = dropTable.get(dropId);
List<GameItem> items = new ArrayList<>();
processDrop(dropData, doubleReward ? 2 : 1, items);
return items;
}
public boolean handleMonsterDrop(EntityMonster monster) {
int dropId;
int level = monster.getLevel();