Core/SAI: Fixed crashes when SAI targets pets that use sai if not tamed
Port From (https://github.com/TrinityCore/TrinityCore/commit/334b02e1daeac7be31ed3ce855a5ff221add80aa)
This commit is contained in:
@@ -4112,7 +4112,7 @@ namespace Game.AI
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool smart = true;
|
bool smart = true;
|
||||||
if (creature != null && creature.GetAIName() != "SmartAI")
|
if (creature.GetAI<SmartAI>() == null)
|
||||||
smart = false;
|
smart = false;
|
||||||
|
|
||||||
if (!smart && !silent)
|
if (!smart && !silent)
|
||||||
@@ -4127,7 +4127,7 @@ namespace Game.AI
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool smart = true;
|
bool smart = true;
|
||||||
if (gameObject != null && gameObject.GetAIName() != "SmartGameObjectAI")
|
if (gameObject.GetAI<SmartAI>() == null)
|
||||||
smart = false;
|
smart = false;
|
||||||
|
|
||||||
if (!smart && !silent)
|
if (!smart && !silent)
|
||||||
|
|||||||
Reference in New Issue
Block a user