aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Quests
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-06-24 16:11:11 +0200
committerShauren <shauren.trinity@gmail.com>2025-06-24 16:11:11 +0200
commit39c06d40e26ca7c1651e266cde16e031066610f5 (patch)
treecac73bb1ea81d5e80c59cd567017cf7c44ccffe5 /src/server/game/Quests
parentd89ebc125c971e4ab093f141f07f3c2aeb920dda (diff)
Core/Misc: Use new Field::Get*OrNull where possible
Diffstat (limited to 'src/server/game/Quests')
-rw-r--r--src/server/game/Quests/QuestDef.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 023cc51d2f9..0b7b7a2e668 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -286,16 +286,11 @@ void Quest::LoadQuestObjective(Field* fields)
if (hasCompletionEffect)
{
obj.CompletionEffect = new QuestObjectiveAction();
- if (!fields[10].IsNull())
- obj.CompletionEffect->GameEventId = fields[10].GetUInt32();
- if (!fields[11].IsNull())
- obj.CompletionEffect->SpellId = fields[11].GetUInt32();
- if (!fields[12].IsNull())
- obj.CompletionEffect->ConversationId = fields[12].GetUInt32();
- if (!fields[13].IsNull())
- obj.CompletionEffect->UpdatePhaseShift = fields[13].GetBool();
- if (!fields[14].IsNull())
- obj.CompletionEffect->UpdateZoneAuras = fields[14].GetBool();
+ obj.CompletionEffect->GameEventId = fields[10].GetUInt32OrNull();
+ obj.CompletionEffect->SpellId = fields[11].GetUInt32OrNull();
+ obj.CompletionEffect->ConversationId = fields[12].GetUInt32OrNull();
+ obj.CompletionEffect->UpdatePhaseShift = fields[13].GetBool();
+ obj.CompletionEffect->UpdateZoneAuras = fields[14].GetBool();
}
_usedQuestObjectiveTypes[obj.Type] = true;