diff options
-rw-r--r-- | sql-files/upgrade_svn13960_questlog.sql (renamed from sql-files/upgrade_svn_questlog.sql) | 0 | ||||
-rw-r--r-- | sql-files/upgrade_svn13963.sql (renamed from sql-files/upgrade_svn_13963.sql) | 0 | ||||
-rw-r--r-- | src/common/mmo.h | 2 | ||||
-rw-r--r-- | src/map/pc.h | 1 | ||||
-rw-r--r-- | src/map/quest.c | 10 | ||||
-rw-r--r-- | src/map/script.c | 1 |
6 files changed, 7 insertions, 7 deletions
diff --git a/sql-files/upgrade_svn_questlog.sql b/sql-files/upgrade_svn13960_questlog.sql index c7a42960f..c7a42960f 100644 --- a/sql-files/upgrade_svn_questlog.sql +++ b/sql-files/upgrade_svn13960_questlog.sql diff --git a/sql-files/upgrade_svn_13963.sql b/sql-files/upgrade_svn13963.sql index 97211ba44..97211ba44 100644 --- a/sql-files/upgrade_svn_13963.sql +++ b/sql-files/upgrade_svn13963.sql diff --git a/src/common/mmo.h b/src/common/mmo.h index 029f5e115..61c2f5217 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -135,7 +135,7 @@ struct quest { int mob[MAX_QUEST_OBJECTIVES]; int count[MAX_QUEST_OBJECTIVES]; quest_state state; - + bool save_quest; int num_objectives; }; diff --git a/src/map/pc.h b/src/map/pc.h index 925db7184..c219c8f45 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -380,7 +380,6 @@ struct map_session_data { //Quest log system [Kevin] [Inkfish] int num_quests; int avail_quests; - bool save_quest[MAX_QUEST_DB]; struct quest quest_log[MAX_QUEST_DB]; // temporary debug [flaviojs] diff --git a/src/map/quest.c b/src/map/quest.c index f146ca325..360cebd29 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -184,7 +184,7 @@ void quest_update_objective(TBL_PC * sd, int mob) if( sd->quest_log[i].mob[j] == mob ) { sd->quest_log[i].count[j]++; - sd->save_quest[i] = true; + sd->quest_log[i].save_quest = true; //clif_send_quest_info(sd, &sd->quest_log[i]); //TODO: Figure out the real packet [Inkfish] //break; } @@ -207,7 +207,7 @@ int quest_update_status(TBL_PC * sd, int quest_id, int status) if( status != Q_COMPLETE ) { clif_send_quest_status(sd, quest_id, (bool)status); - sd->save_quest[i] = true; + sd->quest_log[i].save_quest = true; } else { @@ -220,7 +220,7 @@ int quest_update_status(TBL_PC * sd, int quest_id, int status) memcpy(&sd->quest_log[i], &sd->quest_log[sd->avail_quests],sizeof(struct quest)); memcpy(&sd->quest_log[sd->avail_quests], &tmp_quest,sizeof(struct quest)); - sd->save_quest[sd->avail_quests] = true; + sd->quest_log[sd->avail_quests].save_quest = true; } return 0; @@ -231,7 +231,7 @@ int quest_save(TBL_PC * sd) int i; for( i = 0; i < sd->num_quests; i++ ) - if( sd->save_quest[i] ) + if( sd->quest_log[i].save_quest ) intif_quest_save(sd->status.char_id, &sd->quest_log[i]); return 0; @@ -253,7 +253,7 @@ int quest_save_ack(int char_id, int quest_id, int success) return -1; if(success) - sd->save_quest[i] = false; + sd->quest_log[i].save_quest = false; else { ShowError("Quest %d for character %d could not be saved!\n", quest_id, char_id); diff --git a/src/map/script.c b/src/map/script.c index fd1fa5b0e..a2a60c13d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13447,6 +13447,7 @@ BUILDIN_FUNC(completequest) TBL_PC * sd = script_rid2sd(st); quest_update_status(sd, script_getnum(st, 2), Q_COMPLETE); + intif_quest_save(sd->status.char_id, &sd->quest_log[sd->avail_quests]); return 0; } |