Core/SAI: merged a smartAI crash fix
This commit is contained in:
1 parent
a7c11d723e
commit
4f6263e6f3
1 file changed
+2
-2
@@ -71,7 +71,7 @@ bool SmartScript::IsSmart(Creature* c, bool silent)
|
||||
return false;
|
||||
|
||||
bool smart = true;
|
||||
if (!me || me->GetAIName() != "SmartAI")
|
||||
if (!dynamic_cast<SmartAI*>(c->AI()))
|
||||
smart = false;
|
||||
|
||||
if (!smart && !silent)
|
||||
@@ -87,7 +87,7 @@ bool SmartScript::IsSmart(GameObject* g, bool silent)
|
||||
return false;
|
||||
|
||||
bool smart = true;
|
||||
if (g && g->GetAIName() != "SmartGameObjectAI")
|
||||
if (!dynamic_cast<SmartGameObjectAI*>(g->AI()))
|
||||
smart = false;
|
||||
|
||||
if (!smart && !silent)
|
||||
|
||||
Reference in new issue
Block a user