Instead, you should add this main quest-checking function to myMod.lua somewhere:
Code: Select all
Methods.IsReceivingMainQuestJournal = function(pid)
local mainQuestPrefixes = { "a1", "a2", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "c0", "c2", "c3" }
for i = 0, tes3mp.GetJournalChangesSize(pid) - 1 do
local quest = tes3mp.GetJournalItemQuest(pid, i)
local questPrefix = string.sub(quest, 1, 2)
if tableHelper.containsValue(mainQuestPrefixes, questPrefix) then
return true
end
end
return false
end
Code: Select all
Methods.OnPlayerJournal = function(pid)
if Players[pid] ~= nil and Players[pid]:IsLoggedIn() then
if config.shareJournal == true then
WorldInstance:SaveJournal(pid)
tes3mp.SendJournalChanges(pid, true)
else
Players[pid]:SaveJournal()
end
end
end
Code: Select all
Methods.OnPlayerJournal = function(pid)
if Players[pid] ~= nil and Players[pid]:IsLoggedIn() then
if Methods.IsReceivingMainQuestJournal(pid) then
WorldInstance:SaveJournal(pid)
tes3mp.SendJournalChanges(pid, true)
else
Players[pid]:SaveJournal()
end
end
end