aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-03-04 07:31:12 -0500
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-03-04 07:31:12 -0500
commit6af8dcbaa41a7db52ff8f6074d2b113ec7eaf12d (patch)
tree96be39f3670d5dd2d71b001340d7aff9b6164003 /src/gameplay.cpp
parentb61bbe703a03d58dc660d05b4bb32f69a4c70436 (diff)
parentfe5ea7fe415857f49d6630f2b0f50e1246c38eee (diff)
Merge branch 'master' of http://github.com/tcsullivan/gamedev
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}
}