mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Scripts/Steam Vault & Underbog: Minor updates (#31090)
* Kalithresh now forces all distillers to cast SPELL_QUIET_SUICIDE when encounter is finished * Move go_main_chambers_access_panel script from instance file to instance scripts file * Add comments for script names for Hungarfen and Black Stalker * Remove redundant SetBossState for Musel'ek (currently is handled in BossAI)
This commit is contained in:
@@ -15,9 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Timers requires update
|
||||
/*
|
||||
* Timers requires update
|
||||
* Distillers should respawn at some point, probably in case of wipe
|
||||
* All distillers should cast SPELL_QUIET_SUICIDE when encounter is finished */
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
@@ -99,6 +100,7 @@ struct boss_warlord_kalithresh : public BossAI
|
||||
events.ScheduleEvent(EVENT_RAGE, 10s, 20s);
|
||||
}
|
||||
|
||||
/// @todo: Handle this with GameObject 184106 (Coilfang Steamvaults - Kalithresh Event - Trigger 000)
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (!_introDone && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 50.0f))
|
||||
@@ -145,6 +147,12 @@ struct boss_warlord_kalithresh : public BossAI
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
|
||||
std::vector<Creature*> distillers;
|
||||
GetCreatureListWithEntryInGrid(distillers, me, NPC_NAGA_DISTILLER, 250.0f);
|
||||
for (Creature* distiller : distillers)
|
||||
if (distiller->IsAlive())
|
||||
distiller->CastSpell(distiller, SPELL_QUIET_SUICIDE, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -221,7 +229,7 @@ struct npc_naga_distiller : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* kalithresh = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_WARLORD_KALITHRESH)))
|
||||
if (Creature* kalithresh = _instance->GetCreature(DATA_WARLORD_KALITHRESH))
|
||||
kalithresh->AI()->DoAction(ACTION_DISTILLER_DEAD);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,29 +19,10 @@
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Log.h"
|
||||
#include "steam_vault.h"
|
||||
|
||||
struct go_main_chambers_access_panel : public GameObjectAI
|
||||
{
|
||||
go_main_chambers_access_panel(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (Creature* controller = _instance->GetCreature(DATA_DOOR_CONTROLLER))
|
||||
controller->AI()->Talk(CONTROLLER_TEXT_ACESS_USED);
|
||||
_instance->SetData(ACTION_OPEN_DOOR, 0);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
{
|
||||
{ GO_ACCESS_PANEL_HYDRO, DATA_ACCESS_PANEL_HYDRO },
|
||||
@@ -134,6 +115,5 @@ class instance_steam_vault : public InstanceMapScript
|
||||
|
||||
void AddSC_instance_steam_vault()
|
||||
{
|
||||
RegisterGameObjectAI(go_main_chambers_access_panel);
|
||||
new instance_steam_vault();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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 "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "steam_vault.h"
|
||||
|
||||
// 184125, 184126 - Main Chambers Access Panel
|
||||
struct go_main_chambers_access_panel : public GameObjectAI
|
||||
{
|
||||
go_main_chambers_access_panel(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
if (Creature* controller = _instance->GetCreature(DATA_DOOR_CONTROLLER))
|
||||
controller->AI()->Talk(CONTROLLER_TEXT_ACESS_USED);
|
||||
|
||||
_instance->SetData(ACTION_OPEN_DOOR, 0);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
void AddSC_steam_vault()
|
||||
{
|
||||
RegisterSteamVaultGameObjectAI(go_main_chambers_access_panel);
|
||||
}
|
||||
@@ -68,5 +68,6 @@ inline AI* GetSteamVaultAI(T* obj)
|
||||
}
|
||||
|
||||
#define RegisterSteamVaultCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetSteamVaultAI)
|
||||
#define RegisterSteamVaultGameObjectAI(ai_name) RegisterGameObjectAIWithFactory(ai_name, GetSteamVaultAI)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,7 @@ enum HungarfenSpells
|
||||
SPELL_GROW = 31698
|
||||
};
|
||||
|
||||
// 17770 - Hungarfen
|
||||
struct boss_hungarfen : public BossAI
|
||||
{
|
||||
boss_hungarfen(Creature* creature) : BossAI(creature, DATA_HUNGARFEN), _roared(false) { }
|
||||
@@ -112,6 +113,7 @@ private:
|
||||
bool _roared;
|
||||
};
|
||||
|
||||
// 17990 - Underbog Mushroom
|
||||
struct npc_underbog_mushroom : public ScriptedAI
|
||||
{
|
||||
npc_underbog_mushroom(Creature* creature) : ScriptedAI(creature), _counter(0) { }
|
||||
|
||||
@@ -35,7 +35,7 @@ like lack of delays between packets makes it work differently too.
|
||||
Of course as was said above player can be pulled towards 2 times in a row but that looks like a rare case.
|
||||
*/
|
||||
|
||||
enum Spells
|
||||
enum BlackStalkerSpells
|
||||
{
|
||||
SPELL_LEVITATE = 31704,
|
||||
SPELL_CHAIN_LIGHTNING = 31717,
|
||||
@@ -52,7 +52,7 @@ enum Spells
|
||||
SPELL_SUMMON_SPORE_STRIDER = 38755
|
||||
};
|
||||
|
||||
enum Events
|
||||
enum BlackStalkerEvents
|
||||
{
|
||||
EVENT_LEASH_CHECK = 1,
|
||||
EVENT_LEVITATE,
|
||||
@@ -61,6 +61,7 @@ enum Events
|
||||
EVENT_SUMMON_SPORE_STRIDER
|
||||
};
|
||||
|
||||
// 17882 - The Black Stalker
|
||||
struct boss_the_black_stalker : public BossAI
|
||||
{
|
||||
boss_the_black_stalker(Creature* creature) : BossAI(creature, DATA_THE_BLACK_STALKER) { }
|
||||
|
||||
@@ -47,9 +47,6 @@ public:
|
||||
case NPC_GHAZAN:
|
||||
SetBossState(DATA_GHAZAN, DONE);
|
||||
break;
|
||||
case NPC_SWAMPLORD_MUSELEK:
|
||||
SetBossState(DATA_SWAMPLORD_MUSELEK, DONE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -35,8 +35,7 @@ enum TheUnderbogDataId
|
||||
|
||||
enum TheUnderbogCreatureId
|
||||
{
|
||||
NPC_GHAZAN = 18105,
|
||||
NPC_SWAMPLORD_MUSELEK = 17826
|
||||
NPC_GHAZAN = 18105
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
|
||||
@@ -68,6 +68,7 @@ void AddSC_boss_hydromancer_thespia();
|
||||
void AddSC_boss_mekgineer_steamrigger();
|
||||
void AddSC_boss_warlord_kalithresh();
|
||||
void AddSC_instance_steam_vault();
|
||||
void AddSC_steam_vault();
|
||||
|
||||
// Coilfang Reservoir - The Slave Pens
|
||||
void AddSC_instance_the_slave_pens();
|
||||
@@ -193,6 +194,7 @@ void AddOutlandScripts()
|
||||
AddSC_boss_hydromancer_thespia();
|
||||
AddSC_boss_mekgineer_steamrigger();
|
||||
AddSC_boss_warlord_kalithresh();
|
||||
AddSC_steam_vault();
|
||||
|
||||
// Coilfang Reservoir - The Slave Pens
|
||||
AddSC_instance_the_slave_pens();
|
||||
|
||||
Reference in New Issue
Block a user