Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Fix stage storage from freeQuests (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Feb 7, 2022
1 parent 5a722dc commit d405eae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/scripts/creaturescripts/customs/freequests.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local stage = configManager.getNumber(configKeys.FREE_QUEST_STAGE)

local questTable = {
{storage = Storage.BigfootBurden.QuestLine, storageValue = 2},
{storage = Storage.BigfootBurden.QuestLine, storageValue = 4},
Expand Down Expand Up @@ -309,7 +311,7 @@ local function playerFreeQuestStart(playerId, index)
index = index + 1
if not questTable[index] then
player:sendTextMessage(MESSAGE_INFO_DESCR, "Player FreeQuest is complete.")
player:setStorageValue(Storage.FreeQuests, upperLimit)
player:setStorageValue(Storage.FreeQuests, stage)
return
end

Expand All @@ -325,7 +327,7 @@ local freeQuests = CreatureEvent("FreeQuests")

function freeQuests.onLogin(player)
if not configManager.getBoolean(configKeys.TOGGLE_FREE_QUEST) or
player:getStorageValue(Storage.FreeQuests) == configManager.getNumber(configKeys.FREE_QUEST_STAGE) then
player:getStorageValue(Storage.FreeQuests) == stage then
return true
end

Expand Down

0 comments on commit d405eae

Please sign in to comment.