Implement achievements properly

This commit is contained in:
Melledy
2025-11-29 00:29:04 -08:00
parent 898e8dd43f
commit f53bdaba32
44 changed files with 818 additions and 115 deletions

View File

@@ -6,7 +6,9 @@ import java.util.Map;
import dev.morphia.annotations.Entity;
import emu.nebula.Nebula;
import emu.nebula.data.resources.ChatDef;
import emu.nebula.game.achievement.AchievementCondition;
import emu.nebula.game.player.PlayerChangeInfo;
import emu.nebula.game.quest.QuestCondition;
import emu.nebula.net.NetMsgId;
import emu.nebula.proto.Public.Contacts;
import emu.nebula.proto.Public.UI32;
@@ -125,6 +127,9 @@ public class CharacterContact {
);
}
// Trigger quest/achievement
this.getCharacter().getPlayer().triggerAchievement(AchievementCondition.ChatTotal, 1);
// Success
return change.setSuccess(true);
}