From 16f2137844df6759c3ce2c1f93932fa1a185451e Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Sat, 20 Oct 2012 21:55:16 +0200 Subject: Daily Quest: move calculation of DailyQuestPoints into separate function. --- world/map/npc/functions/dailyquest.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'world/map/npc/functions/dailyquest.txt') 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) -- cgit v1.2.3-70-g09d2