summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2012-10-20 21:55:16 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2012-10-21 10:33:35 +0200
commit16f2137844df6759c3ce2c1f93932fa1a185451e (patch)
tree0d309ad9d28cda8e087372ba85d5e02ab43b4012
parenta9486fc70e9b7678c3289c0550df28e0a642f18b (diff)
downloadserverdata-16f2137844df6759c3ce2c1f93932fa1a185451e.tar.gz
serverdata-16f2137844df6759c3ce2c1f93932fa1a185451e.tar.bz2
serverdata-16f2137844df6759c3ce2c1f93932fa1a185451e.tar.xz
serverdata-16f2137844df6759c3ce2c1f93932fa1a185451e.zip
Daily Quest: move calculation of DailyQuestPoints into separate function.
-rw-r--r--world/map/npc/functions/dailyquest.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/world/map/npc/functions/dailyquest.txt b/world/map/npc/functions/dailyquest.txt
index 6a09c291..c0e6c998 100644
--- a/world/map/npc/functions/dailyquest.txt
+++ b/world/map/npc/functions/dailyquest.txt
@@ -27,8 +27,7 @@
// (DailyQuestBonus makes a good reward from non-daily quests)
-
-function|script|DailyQuest|{
+function|script|DailyQuestPoints|{
set @dq_earliest, gettimetick(2) - 86400;
if (DailyQuestTime < @dq_earliest)
set DailyQuestTime, @dq_earliest;
@@ -53,6 +52,13 @@ L_Bonus:
set DailyQuestPoints, DailyQuestPoints + DailyQuestBonus;
set DailyQuestBonus, 0;
+ return;
+}
+
+function|script|DailyQuest|{
+
+ callfunc "DailyQuestPoints";
+
if (BaseLevel < @dq_level)
goto L_Low_Level;
if (DailyQuestPoints < @dq_cost)