aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index 5633eb8..bceb811 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -82,10 +82,9 @@ int commonAIFunc(NPC *speaker){
player->qh.current.push_back(tmp);
}else if((qname = oxml->Attribute("check"))){
- if(player->qh.hasQuest(qname)){
- ui::dialogBox(speaker->name,NULL,false,"Nice meme");
- ui::waitForDialog();
- return 0;
+ if(player->qh.hasQuest(qname) && player->qh.finish(qname)){
+ player->qh.finish(qname);
+ goto CONT;
}else{
oldidx = speaker->dialogIndex;
speaker->dialogIndex = oxml->UnsignedAttribute("fail");
@@ -96,7 +95,9 @@ int commonAIFunc(NPC *speaker){
oxml = oxml->NextSiblingElement();
}
}
-
+
+CONT:
+
/*
* Handle any 'give' requests.
*/
@@ -152,7 +153,7 @@ int commonAIFunc(NPC *speaker){
* Get the player's choice, then set the XMLElement to the option's block.
*/
- ui::dialogBox(speaker->name,optstr.c_str(),false,exml->GetText());
+ ui::dialogBox(speaker->name,optstr.c_str(),false,exml->GetText()+1);
ui::waitForDialog();
if(ui::dialogOptChosen)
@@ -161,12 +162,12 @@ int commonAIFunc(NPC *speaker){
while(!dopt.empty())
dopt.pop_back();
}else{
-
+
/*
* No options - simply print the text.
*/
- ui::dialogBox(speaker->name,"",false,exml->GetText());
+ ui::dialogBox(speaker->name,NULL,false,exml->GetText());
ui::waitForDialog();
}