Quest System Progression

This commit is contained in:
FatBoy committed 2025-01-18 20:21:21 -06:00
1 parent 0b5c3c7c9b
commit e6e1cab715
2 files changed
+9 -2

No files matched your search

+9
View File
@@ -14,6 +14,7 @@ import engine.Enum;
import engine.Enum.*;
import engine.InterestManagement.InterestManager;
import engine.InterestManagement.WorldGrid;
import engine.QuestSystem.QuestManager;
import engine.exception.SerializationException;
import engine.gameManager.*;
import engine.job.JobScheduler;
@@ -1271,6 +1272,14 @@ public class Mob extends AbstractIntelligenceAgent {
// Give XP, now handled inside the Experience Object
if (!this.isPet() && !this.isNecroPet() && !(this.agentType.equals(AIAgentType.PET)) && !this.isPlayerGuard)
Experience.doExperience((PlayerCharacter) attacker, this, g);
//handle quest updates
PlayerCharacter pc = (PlayerCharacter)attacker;
if(QuestManager.acceptedQuests.containsKey(pc)){
QuestManager.acceptedQuests.get(pc).tryProgress(this.firstName);
}
} else if (attacker.getObjectType().equals(GameObjectType.Mob)) {
Mob mobAttacker = (Mob) attacker;