mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Create ScriptedAIs that require a InstanceScript reference only if the InstanceScript exists, so if these Creatures are in an instance. ScriptedAIs that don't require a InstanceScript reference have not been modified. This fixes many possible NULL dereference crashes happening when spawning a scripted Creature outside of an instance. Fixed a GetOwner() and a ToPlayer() NULL dereference crashes too.