diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-20 00:25:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-20 00:25:58 +0300 |
commit | 092b7e47263555de36ac7c34bfc681e680b71bbf (patch) | |
tree | 437f20eef66c7458e34a4783598de22c08a76fa1 /src/map/script.c | |
parent | d38a0b63bd821e043435b852a7dea9ad0f89262e (diff) | |
download | plugin-092b7e47263555de36ac7c34bfc681e680b71bbf.tar.gz plugin-092b7e47263555de36ac7c34bfc681e680b71bbf.tar.bz2 plugin-092b7e47263555de36ac7c34bfc681e680b71bbf.tar.xz plugin-092b7e47263555de36ac7c34bfc681e680b71bbf.zip |
Extend setq/getq to using objectives to storing quest value.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 80e43c2..932a3f0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10,6 +10,7 @@ #include "../../../common/mmo.h" #include "../../../common/socket.h" #include "../../../common/strlib.h" +#include "../../../map/chrif.h" #include "../../../map/clif.h" #include "../../../map/npc.h" #include "../../../map/pc.h" @@ -269,7 +270,10 @@ BUILDIN(setq) sd->quest_log[i].count[0] = quest_value; sd->save_quest = true; - clif->quest_update_objective(sd, &sd->quest_log[i]); + if (map->save_settings & 64) + chrif->save(sd,0); + + eclif_quest_add(sd, &sd->quest_log[i]); return true; } @@ -287,7 +291,6 @@ BUILDIN(getq) ARR_FIND(0, sd->num_quests, i, sd->quest_log[i].quest_id == quest_id); if (i == sd->num_quests) { - ShowError("Quest with id=%d not found\n", quest_id); script_pushint(st, 0); return false; } |