Missing scripts for instances

This commit is contained in:
Yehonal
2018-04-08 15:13:50 +00:00
parent b773662753
commit f5fcc12fda
9 changed files with 485 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
#ifndef AUCHENAI_CRYPTS_H_
#define AUCHENAI_CRYPTS_H_
#include "CreatureAIImpl.h"
#define ACScriptName "instance_auchenai_crypts"
#define DataHeader "AC"
uint32 const EncounterCount = 2;
enum ACDataTypes
{
// Encounter States/Boss GUIDs
DATA_SHIRRAK_THE_DEAD_WATCHER = 0,
DATA_EXARCH_MALADAAR = 1
};
#endif // AUCHENAI_CRYPTS_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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 "auchenai_crypts.h"
#include "InstanceScript.h"
#include "Map.h"
class instance_auchenai_crypts : public InstanceMapScript
{
public:
instance_auchenai_crypts() : InstanceMapScript(ACScriptName, 558) { }
struct instance_auchenai_crypts_InstanceMapScript : public InstanceScript
{
instance_auchenai_crypts_InstanceMapScript(Map* map) : InstanceScript(map)
{
SetBossNumber(EncounterCount);
}
void Load(char const* data) override { LoadBossState(data); }
std::string GetSaveData() override { return DataHeader + GetBossSaveData(); }
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_auchenai_crypts_InstanceMapScript(map);
}
};
void AddSC_instance_auchenai_crypts()
{
new instance_auchenai_crypts();
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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 "InstanceScript.h"
#include "mana_tombs.h"
#include "Map.h"
class instance_mana_tombs : public InstanceMapScript
{
public:
instance_mana_tombs() : InstanceMapScript(MTScriptName, 557) { }
struct instance_mana_tombs_InstanceMapScript : public InstanceScript
{
instance_mana_tombs_InstanceMapScript(Map* map) : InstanceScript(map)
{
SetBossNumber(EncounterCount);
}
void Load(char const* data) override { LoadBossState(data); }
std::string GetSaveData() { return DataHeader + GetBossSaveData(); }
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_mana_tombs_InstanceMapScript(map);
}
};
void AddSC_instance_mana_tombs()
{
new instance_mana_tombs();
}

View File

@@ -0,0 +1,37 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
#ifndef MANA_TOMBS_H_
#define MANA_TOMBS_H_
#include "CreatureAIImpl.h"
#define MTScriptName "instance_mana_tombs"
#define DataHeader "MT"
uint32 const EncounterCount = 4;
enum MTDataTypes
{
// Encounter States/Boss GUIDs
DATA_PANDEMONIUS = 0,
DATA_TAVAROK = 1,
DATA_NEXUSPRINCE_SHAFFAR = 2,
DATA_YOR = 3
};
#endif // MANA_TOMBS_H_

View File

@@ -43,7 +43,11 @@ set(scripts_STAT_SRCS
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp ${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp ${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp ${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/underbog/instance_the_underbog.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/underbog/the_underbog.h
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp ${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SlavePens/instance_the_slave_pens.cpp
${AC_SCRIPTS_DIR}/Outland/CoilfangReservoir/SlavePens/the_slave_pens.h
${AC_SCRIPTS_DIR}/Outland/zone_shattrath_city.cpp ${AC_SCRIPTS_DIR}/Outland/zone_shattrath_city.cpp
${AC_SCRIPTS_DIR}/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp ${AC_SCRIPTS_DIR}/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
${AC_SCRIPTS_DIR}/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp ${AC_SCRIPTS_DIR}/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
@@ -74,7 +78,11 @@ set(scripts_STAT_SRCS
${AC_SCRIPTS_DIR}/Outland/TempestKeep/arcatraz/arcatraz.cpp ${AC_SCRIPTS_DIR}/Outland/TempestKeep/arcatraz/arcatraz.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp ${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp ${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/instance_auchenai_crypts.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/AuchenaiCrypts/auchenai_crypts.h
${AC_SCRIPTS_DIR}/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp ${AC_SCRIPTS_DIR}/Outland/Auchindoun/ManaTombs/boss_nexusprince_shaffar.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/ManaTombs/instance_mana_tombs.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/ManaTombs/mana_tombs.h
${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp ${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/boss_talon_king_ikiss.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp ${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/instance_sethekk_halls.cpp
${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/sethekk_halls.h ${AC_SCRIPTS_DIR}/Outland/Auchindoun/SethekkHalls/sethekk_halls.h

View File

@@ -0,0 +1,162 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
/*
This placeholder for the instance is needed for dungeon finding to be able
to give credit after the boss defined in lastEncounterDungeon is killed.
Without it, the party doing random dungeon won't get satchel of spoils and
gets instead the deserter debuff.
*/
#include "ScriptMgr.h"
#include "Creature.h"
#include "InstanceScript.h"
#include "Map.h"
#include "the_slave_pens.h"
class instance_the_slave_pens : public InstanceMapScript
{
public:
instance_the_slave_pens() : InstanceMapScript(SPScriptName, 547) { }
struct instance_the_slave_pens_InstanceMapScript : public InstanceScript
{
instance_the_slave_pens_InstanceMapScript(Map* map) : InstanceScript(map)
{
counter = DATA_FLAMECALLER_000;
}
void Load(char const* /*data*/) override { LoadBossState(DataHeader); }
void OnCreatureCreate(Creature* creature) override
{
switch (creature->GetEntry())
{
case NPC_AHUNE:
AhuneGUID = creature->GetGUID();
break;
case NPC_FROZEN_CORE:
FrozenCoreGUID = creature->GetGUID();
break;
case NPC_AHUNE_LOC_BUNNY:
AhuneBunnyGUID = creature->GetGUID();
break;
case NPC_SHAMAN_BONFIRE_BUNNY_000:
BonfireBunnyGUIDs[0] = creature->GetGUID();
break;
case NPC_SHAMAN_BONFIRE_BUNNY_001:
BonfireBunnyGUIDs[1] = creature->GetGUID();
break;
case NPC_SHAMAN_BONFIRE_BUNNY_002:
BonfireBunnyGUIDs[2] = creature->GetGUID();
break;
case NPC_SHAMAN_BEAM_BUNNY_000:
BeamBunnyGUIDs[0] = creature->GetGUID();
break;
case NPC_SHAMAN_BEAM_BUNNY_001:
BeamBunnyGUIDs[1] = creature->GetGUID();
break;
case NPC_SHAMAN_BEAM_BUNNY_002:
BeamBunnyGUIDs[2] = creature->GetGUID();
break;
case NPC_LUMA_SKYMOTHER:
LumaGUID = creature->GetGUID();
break;
case NPC_EARTHEN_RING_FLAMECALLER:
SetData64(counter, creature->GetGUID());
++counter;
break;
default:
break;
}
}
void SetData64(uint32 data, uint64 guid) override
{
switch (data)
{
case DATA_FLAMECALLER_000:
FlameCallerGUIDs[0] = guid;
break;
case DATA_FLAMECALLER_001:
FlameCallerGUIDs[1] = guid;
break;
case DATA_FLAMECALLER_002:
FlameCallerGUIDs[2] = guid;
break;
default:
break;
}
}
uint64 GetData64(uint32 type) const override
{
switch (type)
{
case DATA_AHUNE:
return AhuneGUID;
case DATA_AHUNE_BUNNY:
return AhuneBunnyGUID;
case DATA_FROZEN_CORE:
return FrozenCoreGUID;
case DATA_FLAMECALLER_000:
return FlameCallerGUIDs[0];
case DATA_FLAMECALLER_001:
return FlameCallerGUIDs[1];
case DATA_FLAMECALLER_002:
return FlameCallerGUIDs[2];
case DATA_BONFIRE_BUNNY_000:
return BonfireBunnyGUIDs[0];
case DATA_BONFIRE_BUNNY_001:
return BonfireBunnyGUIDs[1];
case DATA_BONFIRE_BUNNY_002:
return BonfireBunnyGUIDs[2];
case DATA_BEAM_BUNNY_000:
return BeamBunnyGUIDs[0];
case DATA_BEAM_BUNNY_001:
return BeamBunnyGUIDs[1];
case DATA_BEAM_BUNNY_002:
return BeamBunnyGUIDs[2];
case DATA_LUMA_SKYMOTHER:
return LumaGUID;
default:
break;
}
return 0;
}
protected:
uint64 AhuneGUID;
uint64 AhuneBunnyGUID;
uint64 FrozenCoreGUID;
uint64 LumaGUID;
uint64 FlameCallerGUIDs[3];
uint64 BonfireBunnyGUIDs[3];
uint64 BeamBunnyGUIDs[3];
uint8 counter;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_the_slave_pens_InstanceMapScript(map);
}
};
void AddSC_instance_the_slave_pens()
{
new instance_the_slave_pens();
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
#ifndef SLAVE_PENS_H
#define SLAVE_PENS_H
#include "CreatureAIImpl.h"
uint32 const EncounterCount = 3;
#define SPScriptName "instance_the_slave_pens"
#define DataHeader "SP"
enum SPDataTypes
{
DATA_MENNU_THE_BETRAYER = 1,
DATA_ROKMAR_THE_CRACKLER = 2,
DATA_QUAGMIRRAN = 3,
DATA_AHUNE = 4,
DATA_AHUNE_BUNNY = 5,
DATA_FROZEN_CORE = 6,
DATA_FLAMECALLER_000 = 7,
DATA_FLAMECALLER_001 = 8,
DATA_FLAMECALLER_002 = 9,
DATA_BONFIRE_BUNNY_000 = 10,
DATA_BONFIRE_BUNNY_001 = 11,
DATA_BONFIRE_BUNNY_002 = 12,
DATA_BEAM_BUNNY_000 = 13,
DATA_BEAM_BUNNY_001 = 14,
DATA_BEAM_BUNNY_002 = 15,
DATA_LUMA_SKYMOTHER = 16
};
enum SPCreaturesIds
{
NPC_AHUNE = 25740,
NPC_FROZEN_CORE = 25865,
NPC_LUMA_SKYMOTHER = 25697,
NPC_AHUNE_LOC_BUNNY = 25745,
NPC_EARTHEN_RING_FLAMECALLER = 25754,
NPC_SHAMAN_BONFIRE_BUNNY_000 = 25971,
NPC_SHAMAN_BONFIRE_BUNNY_001 = 25972,
NPC_SHAMAN_BONFIRE_BUNNY_002 = 25973,
NPC_SHAMAN_BEAM_BUNNY_000 = 25964,
NPC_SHAMAN_BEAM_BUNNY_001 = 25965,
NPC_SHAMAN_BEAM_BUNNY_002 = 25966,
NPC_WHISP_DEST_BUNNY = 26120,
NPC_WHISP_SOURCE_BUNNY = 26121
};
enum SPGameObjectIds
{
GO_ICE_SPEAR = 188077,
GO_ICE_STONE = 187882
};
#endif // SLAVE_PENS_H

View File

@@ -0,0 +1,49 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
/*
This placeholder for the instance is needed for dungeon finding to be able
to give credit after the boss defined in lastEncounterDungeon is killed.
Without it, the party doing random dungeon won't get satchel of spoils and
gets instead the deserter debuff.
*/
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "Map.h"
#include "the_underbog.h"
class instance_the_underbog : public InstanceMapScript
{
public:
instance_the_underbog() : InstanceMapScript(TheUndebogScriptName, 546) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_the_underbog_InstanceMapScript(map);
}
struct instance_the_underbog_InstanceMapScript : public InstanceScript
{
instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
};
};
void AddSC_instance_the_underbog()
{
new instance_the_underbog();
}

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://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/>.
*/
#ifndef the_underbog_h__
#define the_underbog_h__
#include "CreatureAIImpl.h"
#define TheUndebogScriptName "instance_the_underbog"
#endif // the_underbog_h__