mirror of
https://github.com/Melledy/Nebula.git
synced 2026-09-19 17:19:58 +02:00
Handle more achievements
This commit is contained in:
@@ -18,6 +18,7 @@ import emu.nebula.data.GameData;
|
||||
import emu.nebula.data.resources.CharacterDef;
|
||||
import emu.nebula.data.resources.TalentGroupDef;
|
||||
import emu.nebula.database.GameDatabaseObject;
|
||||
import emu.nebula.game.achievement.AchievementCondition;
|
||||
import emu.nebula.game.inventory.ItemParamMap;
|
||||
import emu.nebula.game.player.Player;
|
||||
import emu.nebula.game.player.PlayerChangeInfo;
|
||||
@@ -117,6 +118,10 @@ public class GameCharacter implements GameDatabaseObject {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isMaster() {
|
||||
return this.getData().getGrade() == 1;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
@@ -272,6 +277,9 @@ public class GameCharacter implements GameDatabaseObject {
|
||||
// Save to database
|
||||
this.save();
|
||||
|
||||
// Trigger quest/achievement
|
||||
this.getPlayer().trigger(AchievementCondition.CharacterAdvanceTotal, 1);
|
||||
|
||||
// Success
|
||||
return changes.setSuccess(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user