mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 07:37:02 +00:00
[10935] Move script calls to ScriptMgr
- Script library presence is now optional. - Some script hooks have new names. Scripting libraries need to be adjusted accordingly. Signed-off-by: zergtmn <zerg@myisp.com>
This commit is contained in:
parent
918e646ca2
commit
ec6089bbd8
32 changed files with 454 additions and 435 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#include "NullCreatureAI.h"
|
||||
#include "Policies/SingletonImp.h"
|
||||
#include "MovementGenerator.h"
|
||||
#include "ScriptCalls.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Pet.h"
|
||||
|
||||
INSTANTIATE_SINGLETON_1(CreatureAIRegistry);
|
||||
|
|
@ -34,7 +34,7 @@ namespace FactorySelector
|
|||
{
|
||||
// Allow scripting AI for normal creatures and not controlled pets (guardians and mini-pets)
|
||||
if ((!creature->IsPet() || !((Pet*)creature)->isControlled()) && !creature->isCharmed())
|
||||
if(CreatureAI* scriptedAI = Script->GetAI(creature))
|
||||
if (CreatureAI* scriptedAI = sScriptMgr.GetCreatureAI(creature))
|
||||
return scriptedAI;
|
||||
|
||||
CreatureAIRegistry &ai_registry(CreatureAIRepository::Instance());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue