Core: Removed unused functions (leftovers from sd2, was needed when scripts were built as separate dll)
This commit is contained in:
@@ -106,7 +106,7 @@ public:
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (!me->GetEquipmentId())
|
||||
if (const CreatureInfo *info = GetCreatureInfo(28406))
|
||||
if (const CreatureInfo *info = ObjectMgr::GetCreatureTemplate(28406))
|
||||
if (info->equipmentId)
|
||||
const_cast<CreatureInfo*>(me->GetCreatureInfo())->equipmentId = info->equipmentId;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ class npc_troll_volunteer : public CreatureScript
|
||||
}
|
||||
me->SetDisplayId(trollmodel[urand(0, 39)]);
|
||||
if (player)
|
||||
me->GetMotionMaster()->MoveFollow(player, 5.0f, urand(120, 240));
|
||||
me->GetMotionMaster()->MoveFollow(player, 5.0f, float(rand_norm() + 1.0f) * M_PI / 3.0f * 4.0f);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
|
||||
@@ -71,7 +71,7 @@ class boss_bronjahm : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(FoSScriptName))
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(FoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
|
||||
@@ -129,7 +129,7 @@ class boss_devourer_of_souls : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(FoSScriptName))
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(FoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
|
||||
@@ -88,7 +88,7 @@ class boss_garfrost : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(PoSScriptName))
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
|
||||
@@ -143,7 +143,7 @@ class boss_ick : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(PoSScriptName))
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
@@ -299,7 +299,7 @@ class boss_krick : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!_instanceScript || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(PoSScriptName))
|
||||
if (!_instanceScript || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
|
||||
@@ -127,7 +127,7 @@ class boss_tyrannus : public CreatureScript
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(PoSScriptName))
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != sObjectMgr->GetScriptId(PoSScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (instance->GetBossState(DATA_TYRANNUS) != DONE)
|
||||
Reset();
|
||||
|
||||
@@ -176,14 +176,6 @@ class boss_sindragosa : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(ICCScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
BossAI::Reset();
|
||||
@@ -479,7 +471,7 @@ class boss_sindragosa : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_sindragosaAI(creature);
|
||||
return GetIcecrownCitadelAI<boss_sindragosaAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -571,14 +563,6 @@ class npc_spinestalker : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(ICCScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
@@ -676,7 +660,7 @@ class npc_spinestalker : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_spinestalkerAI(creature);
|
||||
return GetIcecrownCitadelAI<npc_spinestalkerAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -691,14 +675,6 @@ class npc_rimefang : public CreatureScript
|
||||
{
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
{
|
||||
if (!instance || static_cast<InstanceMap*>(me->GetMap())->GetScriptId() != GetScriptId(ICCScriptName))
|
||||
me->IsAIEnabled = false;
|
||||
else if (!me->isDead())
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
@@ -823,7 +799,7 @@ class npc_rimefang : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_rimefangAI(creature);
|
||||
return GetIcecrownCitadelAI<npc_rimefangAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -377,7 +377,7 @@ CreatureAI* GetIcecrownCitadelAI(Creature* creature)
|
||||
{
|
||||
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
if (instance->GetScriptId() == GetScriptId(ICCScriptName))
|
||||
if (instance->GetScriptId() == sObjectMgr->GetScriptId(ICCScriptName))
|
||||
return new AI(creature);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
{
|
||||
case EVENT_BUILD_HARPOON_1:
|
||||
DoScriptText(EMOTE_HARPOON, me);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, me->GetRespawnTime()))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_1, PosHarpoon[0].GetPositionX(), PosHarpoon[0].GetPositionY(), PosHarpoon[0].GetPositionZ(), 4.790f, 0.0f, 0.0f, 0.0f, 0.0f, uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f)) //only nearest broken harpoon
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -244,7 +244,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_2:
|
||||
DoScriptText(EMOTE_HARPOON, me);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, me->GetRespawnTime()))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_2, PosHarpoon[1].GetPositionX(), PosHarpoon[1].GetPositionY(), PosHarpoon[1].GetPositionZ(), 4.659f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -253,7 +253,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_3:
|
||||
DoScriptText(EMOTE_HARPOON, me);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, me->GetRespawnTime()))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_3, PosHarpoon[2].GetPositionX(), PosHarpoon[2].GetPositionY(), PosHarpoon[2].GetPositionZ(), 5.382f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
@@ -263,7 +263,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
return;
|
||||
case EVENT_BUILD_HARPOON_4:
|
||||
DoScriptText(EMOTE_HARPOON, me);
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, me->GetRespawnTime()))
|
||||
if (GameObject* Harpoon = me->SummonGameObject(GO_RAZOR_HARPOON_4, PosHarpoon[3].GetPositionX(), PosHarpoon[3].GetPositionY(), PosHarpoon[3].GetPositionZ(), 4.266f, 0, 0, 0, 0, uint32(me->GetRespawnTime())))
|
||||
{
|
||||
if (GameObject* BrokenHarpoon = Harpoon->FindNearestGameObject(GO_RAZOR_BROKEN_HARPOON, 5.0f))
|
||||
BrokenHarpoon->RemoveFromWorld();
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
sLog->outErrorDb("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
|
||||
else
|
||||
{
|
||||
CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
CreatureInfo const* spawnedTemplate = ObjectMgr::GetCreatureTemplate(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
|
||||
if (!spawnedTemplate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user