From fe5ea7fe415857f49d6630f2b0f50e1246c38eee Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 3 Mar 2016 15:45:10 -0500 Subject: c++'d more stuff --- src/gameplay.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gameplay.cpp') diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 3d2ea25..a286db9 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -68,12 +68,12 @@ int commonAIFunc(NPC *speaker){ */ if((oxml = exml->FirstChildElement("quest"))){ - const char *qname; + std::string qname; - while(oxml){ - if((qname = oxml->Attribute("assign"))) + while ( oxml ) { + if ( !(qname = oxml->StrAttribute("assign")).empty() ) player->qh.assign(qname,"None",(std::string)oxml->GetText()); - else if((qname = oxml->Attribute("check"))){ + else if( !(qname = oxml->StrAttribute("check")).empty() ){ if(player->qh.hasQuest(qname) && player->qh.finish(qname)){ goto CONT; }else{ @@ -283,7 +283,7 @@ void initEverything(void){ * Read in the XML file. */ - currentWorld = loadWorldFromXML(xmlFiles[i].c_str()); + currentWorld = loadWorldFromXML(xmlFiles[i]); break; } } -- cgit v1.2.3