forked from MagicBane/Server
Quest System Progression
This commit is contained in:
@@ -483,10 +483,8 @@ public class Contract extends AbstractGameObject {
|
|||||||
//vd.getOptions().clear();
|
//vd.getOptions().clear();
|
||||||
switch(optionId) {
|
switch(optionId) {
|
||||||
default:
|
default:
|
||||||
if (pc.isBoxed) {
|
|
||||||
MenuOption optionAcceptQuest = new MenuOption(25020401, "Accept Quest", 25020401);
|
MenuOption optionAcceptQuest = new MenuOption(25020401, "Accept Quest", 25020401);
|
||||||
vd.getOptions().add(optionAcceptQuest);
|
vd.getOptions().add(optionAcceptQuest);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 25020401:
|
case 25020401:
|
||||||
QuestManager.acceptQuest(pc,QuestManager.getQuestForContract(npc));
|
QuestManager.acceptQuest(pc,QuestManager.getQuestForContract(npc));
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import engine.Enum;
|
|||||||
import engine.Enum.*;
|
import engine.Enum.*;
|
||||||
import engine.InterestManagement.InterestManager;
|
import engine.InterestManagement.InterestManager;
|
||||||
import engine.InterestManagement.WorldGrid;
|
import engine.InterestManagement.WorldGrid;
|
||||||
|
import engine.QuestSystem.QuestManager;
|
||||||
import engine.exception.SerializationException;
|
import engine.exception.SerializationException;
|
||||||
import engine.gameManager.*;
|
import engine.gameManager.*;
|
||||||
import engine.job.JobScheduler;
|
import engine.job.JobScheduler;
|
||||||
@@ -1271,6 +1272,14 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
// Give XP, now handled inside the Experience Object
|
// Give XP, now handled inside the Experience Object
|
||||||
if (!this.isPet() && !this.isNecroPet() && !(this.agentType.equals(AIAgentType.PET)) && !this.isPlayerGuard)
|
if (!this.isPet() && !this.isNecroPet() && !(this.agentType.equals(AIAgentType.PET)) && !this.isPlayerGuard)
|
||||||
Experience.doExperience((PlayerCharacter) attacker, this, g);
|
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)) {
|
} else if (attacker.getObjectType().equals(GameObjectType.Mob)) {
|
||||||
Mob mobAttacker = (Mob) attacker;
|
Mob mobAttacker = (Mob) attacker;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user