fix(Core/SmartAI) Fix null reference when summoning (#14812)

This commit is contained in:
AnchyDev
2023-01-31 23:18:39 +11:00
committed by GitHub
parent c12d56f2d1
commit 50e2eb8593

View File

@@ -269,11 +269,10 @@ void TempSummon::InitSummon()
owner->ToGameObject()->AI()->JustSummoned(this);
}
}
}
// Xinef: Allow to call this hook when npc is summoned by gameobject, in this case pass this as summoner to avoid possible null checks
if (IsAIEnabled)
AI()->IsSummonedBy(owner);
if (IsAIEnabled)
AI()->IsSummonedBy(owner);
}
}
void TempSummon::SetTempSummonType(TempSummonType type)