mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 09:55:11 +00:00
Quest Item for Party
This commit is contained in:
1 parent
bad6f88270
commit
1c77828f28
3 files changed
+279
-64
No files matched your search
@@ -189,34 +189,32 @@ public class PartyController {
|
||||
}
|
||||
|
||||
public boolean checkQuestCompletion(Party party, EnumQuestType type) {
|
||||
boolean bo = false;
|
||||
QuestData questData = party.getQuestData();
|
||||
if(questData == null)
|
||||
return bo;
|
||||
|
||||
if(questData.quest.type != type && type != null)
|
||||
return bo;
|
||||
|
||||
QuestInterface inter = questData.quest.questInterface;
|
||||
if(inter.isPartyCompleted(party)){
|
||||
if((!questData.isCompleted && questData.quest.completion == EnumQuestCompletion.Npc) || questData.quest.instantPartyComplete(party)){
|
||||
questData.isCompleted = true;
|
||||
if (questData.quest.completion == EnumQuestCompletion.Npc) {
|
||||
EventHooks.onPartyFinished(party, questData.quest);
|
||||
if(questData != null){
|
||||
if(questData.quest.type != type && type != null){
|
||||
QuestInterface inter = questData.quest.questInterface;
|
||||
if(inter.isPartyCompleted(party)){
|
||||
if((!questData.isCompleted && questData.quest.completion == EnumQuestCompletion.Npc) || questData.quest.instantPartyComplete(party)){
|
||||
questData.isCompleted = true;
|
||||
if (questData.quest.completion == EnumQuestCompletion.Npc) {
|
||||
EventHooks.onPartyFinished(party, questData.quest);
|
||||
}
|
||||
party.setQuest(null);
|
||||
PartyController.Instance().pingPartyUpdate(party);
|
||||
PartyController.Instance().sendQuestChat(party, "party.completeChat");
|
||||
}
|
||||
} else {
|
||||
questData.isCompleted = false;
|
||||
}
|
||||
bo = true;
|
||||
party.setQuest(null);
|
||||
PartyController.Instance().pingPartyUpdate(party);
|
||||
PartyController.Instance().sendQuestChat(party, "party.completeChat");
|
||||
}
|
||||
} else {
|
||||
questData.isCompleted = false;
|
||||
}
|
||||
// if (this.trackedQuest != null && questData.quest.getId() == this.trackedQuest.getId()) {
|
||||
// NoppesUtilPlayer.sendTrackedQuestData((EntityPlayerMP) player);
|
||||
// }
|
||||
QuestItem.pickedUp = null;
|
||||
return bo;
|
||||
|
||||
// if (this.trackedQuest != null && questData.quest.getId() == this.trackedQuest.getId()) {
|
||||
// NoppesUtilPlayer.sendTrackedQuestData((EntityPlayerMP) player);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
QuestItem.pickedUpParty = null;
|
||||
QuestItem.pickedUpPlayer = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user