Nopch fix

This commit is contained in:
Shauren
2017-06-01 23:33:59 +02:00
parent acbc81dc54
commit dd38842d36
4 changed files with 8 additions and 30 deletions

View File

@@ -16,8 +16,9 @@
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "the_stockade.h"
enum Says

View File

@@ -16,6 +16,7 @@
*/
#include "ScriptMgr.h"
#include "MotionMaster.h"
#include "ScriptedCreature.h"
#include "the_stockade.h"
@@ -85,8 +86,6 @@ public:
summon->SetWalk(true);
summon->GetMotionMaster()->MovePoint(POINT_FINISH, me->GetPosition());
}
summons.Summon(summon);
}
void JustDied(Unit* /*killer*/) override

View File

@@ -1,20 +0,0 @@
/*
* Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "the_stockade.h"

View File

@@ -18,6 +18,8 @@
#ifndef THE_STOCKADE_H
#define THE_STOCKADE_H
#include "CreatureAIImpl.h"
#define StormwindStockadeScriptName "instance_the_stockade"
#define DataHeader "SS"
@@ -39,14 +41,10 @@ enum SSCreatureIds
NPC_MORTIMER_MOLOCH = 46482
};
template<class AI>
CreatureAI* GetStormwindStockadeAI(Creature* creature)
template<typename AI>
inline AI* GetStormwindStockadeAI(Creature* creature)
{
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
if (instance->GetInstanceScript())
if (instance->GetScriptId() == sObjectMgr->GetScriptId(StormwindStockadeScriptName))
return new AI(creature);
return nullptr;
return GetInstanceAI<AI>(creature, StormwindStockadeScriptName);
}
#endif