summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-12 07:11:01 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-12 07:11:01 +0000
commit653c88c4f1bf019f61132324fd7146ae2f858cec (patch)
tree17fc752c4161a8c6e712aa7dee29b2864a04d3e2
parentd998f617b0426c651b014fe9fff67cb49b472edf (diff)
downloadhercules-653c88c4f1bf019f61132324fd7146ae2f858cec.tar.gz
hercules-653c88c4f1bf019f61132324fd7146ae2f858cec.tar.bz2
hercules-653c88c4f1bf019f61132324fd7146ae2f858cec.tar.xz
hercules-653c88c4f1bf019f61132324fd7146ae2f858cec.zip
Fixed changequest behavior(before: completequest+setquest, now: erasequest+setquest)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14002 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--doc/script_commands.txt4
-rw-r--r--src/map/quest.c14
3 files changed, 5 insertions, 15 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index e29ff68af..c5799766a 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+09/08/11
+ * Fixed changequest behavior(before: completequest+setquest, now: erasequest+setquest) [Inkfish]
09/08/10
* Fixed autospell and autobonus will still trigger even if the chance is 0. [Inkfish]
* Disabled "show_party_share_picker" functioning on client older than 20071002 to prevent from disconnection. (bugreport:3457) [Inkfish]
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 880167797..ce0cf73a8 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -1198,7 +1198,7 @@ with other command, such as "if", but often used on it's own.
Label:
mes "This will be seen";
-Note by FlavioJS: goto's are "evil" and should be avoided if possible (ò_ó)
+Note by FlavioJS: goto's are "evil" and should be avoided if possible (ò_?
---------------------------------------
@@ -6554,7 +6554,7 @@ Remove the quest of the given <ID> from the user's quest log.
*changequest <ID>,<ID2>;
-Remove quest of the given <ID> from the user's quest log, and change state to "complete".
+Remove quest of the given <ID> from the user's quest log.
Add quest of the <ID2> to the the quest log, and the state is "active".
---------------------------------------
diff --git a/src/map/quest.c b/src/map/quest.c
index 4b147f5a1..9c1da6aa5 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -116,12 +116,6 @@ int quest_change(TBL_PC * sd, int qid1, int qid2)
int i, j, count;
- if( sd->num_quests >= MAX_QUEST_DB )
- {
- ShowError("quest_change: Character %d has got all the quests.(max quests: %d)\n", sd->status.char_id, MAX_QUEST_DB);
- return 1;
- }
-
if( quest_check(sd, qid2, HAVEQUEST) >= 0 )
{
ShowError("quest_change: Character %d already has quest %d.\n", sd->status.char_id, qid2);
@@ -147,12 +141,6 @@ int quest_change(TBL_PC * sd, int qid1, int qid2)
return -1;
}
- // Complete quest
- sd->quest_log[i].state = Q_COMPLETE;
- memcpy(&sd->quest_log[sd->num_quests], &sd->quest_log[i],sizeof(struct quest));
- clif_send_quest_delete(sd, qid1);
-
- // Add new quest
memset(&sd->quest_log[i], 0, sizeof(struct quest));
sd->quest_log[i].quest_id = quest_db[j].id;
if( quest_db[j].time )
@@ -162,7 +150,7 @@ int quest_change(TBL_PC * sd, int qid1, int qid2)
sd->quest_log[i].mob[count] = quest_db[j].mob[count];
sd->quest_log[i].num_objectives = count;
- sd->num_quests++;
+ clif_send_quest_delete(sd, qid1);
if( save_settings&64 )
chrif_save(sd,0);