aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-02-10 08:48:49 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-02-10 08:48:49 -0500
commit3033594b89f23e65b6152daa6610f991307f2f67 (patch)
tree920a7c1b35946210683cdd1146cd0afeb7e24b7d /src/gameplay.cpp
parent1382f79d57060dc38f6c45fd4fc865e0e565f90b (diff)
quests, inventory good
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index bceb811..e252c26 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -69,21 +69,12 @@ int commonAIFunc(NPC *speaker){
if((oxml = exml->FirstChildElement("quest"))){
const char *qname;
- Quest tmp;
+
while(oxml){
- if((qname = oxml->Attribute("assign"))){
- tmp.title = qname;
- tmp.desc = "None";
- tmp.reward = (struct item_t){0,0};
-
- if(oxml->GetText()){
- tmp.need.push_back(oxml->GetText());
- }
-
- player->qh.current.push_back(tmp);
- }else if((qname = oxml->Attribute("check"))){
+ if((qname = oxml->Attribute("assign")))
+ player->qh.assign(qname,"None",(std::string)oxml->GetText());
+ else if((qname = oxml->Attribute("check"))){
if(player->qh.hasQuest(qname) && player->qh.finish(qname)){
- player->qh.finish(qname);
goto CONT;
}else{
oldidx = speaker->dialogIndex;