Created
January 16, 2019 07:24
-
-
Save Langerz82/aaa4b70a9b037ee3b6a41f7676ce023c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp | |
index a831649589..e921922b24 100644 | |
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp | |
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp | |
@@ -996,7 +996,8 @@ void SmartGameObjectAI::UpdateAI(uint32 diff) | |
void SmartGameObjectAI::InitializeAI() | |
{ | |
GetScript()->OnInitialize(me); | |
- //Reset(); | |
+ | |
+ Reset(); | |
} | |
void SmartGameObjectAI::Reset() | |
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp | |
index df7ea2f110..d5812b41f1 100644 | |
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp | |
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp | |
@@ -180,6 +180,7 @@ void SmartScript::OnReset() | |
ProcessEventsFor(SMART_EVENT_RESET); | |
mLastInvoker.Clear(); | |
mCounterList.clear(); | |
+ ProcessEventsFor(SMART_EVENT_RESPAWN); | |
} | |
void SmartScript::ResetBaseObject() | |
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | |
index 8f42f65d53..36ddba4b7f 100644 | |
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | |
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | |
@@ -150,7 +150,7 @@ void SmartAIMgr::LoadSmartAIFromDB() | |
continue; | |
} | |
- if (creatureInfo->AIName != "SmartAI") | |
+ if (strcmp(creatureInfo->AIName.c_str(),"SmartAI")) | |
{ | |
TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) is not using SmartAI, skipped loading.", uint32(temp.entryOrGuid)); | |
continue; | |
@@ -166,7 +166,7 @@ void SmartAIMgr::LoadSmartAIFromDB() | |
continue; | |
} | |
- if (gameObjectInfo->AIName != "SmartGameObjectAI") | |
+ if (strcmp(gameObjectInfo->AIName.c_str(),"SmartGameObjectAI")) | |
{ | |
TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) is not using SmartGameObjectAI, skipped loading.", uint32(temp.entryOrGuid)); | |
continue; | |
@@ -209,7 +209,7 @@ void SmartAIMgr::LoadSmartAIFromDB() | |
continue; | |
} | |
- if (creatureInfo->AIName != "SmartAI") | |
+ if (strcmp(creatureInfo->AIName.c_str(),"SmartAI")) | |
{ | |
TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: Creature entry (%u) guid (%u) is not using SmartAI, skipped loading.", creature->id, uint32(std::abs(temp.entryOrGuid))); | |
continue; | |
@@ -232,7 +232,7 @@ void SmartAIMgr::LoadSmartAIFromDB() | |
continue; | |
} | |
- if (gameObjectInfo->AIName != "SmartGameObjectAI") | |
+ if (strcmp(gameObjectInfo->AIName.c_str(),"SmartGameObjectAI")) | |
{ | |
TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: GameObject entry (%u) guid (%u) is not using SmartGameObjectAI, skipped loading.", gameObject->id, uint32(std::abs(temp.entryOrGuid))); | |
continue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment