summaryrefslogtreecommitdiff
path: root/src/map
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 /src/map
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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/quest.c14
1 files changed, 1 insertions, 13 deletions
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);