Change how we handle null quest initiator in QuestManager::say

Timers etc triggered say's don't have an initiator but should still
work.

The target ID is set in QuestJournalledSay for us so not needed here
This commit is contained in:
Michael Cook (mackal) 2019-08-13 15:11:37 -04:00
parent 1ef577bc25
commit 963da70506

View File

@ -161,12 +161,10 @@ void QuestManager::say(const char *str, Journal::Options &opts) {
return;
}
else {
if (!RuleB(NPC, EnableNPCQuestJournal))
// if there is no initiator we still want stuff to work (timers, signals, waypoints, etc)
if (!RuleB(NPC, EnableNPCQuestJournal) || initiator == nullptr)
opts.journal_mode = Journal::Mode::None;
if (initiator) {
opts.target_spawn_id = initiator->GetID();
owner->QuestJournalledSay(initiator, str, opts);
}
owner->QuestJournalledSay(initiator, str, opts);
}
}