Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-05-26 23:00:39 +08:00
78 changed files with 102236 additions and 327 deletions

View File

@@ -33,6 +33,7 @@ EndScriptData */
#include "ReputationMgr.h"
#include "SpellInfo.h"
#include "SpellMgr.h"
#include "SharedDefines.h"
using namespace Acore::ChatCommands;
@@ -516,7 +517,7 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, itemTemplate.ItemId, name.c_str());
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
}
else
{
@@ -550,7 +551,7 @@ public:
if (handler->GetSession())
{
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, itemTemplate.ItemId, name.c_str());
handler->PSendSysMessage(LANG_ITEM_LIST_CHAT, itemTemplate.ItemId, ItemQualityColors[itemTemplate.Quality], itemTemplate.ItemId, name.c_str());
}
else
{

View File

@@ -109,6 +109,18 @@ struct boss_nightbane : public BossAI
me->GetMotionMaster()->MoveTakeoff(POINT_DESPAWN, -11013.246f, -1770.5212f, 166.50139f);
}
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damageEffectType, SpellSchoolMask spellSchoolMask) override
{
if (_flying || Phase == 2)
{
if (damage >= me->GetHealth())
{
damage = me->GetHealth() - 1;
}
}
BossAI::DamageTaken(attacker, damage, damageEffectType, spellSchoolMask);
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
@@ -160,17 +172,21 @@ struct boss_nightbane : public BossAI
scheduler.Schedule(2s, GROUP_FLYING, [this](TaskContext)
{
DoResetThreatList();
DoCastVictim(SPELL_RAIN_OF_BONES);
_skeletonscheduler.Schedule(50ms, [this](TaskContext context)
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f))
{
//spawns skeletons every second until skeletonCount is reached
if(_skeletonSpawnCounter < _skeletonCount)
_skeletonSpawnPos = target->GetPosition();
me->CastSpell(_skeletonSpawnPos.GetPositionX(), _skeletonSpawnPos.GetPositionY(), _skeletonSpawnPos.GetPositionZ(), SPELL_RAIN_OF_BONES, true);
_skeletonscheduler.Schedule(50ms, [this](TaskContext context)
{
DoCastVictim(SPELL_SUMMON_SKELETON, true);
_skeletonSpawnCounter++;
context.Repeat(2s);
}
});
//spawns skeletons every 2 seconds until skeletonCount is reached
if(_skeletonSpawnCounter < _skeletonCount)
{
me->CastSpell(_skeletonSpawnPos.GetPositionX(), _skeletonSpawnPos.GetPositionY(), _skeletonSpawnPos.GetPositionZ(), SPELL_SUMMON_SKELETON, true);
_skeletonSpawnCounter++;
context.Repeat(2s);
}
});
}
}).Schedule(20s, GROUP_FLYING, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_DISTRACTING_ASH);
@@ -371,6 +387,7 @@ private:
uint32 _movePhase;
uint8 _skeletonCount;
uint8 _skeletonSpawnCounter;
Position _skeletonSpawnPos;
};
class go_blackened_urn : public GameObjectScript

View File

@@ -23,6 +23,7 @@ void AddSC_event_winter_veil_scripts();
void AddSC_event_love_in_the_air();
void AddSC_event_midsummer_scripts();
void AddSC_event_childrens_week();
void AddSC_event_firework_show_scripts();
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
@@ -35,4 +36,5 @@ void AddEventsScripts()
AddSC_event_love_in_the_air();
AddSC_event_midsummer_scripts();
AddSC_event_childrens_week();
AddSC_event_firework_show_scripts();
}

View File

@@ -0,0 +1,206 @@
/*
* This file is part of the AzerothCore 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 Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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 "firework_show.h"
#include "firework_show_BootyBay.h"
#include "firework_show_Exodar.h"
#include "firework_show_Ironforge.h"
#include "firework_show_Orgrimmar.h"
#include "firework_show_Shattrath.h"
#include "firework_show_Silvermoon.h"
#include "firework_show_Stormwind.h"
#include "firework_show_Teldrassil.h"
#include "firework_show_ThunderBluff.h"
#include "firework_show_Undercity.h"
#include "GameObjectAI.h"
#include "GameObjectScript.h"
// <mapId, zoneId>, show
std::map<std::pair<uint32, uint32>, FireworkShow const *> const FireworkShowStore = {
{ { 0, 1 }, &fireworkShowIronforge },
{ { 0, 33 }, &fireworkShowBootyBay },
{ { 0, 1497 }, &fireworkShowUndercity },
{ { 0, 1519 }, &fireworkShowStormwind },
{ { 1, 141 }, &fireworkShowTeldrassil },
{ { 1, 1637 }, &fireworkShowOrgrimmar },
{ { 1, 1638 }, &fireworkShowThunderBluff },
{ { 530, 3430 }, &fireworkShowSilvermoon },
{ { 530, 3557 }, &fireworkShowExodar },
{ { 530, 3703 }, &fireworkShowShattrath },
};
struct go_firework_show : public GameObjectAI
{
go_firework_show(GameObject* go) : GameObjectAI(go)
{
_curIdx = 0;
_showRunning = false;
_show = nullptr;
InitShow();
}
void InitShow()
{
_show = nullptr;
auto itr = FireworkShowStore.find(std::make_pair(me->GetMapId(), me->GetZoneId()));
if (itr != FireworkShowStore.end() && itr->second)
_show = itr->second;
StopShow();
_scheduler.Schedule(Milliseconds(4200), [this](TaskContext context)
{
// check for show start
if (!_showRunning)
{
tzset(); // set timezone for localtime_r() -> fix issues due to daylight time
tm local_tm = Acore::Time::TimeBreakdown();
// each show runs approx. 12 minutes
// and starts at the full hour
if ((local_tm.tm_min >= 0) && (local_tm.tm_min < 12))
{
StartShow(local_tm.tm_min);
}
}
context.Repeat();
});
}
// provide start offset to handle a "late start"
// e.g. if the gameobject is spawned later then the desired start time
void StartShow(int minutesOffset)
{
if (!_show || !_show->schedule.entries || !_show->schedule.size || !_show->spawns.entries || !_show->spawns.size)
return;
_curIdx = 0;
_showRunning = true;
me->setActive(true);
// fast-forward show if we've got a late start
if (minutesOffset > 0)
{
int ts = 0;
do {
ts = _show->schedule.entries[_curIdx].timestamp;
} while ((ts <= (minutesOffset * MINUTE * IN_MILLISECONDS)) && (++_curIdx < _show->schedule.size));
}
_scheduler.Schedule(0s, [this](TaskContext context)
{
int32 dt = 0;
do {
dt = SpawnNextFirework();
} while (dt == 0);
if (0 < dt)
context.Repeat(Milliseconds(dt));
else
StopShow();
});
}
void StopShow()
{
if (_showRunning)
{
// Trigger SAI to spawn 'Toasting Goblets' on show end
std::list<GameObject*> _goList;
me->GetGameObjectListWithEntryInGrid(_goList, GO_TOASTING_GOBLET, 1420.0f);
for (std::list<GameObject*>::const_iterator itr = _goList.begin(); itr != _goList.end(); ++itr)
{
if (GameObjectAI* ai = (*itr)->AI())
ai->SetData(0, 1);
}
// Trigger SAI to make Revelers cheer on show end
for (uint32 i = 0; i < COUNT_REVELER_ID; i++)
{
std::list<Creature*> _crList;
me->GetCreatureListWithEntryInGrid(_crList, _show->revelerId[i], 1420.0f);
for (std::list<Creature*>::const_iterator itr = _crList.begin(); itr != _crList.end(); ++itr)
{
if (CreatureAI* ai = (*itr)->AI())
ai->SetData(0, 1);
}
}
}
_showRunning = false;
me->setActive(false);
}
int32 SpawnNextFirework()
{
if (!_showRunning)
return -1;
if (!_show || !_show->schedule.entries || !_show->spawns.entries)
return -2;
if (_curIdx >= _show->schedule.size)
return -3;
uint32 posIdx = _show->schedule.entries[_curIdx].spawnIndex;
if (posIdx < _show->spawns.size)
{
me->SummonGameObject(_show->schedule.entries[_curIdx].gameobjectId,
_show->spawns.entries[posIdx].x,
_show->spawns.entries[posIdx].y,
_show->spawns.entries[posIdx].z,
_show->spawns.entries[posIdx].o,
_show->spawns.entries[posIdx].rot0,
_show->spawns.entries[posIdx].rot1,
_show->spawns.entries[posIdx].rot2,
_show->spawns.entries[posIdx].rot3,
0);
}
uint32 ts = _show->schedule.entries[_curIdx].timestamp;
if (++_curIdx >= _show->schedule.size)
return -4;
if (_show->schedule.entries[_curIdx].timestamp < ts)
return -5;
return (_show->schedule.entries[_curIdx].timestamp - ts);
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
uint32_t _curIdx;
bool _showRunning;
FireworkShow const * _show;
};
void AddSC_event_firework_show_scripts()
{
// Gameobjects
RegisterGameObjectAI(go_firework_show);
}

View File

@@ -0,0 +1,98 @@
/*
* This file is part of the AzerothCore 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 Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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 DEF_FIREWORK_SHOW_H
#define DEF_FIREWORK_SHOW_H
#include "Define.h"
enum eFireworks
{
GO_FIREWORK_SHOW_TYPE_1_RED = 180703,
GO_FIREWORK_SHOW_TYPE_2_RED = 180704,
GO_FIREWORK_SHOW_TYPE_1_RED_BIG = 180707,
GO_FIREWORK_SHOW_TYPE_2_RED_BIG = 180708,
GO_FIREWORK_SHOW_TYPE_1_BLUE = 180720,
GO_FIREWORK_SHOW_TYPE_2_BLUE = 180721,
GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG = 180722,
GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG = 180723,
GO_FIREWORK_SHOW_TYPE_1_GREEN = 180724,
GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG = 180725,
GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG = 180726,
GO_FIREWORK_SHOW_TYPE_2_GREEN = 180727,
GO_FIREWORK_SHOW_TYPE_1_WHITE = 180728,
GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG = 180729,
GO_FIREWORK_SHOW_TYPE_2_WHITE = 180730,
GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG = 180731,
GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG = 180733,
GO_FIREWORK_SHOW_TYPE_1_YELLOW = 180736,
GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG = 180737,
GO_FIREWORK_SHOW_TYPE_2_YELLOW = 180738,
GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG = 180739,
GO_FIREWORK_SHOW_TYPE_2_PURPLE = 180740,
GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG = 180741,
GO_TOASTING_GOBLET = 180754,
NPC_STORMWIND_REVELER = 15694,
NPC_THUNDER_BLUFF_REVELER = 15719,
NPC_BOOTY_BAY_REVELER = 15723,
NPC_DARNASSUS_REVELER = 15905,
NPC_IRONFORGE_REVELER = 15906,
NPC_UNDERCITY_REVELER = 15907,
NPC_ORGRIMMAR_REVELER = 15908,
NPC_SCRYER_REVELER = 23023,
NPC_ALDOR_REVELER = 23024,
NPC_DRAENEI_REVELER = 23039,
NPC_BLOOD_ELF_REVELER = 23045,
COUNT_REVELER_ID = 2,
};
struct FireworkShowGameobject
{
float x;
float y;
float z;
float o;
float rot0;
float rot1;
float rot2;
float rot3;
};
struct FireworkShowScheduleEntry
{
uint32 timestamp;
uint32 gameobjectId;
uint32 spawnIndex;
};
struct FireworkShow
{
struct{
FireworkShowScheduleEntry const * entries;
uint32 const size;
} schedule;
struct {
FireworkShowGameobject const * entries;
uint32 const size;
} spawns;
uint32 const revelerId[COUNT_REVELER_ID];
};
#endif

View File

@@ -0,0 +1,537 @@
/*
* This file is part of the AzerothCore 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 Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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 DEF_FIREWORK_SHOW_BOOTYBAY_H
#define DEF_FIREWORK_SHOW_BOOTYBAY_H
#include "firework_show.h"
// VerifiedBuild 50250 - Midsummer Fireworks Spectacular event
FireworkShowGameobject const FireworkShowGameobjectBootyBay[] =
{
{ -14360.708f, 493.60358f, 32.061573f, 5.8468537f, 0.0f, 0.0f, -0.21643925f, 0.97629607f }, /* 0 */
{ -14382.423f, 516.2576f, 37.59617f, 5.8468537f, 0.0f, 0.0f, -0.21643925f, 0.97629607f }, /* 1 */
{ -14351.329f, 506.18985f, 28.696842f, 5.8468537f, 0.0f, 0.0f, -0.21643925f, 0.97629607f }, /* 2 */
{ -14356.573f, 494.1887f, 39.58786f, 3.6826503f, 0.0f, 0.0f, -0.9636297f, 0.267241f }, /* 3 */
{ -14376.763f, 507.98416f, 59.565323f, 0.9773831f, 0.0f, 0.0f, 0.46947098f, 0.8829479f }, /* 4 */
{ -14358.028f, 515.05804f, 34.266403f, 3.6826503f, 0.0f, 0.0f, -0.9636297f, 0.267241f }, /* 5 */
{ -14358.974f, 502.0223f, 43.826313f, 2.1991146f, 0.0f, 0.0f, 0.89100647f, 0.45399064f }, /* 6 */
{ -14363.282f, 506.73438f, 41.271564f, 5.8992143f, 0.0f, 0.0f, -0.1908083f, 0.9816273f }, /* 7 */
{ -14370.767f, 487.4859f, 45.464447f, 4.886924f, 0.0f, 0.0f, -0.642787f, 0.766045f }, /* 8 */
{ -14357.489f, 490.84445f, 39.473286f, 0.9773831f, 0.0f, 0.0f, 0.46947098f, 0.8829479f }, /* 9 */
{ -14359.632f, 522.25714f, 31.286598f, 2.1991146f, 0.0f, 0.0f, 0.89100647f, 0.45399064f }, /* 10 */
{ -14376.658f, 516.6852f, 38.5385f, 2.1991146f, 0.0f, 0.0f, 0.89100647f, 0.45399064f }, /* 11 */
{ -14374.429f, 496.0701f, 31.312653f, 4.7647495f, 0.0f, 0.0f, -0.6883545f, 0.72537446f }, /* 12 */
{ -14374.914f, 491.50797f, 40.34925f, 4.886924f, 0.0f, 0.0f, -0.642787f, 0.766045f }, /* 13 */
{ -14355.49f, 518.56555f, 35.36923f, 4.7647495f, 0.0f, 0.0f, -0.6883545f, 0.72537446f }, /* 14 */
{ -14354.371f, 491.87906f, 39.833744f, 3.6826503f, 0.0f, 0.0f, -0.9636297f, 0.267241f }, /* 15 */
{ -14389.842f, 503.46115f, 37.370884f, 5.8992143f, 0.0f, 0.0f, -0.1908083f, 0.9816273f }, /* 16 */
{ -14353.637f, 485.4063f, 34.117043f, 4.7647495f, 0.0f, 0.0f, -0.6883545f, 0.72537446f }, /* 17 */
{ -14376.54f, 487.52817f, 44.470444f, 5.8992143f, 0.0f, 0.0f, -0.1908083f, 0.9816273f }, /* 18 */
{ -14379.146f, 507.23697f, 43.95641f, 6.0912004f, 0.0f, 0.0f, -0.09584522f, 0.99539626f }, /* 19 */
{ -14378.098f, 473.56082f, 40.167862f, 0.9773831f, 0.0f, 0.0f, 0.46947098f, 0.8829479f }, /* 20 */
{ -14380.022f, 506.33127f, 59.75512f, 6.0912004f, 0.0f, 0.0f, -0.09584522f, 0.99539626f }, /* 21 */
{ -14353.664f, 485.8341f, 36.866394f, 4.886924f, 0.0f, 0.0f, -0.642787f, 0.766045f }, /* 22 */
{ -14389.552f, 485.74365f, 36.326534f, 6.0912004f, 0.0f, 0.0f, -0.09584522f, 0.99539626f }, /* 23 */
{ -14371.19f, 505.8404f, 28.751783f, 6.0912004f, 0.0f, 0.0f, -0.09584522f, 0.99539626f }, /* 24 */
{ -14351.266f, 494.81473f, 26.889748f, 3.47321f, 0.0f, 0.0f, -0.9862852f, 0.1650499f }, /* 25 */
{ -14391.585f, 505.7818f, 29.009865f, 3.7001047f, 0.0f, 0.0f, -0.9612608f, 0.2756405f }, /* 26 */
{ -14360.903f, 476.7781f, 27.833723f, 2.5481794f, 0.0f, 0.0f, 0.95630455f, 0.29237235f }, /* 27 */
{ -14359.229f, 494.81744f, 41.420765f, 0.13962449f, 0.0f, 0.0f, 0.069755554f, 0.99756414f }, /* 28 */
{ -14373.079f, 524.4762f, 26.045519f, 4.66003f, 0.0f, 0.0f, -0.7253742f, 0.68835473f }, /* 29 */
{ -14373.886f, 491.5064f, 47.466377f, 3.47321f, 0.0f, 0.0f, -0.9862852f, 0.1650499f }, /* 30 */
{ -14372.838f, 508.7278f, 34.971527f, 2.5481794f, 0.0f, 0.0f, 0.95630455f, 0.29237235f }, /* 31 */
{ -14362.134f, 526.2929f, 24.909328f, 0.13962449f, 0.0f, 0.0f, 0.069755554f, 0.99756414f }, /* 32 */
{ -14401.415f, 506.0231f, 33.67751f, 4.729844f, 0.0f, 0.0f, -0.70090866f, 0.71325105f }, /* 33 */
{ -14349.437f, 528.6766f, 28.356276f, 6.073746f, 0.0f, 0.0f, -0.10452843f, 0.9945219f }, /* 34 */
{ -14351.302f, 489.6769f, 37.13969f, 4.66003f, 0.0f, 0.0f, -0.7253742f, 0.68835473f }, /* 35 */
{ -14382.14f, 470.336f, 30.188276f, 3.0543265f, 0.0f, 0.0f, 0.99904823f, 0.04361926f }, /* 36 */
{ -14392.547f, 503.00327f, 28.878883f, 4.66003f, 0.0f, 0.0f, -0.7253742f, 0.68835473f }, /* 37 */
{ -14377.155f, 486.9521f, 42.376797f, 5.550147f, 0.0f, 0.0f, -0.35836792f, 0.93358046f }, /* 38 */
{ -14358.694f, 516.5423f, 35.368343f, 2.1118479f, 0.0f, 0.0f, 0.8703556f, 0.4924237f }, /* 39 */
};
// VerifiedBuild 50250 - Midsummer Fireworks Spectacular event
FireworkShowScheduleEntry const fireworkShowScheduleBootyBay[] =
{
{ 0, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 0 },
{ 0, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 3373, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 2 },
{ 3373, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 3 },
{ 4811, GO_FIREWORK_SHOW_TYPE_2_BLUE, 4 },
{ 4811, GO_FIREWORK_SHOW_TYPE_1_RED, 5 },
{ 6671, GO_FIREWORK_SHOW_TYPE_1_BLUE, 6 },
{ 8088, GO_FIREWORK_SHOW_TYPE_2_GREEN, 7 },
{ 8088, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 8 },
{ 9699, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 9 },
{ 12937, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 10 },
{ 12937, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 11 },
{ 18189, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 12 },
{ 19399, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 13 },
{ 19399, GO_FIREWORK_SHOW_TYPE_1_GREEN, 0 },
{ 19399, GO_FIREWORK_SHOW_TYPE_2_RED, 14 },
{ 19399, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 15 },
{ 22854, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 1 },
{ 22854, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 16 },
{ 23814, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 8 },
{ 24400, GO_FIREWORK_SHOW_TYPE_2_RED, 5 },
{ 30902, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 17 },
{ 35539, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 18 },
{ 36779, GO_FIREWORK_SHOW_TYPE_1_BLUE, 4 },
{ 36779, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 19 },
{ 39170, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 16 },
{ 43244, GO_FIREWORK_SHOW_TYPE_1_WHITE, 13 },
{ 43244, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 20 },
{ 44869, GO_FIREWORK_SHOW_TYPE_1_GREEN, 0 },
{ 44869, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 6 },
{ 48378, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 14 },
{ 54582, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 54582, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 56200, GO_FIREWORK_SHOW_TYPE_1_WHITE, 21 },
{ 56200, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 1 },
{ 57792, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 9 },
{ 59558, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 59558, GO_FIREWORK_SHOW_TYPE_2_BLUE, 12 },
{ 62634, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 64599, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 14 },
{ 72352, GO_FIREWORK_SHOW_TYPE_2_GREEN, 0 },
{ 75554, GO_FIREWORK_SHOW_TYPE_2_WHITE, 2 },
{ 77215, GO_FIREWORK_SHOW_TYPE_1_RED, 14 },
{ 77544, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 79500, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 80599, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 1 },
{ 82023, GO_FIREWORK_SHOW_TYPE_1_GREEN, 7 },
{ 84074, GO_FIREWORK_SHOW_TYPE_1_GREEN, 4 },
{ 84074, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 8 },
{ 84074, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 10 },
{ 88626, GO_FIREWORK_SHOW_TYPE_1_GREEN, 15 },
{ 88626, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 17 },
{ 88986, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 13 },
{ 90134, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 9 },
{ 91901, GO_FIREWORK_SHOW_TYPE_1_WHITE, 20 },
{ 93406, GO_FIREWORK_SHOW_TYPE_1_RED, 23 },
{ 93406, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 12 },
{ 98400, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 2 },
{ 103301, GO_FIREWORK_SHOW_TYPE_1_RED, 22 },
{ 103301, GO_FIREWORK_SHOW_TYPE_1_GREEN, 4 },
{ 104878, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 21 },
{ 104878, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 5 },
{ 106741, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 20 },
{ 107980, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 109583, GO_FIREWORK_SHOW_TYPE_2_RED, 23 },
{ 112931, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 13 },
{ 114485, GO_FIREWORK_SHOW_TYPE_2_GREEN, 7 },
{ 114485, GO_FIREWORK_SHOW_TYPE_2_WHITE, 17 },
{ 114485, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 119512, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 0 },
{ 119512, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 22 },
{ 120078, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 3 },
{ 122918, GO_FIREWORK_SHOW_TYPE_2_RED, 5 },
{ 124409, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 124796, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 126246, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 13 },
{ 127461, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 8 },
{ 127461, GO_FIREWORK_SHOW_TYPE_1_GREEN, 4 },
{ 133204, GO_FIREWORK_SHOW_TYPE_1_RED, 14 },
{ 133790, GO_FIREWORK_SHOW_TYPE_2_GREEN, 6 },
{ 134298, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 16 },
{ 137335, GO_FIREWORK_SHOW_TYPE_1_BLUE, 15 },
{ 137481, GO_FIREWORK_SHOW_TYPE_1_RED, 23 },
{ 140362, GO_FIREWORK_SHOW_TYPE_2_BLUE, 19 },
{ 142113, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 12 },
{ 142355, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 22 },
{ 144060, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 144060, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 145573, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 9 },
{ 145573, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 0 },
{ 147185, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 3 },
{ 148806, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 17 },
{ 150390, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 151991, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 21 },
{ 155240, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 156857, GO_FIREWORK_SHOW_TYPE_2_GREEN, 15 },
{ 158563, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 16 },
{ 161477, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 0 },
{ 161841, GO_FIREWORK_SHOW_TYPE_2_BLUE, 8 },
{ 163297, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 14 },
{ 163297, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 9 },
{ 163618, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 13 },
{ 164965, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 166948, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 18 },
{ 170039, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 2 },
{ 171084, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 6 },
{ 171577, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 171577, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 20 },
{ 174281, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 23 },
{ 174683, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 3 },
{ 177931, GO_FIREWORK_SHOW_TYPE_1_BLUE, 12 },
{ 178063, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 178063, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 21 },
{ 178063, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 16 },
{ 181375, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 181375, GO_FIREWORK_SHOW_TYPE_2_BLUE, 8 },
{ 183163, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 10 },
{ 184183, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 20 },
{ 184183, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 185594, GO_FIREWORK_SHOW_TYPE_1_BLUE, 4 },
{ 191057, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 192283, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 13 },
{ 195742, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 17 },
{ 197319, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 197319, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 0 },
{ 198932, GO_FIREWORK_SHOW_TYPE_2_GREEN, 19 },
{ 200843, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 18 },
{ 202366, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 3 },
{ 203966, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 21 },
{ 203966, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 22 },
{ 205480, GO_FIREWORK_SHOW_TYPE_1_WHITE, 20 },
{ 205480, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 8 },
{ 210262, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 10 },
{ 213488, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 3 },
{ 213488, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 11 },
{ 216732, GO_FIREWORK_SHOW_TYPE_2_GREEN, 7 },
{ 218348, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 1 },
{ 218348, GO_FIREWORK_SHOW_TYPE_2_RED, 23 },
{ 218348, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 8 },
{ 219949, GO_FIREWORK_SHOW_TYPE_2_RED, 18 },
{ 221574, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 19 },
{ 224412, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 0 },
{ 224806, GO_FIREWORK_SHOW_TYPE_2_GREEN, 15 },
{ 224806, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 5 },
{ 224806, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 4 },
{ 224806, GO_FIREWORK_SHOW_TYPE_1_WHITE, 16 },
{ 227653, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 6 },
{ 228197, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 231054, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 1 },
{ 231054, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 12 },
{ 236554, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 21 },
{ 238978, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 240997, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 17 },
{ 240997, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 241228, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 16 },
{ 242637, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 23 },
{ 243860, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 4 },
{ 243860, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 243860, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 7 },
{ 245491, GO_FIREWORK_SHOW_TYPE_2_GREEN, 15 },
{ 248733, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 3 },
{ 249123, GO_FIREWORK_SHOW_TYPE_1_BLUE, 19 },
{ 249123, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 18 },
{ 252159, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 252159, GO_FIREWORK_SHOW_TYPE_2_BLUE, 0 },
{ 258449, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 20 },
{ 261694, GO_FIREWORK_SHOW_TYPE_1_GREEN, 12 },
{ 264945, GO_FIREWORK_SHOW_TYPE_1_BLUE, 6 },
{ 266555, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 9 },
{ 268343, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 11 },
{ 271638, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 271638, GO_FIREWORK_SHOW_TYPE_1_BLUE, 15 },
{ 276618, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 276618, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 13 },
{ 277914, GO_FIREWORK_SHOW_TYPE_2_GREEN, 4 },
{ 281152, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 284622, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 6 },
{ 286427, GO_FIREWORK_SHOW_TYPE_2_WHITE, 16 },
{ 286427, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 12 },
{ 286427, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 21 },
{ 287804, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 2 },
{ 289649, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 10 },
{ 292520, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 19 },
{ 292520, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 17 },
{ 292520, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 22 },
{ 294260, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 13 },
{ 297365, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 15 },
{ 298961, GO_FIREWORK_SHOW_TYPE_1_GREEN, 0 },
{ 300613, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 4 },
{ 300613, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 11 },
{ 302640, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 9 },
{ 307076, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 6 },
{ 307076, GO_FIREWORK_SHOW_TYPE_1_GREEN, 19 },
{ 308699, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 20 },
{ 310329, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 5 },
{ 312068, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 18 },
{ 318539, GO_FIREWORK_SHOW_TYPE_2_RED, 23 },
{ 321664, GO_FIREWORK_SHOW_TYPE_2_BLUE, 8 },
{ 323439, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 3 },
{ 323439, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 0 },
{ 324888, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 6 },
{ 324888, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 7 },
{ 326864, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 11 },
{ 326864, GO_FIREWORK_SHOW_TYPE_2_WHITE, 21 },
{ 326864, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 2 },
{ 328133, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 1 },
{ 330143, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 16 },
{ 330143, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 10 },
{ 330143, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 13 },
{ 333012, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 12 },
{ 338445, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 21 },
{ 339491, GO_FIREWORK_SHOW_TYPE_2_BLUE, 15 },
{ 339491, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 343023, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 14 },
{ 343023, GO_FIREWORK_SHOW_TYPE_2_WHITE, 20 },
{ 344952, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 8 },
{ 346258, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 4 },
{ 346379, GO_FIREWORK_SHOW_TYPE_2_BLUE, 19 },
{ 348137, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 17 },
{ 349225, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 6 },
{ 349225, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 18 },
{ 352459, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 13 },
{ 354263, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 5 },
{ 357492, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 9 },
{ 357706, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 16 },
{ 364145, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 11 },
{ 364246, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 10 },
{ 365398, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 3 },
{ 368650, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 368650, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 20 },
{ 368650, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 22 },
{ 370406, GO_FIREWORK_SHOW_TYPE_1_RED, 18 },
{ 375230, GO_FIREWORK_SHOW_TYPE_2_GREEN, 19 },
{ 378329, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 7 },
{ 378728, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 21 },
{ 379950, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 382105, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 14 },
{ 383602, GO_FIREWORK_SHOW_TYPE_1_GREEN, 12 },
{ 384820, GO_FIREWORK_SHOW_TYPE_1_RED, 23 },
{ 386448, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 9 },
{ 388461, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 13 },
{ 390083, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 393115, GO_FIREWORK_SHOW_TYPE_1_GREEN, 8 },
{ 393324, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 6 },
{ 393324, GO_FIREWORK_SHOW_TYPE_1_RED, 22 },
{ 395247, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 17 },
{ 399395, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 0 },
{ 400128, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 11 },
{ 400128, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 19 },
{ 401420, GO_FIREWORK_SHOW_TYPE_1_RED, 23 },
{ 401420, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 3 },
{ 404247, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 14 },
{ 406280, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 7 },
{ 406392, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 20 },
{ 412613, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 17 },
{ 419353, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 23 },
{ 422060, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 15 },
{ 422454, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 11 },
{ 423676, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 423676, GO_FIREWORK_SHOW_TYPE_1_WHITE, 13 },
{ 424078, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 425639, GO_FIREWORK_SHOW_TYPE_1_WHITE, 10 },
{ 427333, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 16 },
{ 428551, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 1 },
{ 429072, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 430986, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 19 },
{ 432415, GO_FIREWORK_SHOW_TYPE_2_WHITE, 2 },
{ 435133, GO_FIREWORK_SHOW_TYPE_2_BLUE, 6 },
{ 435645, GO_FIREWORK_SHOW_TYPE_1_BLUE, 8 },
{ 436759, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 12 },
{ 445135, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 17 },
{ 446474, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 1 },
{ 447149, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 23 },
{ 448353, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 11 },
{ 448353, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 20 },
{ 449568, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 18 },
{ 449568, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 9 },
{ 456048, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 15 },
{ 456048, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 4 },
{ 457673, GO_FIREWORK_SHOW_TYPE_1_RED, 14 },
{ 458075, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 7 },
{ 467378, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 22 },
{ 469319, GO_FIREWORK_SHOW_TYPE_1_WHITE, 21 },
{ 470607, GO_FIREWORK_SHOW_TYPE_2_GREEN, 4 },
{ 472631, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 19 },
{ 472631, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 16 },
{ 474380, GO_FIREWORK_SHOW_TYPE_1_WHITE, 2 },
{ 475596, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 18 },
{ 476046, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 1 },
{ 480526, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 15 },
{ 480909, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 11 },
{ 483964, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 17 },
{ 485533, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 13 },
{ 488416, GO_FIREWORK_SHOW_TYPE_1_GREEN, 8 },
{ 488830, GO_FIREWORK_SHOW_TYPE_2_WHITE, 2 },
{ 490197, GO_FIREWORK_SHOW_TYPE_2_GREEN, 12 },
{ 493271, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 5 },
{ 495286, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 21 },
{ 496508, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 18 },
{ 498389, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 0 },
{ 500136, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 7 },
{ 504546, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 1 },
{ 506489, GO_FIREWORK_SHOW_TYPE_1_RED, 22 },
{ 507870, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 20 },
{ 508280, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 509626, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 4 },
{ 513073, GO_FIREWORK_SHOW_TYPE_2_WHITE_BIG, 16 },
{ 519506, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 5 },
{ 519607, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 19 },
{ 520816, GO_FIREWORK_SHOW_TYPE_2_BLUE, 6 },
{ 522444, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 23 },
{ 524056, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 524457, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 3 },
{ 526082, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 10 },
{ 531320, GO_FIREWORK_SHOW_TYPE_2_GREEN, 15 },
{ 532256, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 0 },
{ 532548, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 2 },
{ 534172, GO_FIREWORK_SHOW_TYPE_2_BLUE, 8 },
{ 534172, GO_FIREWORK_SHOW_TYPE_1_WHITE, 13 },
{ 535387, GO_FIREWORK_SHOW_TYPE_1_RED, 22 },
{ 535789, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 4 },
{ 538623, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 21 },
{ 539026, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 1 },
{ 540639, GO_FIREWORK_SHOW_TYPE_2_RED, 23 },
{ 545637, GO_FIREWORK_SHOW_TYPE_2_WHITE, 17 },
{ 545637, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 13 },
{ 546711, GO_FIREWORK_SHOW_TYPE_2_BLUE, 0 },
{ 554835, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 18 },
{ 556447, GO_FIREWORK_SHOW_TYPE_2_GREEN, 12 },
{ 556986, GO_FIREWORK_SHOW_TYPE_1_BLUE, 19 },
{ 559700, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 2 },
{ 559700, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 9 },
{ 559700, GO_FIREWORK_SHOW_TYPE_2_GREEN, 4 },
{ 561718, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 561718, GO_FIREWORK_SHOW_TYPE_2_RED, 1 },
{ 562914, GO_FIREWORK_SHOW_TYPE_1_BLUE, 7 },
{ 563325, GO_FIREWORK_SHOW_TYPE_1_WHITE, 20 },
{ 566572, GO_FIREWORK_SHOW_TYPE_1_WHITE, 13 },
{ 568021, GO_FIREWORK_SHOW_TYPE_1_RED, 5 },
{ 568021, GO_FIREWORK_SHOW_TYPE_1_BLUE, 19 },
{ 568365, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 570142, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 6 },
{ 571271, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 17 },
{ 573051, GO_FIREWORK_SHOW_TYPE_2_BLUE, 12 },
{ 574935, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 16 },
{ 576217, GO_FIREWORK_SHOW_TYPE_2_WHITE, 10 },
{ 576217, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 3 },
{ 580884, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 22 },
{ 585601, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 21 },
{ 588953, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 13 },
{ 590871, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 14 },
{ 592329, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 592329, GO_FIREWORK_SHOW_TYPE_2_WHITE, 2 },
{ 595337, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 5 },
{ 595842, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 8 },
{ 597351, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 10 },
{ 600721, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 16 },
{ 602198, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 1 },
{ 602198, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 22 },
{ 602198, GO_FIREWORK_SHOW_TYPE_2_WHITE, 17 },
{ 603681, GO_FIREWORK_SHOW_TYPE_1_RED, 9 },
{ 604103, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 15 },
{ 607059, GO_FIREWORK_SHOW_TYPE_2_BLUE, 4 },
{ 608678, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 11 },
{ 613545, GO_FIREWORK_SHOW_TYPE_2_WHITE, 20 },
{ 613545, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 19 },
{ 615572, GO_FIREWORK_SHOW_TYPE_2_WHITE, 13 },
{ 616784, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 5 },
{ 616784, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 18 },
{ 618808, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 22 },
{ 620021, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 17 },
{ 625058, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 3 },
{ 626785, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 4 },
{ 626785, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 1 },
{ 626785, GO_FIREWORK_SHOW_TYPE_2_BLUE, 6 },
{ 627731, GO_FIREWORK_SHOW_TYPE_2_BLUE, 12 },
{ 629949, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 21 },
{ 630970, GO_FIREWORK_SHOW_TYPE_1_RED, 9 },
{ 631607, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 15 },
{ 632741, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 8 },
{ 634464, GO_FIREWORK_SHOW_TYPE_2_BLUE, 19 },
{ 634605, GO_FIREWORK_SHOW_TYPE_1_WHITE, 20 },
{ 636559, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 2 },
{ 636559, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 13 },
{ 639045, GO_FIREWORK_SHOW_TYPE_1_BLUE, 0 },
{ 639437, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 10 },
{ 641461, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 23 },
{ 642671, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 17 },
{ 645920, GO_FIREWORK_SHOW_TYPE_1_BLUE, 7 },
{ 645920, GO_FIREWORK_SHOW_TYPE_1_RED, 22 },
{ 648856, GO_FIREWORK_SHOW_TYPE_2_GREEN, 6 },
{ 649157, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 3 },
{ 652004, GO_FIREWORK_SHOW_TYPE_1_BLUE, 15 },
{ 652405, GO_FIREWORK_SHOW_TYPE_2_WHITE, 16 },
{ 652405, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 20 },
{ 655372, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 0 },
{ 660268, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 11 },
{ 661838, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 12 },
{ 663825, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 23 },
{ 666714, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 2 },
{ 666714, GO_FIREWORK_SHOW_TYPE_2_BLUE, 7 },
{ 667363, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 3 },
{ 667363, GO_FIREWORK_SHOW_TYPE_1_YELLOW_BIG, 21 },
{ 668168, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 14 },
{ 668168, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 5 },
{ 674629, GO_FIREWORK_SHOW_TYPE_1_WHITE, 24 },
{ 676245, GO_FIREWORK_SHOW_TYPE_2_RED, 22 },
{ 676245, GO_FIREWORK_SHOW_TYPE_1_RED, 1 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 25 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 26 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 27 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 28 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_YELLOW_BIG, 16 },
{ 677053, GO_FIREWORK_SHOW_TYPE_1_GREEN_BIG, 7 },
{ 677053, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 2 },
{ 677053, GO_FIREWORK_SHOW_TYPE_1_WHITE_BIG, 29 },
{ 677053, GO_FIREWORK_SHOW_TYPE_1_GREEN, 12 },
{ 677053, GO_FIREWORK_SHOW_TYPE_1_GREEN, 6 },
{ 677053, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 14 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_GREEN, 30 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 23 },
{ 678667, GO_FIREWORK_SHOW_TYPE_1_BLUE_BIG, 31 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_PURPLE, 32 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_GREEN_BIG, 15 },
{ 678667, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 11 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 5 },
{ 678667, GO_FIREWORK_SHOW_TYPE_1_PURPLE_BIG, 33 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_PURPLE_BIG, 34 },
{ 678667, GO_FIREWORK_SHOW_TYPE_1_BLUE, 35 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_RED, 36 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 19 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_RED, 37 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_BLUE_BIG, 38 },
{ 678667, GO_FIREWORK_SHOW_TYPE_1_GREEN, 4 },
{ 678667, GO_FIREWORK_SHOW_TYPE_2_RED_BIG, 18 },
{ 679422, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 3 },
{ 679422, GO_FIREWORK_SHOW_TYPE_2_WHITE, 39 },
{ 679422, GO_FIREWORK_SHOW_TYPE_1_YELLOW, 21 },
{ 679809, GO_FIREWORK_SHOW_TYPE_1_GREEN, 8 },
{ 679809, GO_FIREWORK_SHOW_TYPE_2_WHITE, 20 },
{ 681100, GO_FIREWORK_SHOW_TYPE_2_YELLOW, 17 },
{ 681100, GO_FIREWORK_SHOW_TYPE_2_BLUE, 0 },
{ 682717, GO_FIREWORK_SHOW_TYPE_1_WHITE, 13 },
{ 686258, GO_FIREWORK_SHOW_TYPE_1_WHITE, 10 },
{ 690976, GO_FIREWORK_SHOW_TYPE_1_RED_BIG, 9 },
};
FireworkShow const fireworkShowBootyBay =
{
.schedule =
{
.entries = fireworkShowScheduleBootyBay,
.size = sizeof(fireworkShowScheduleBootyBay) / sizeof(fireworkShowScheduleBootyBay[0])
},
.spawns =
{
.entries = FireworkShowGameobjectBootyBay,
.size = sizeof(FireworkShowGameobjectBootyBay) / sizeof(FireworkShowGameobjectBootyBay[0])
},
.revelerId =
{
NPC_BOOTY_BAY_REVELER,
0
}
};
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,8 @@
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "hyjal.h"
enum Spells
@@ -58,18 +60,18 @@ public:
scheduler.Schedule(20s, 28s, [this](TaskContext context)
{
if (DoCastRandomTarget(SPELL_CARRION_SWARM, 0, 60.f))
if (DoCastRandomTarget(SPELL_CARRION_SWARM, 0, 60.f) == SPELL_CAST_OK)
Talk(SAY_SWARM);
context.Repeat(10s, 15s);
}).Schedule(25s, 32s, [this](TaskContext context)
{
if (DoCastRandomTarget(SPELL_SLEEP))
if (DoCastRandomTarget(SPELL_SLEEP) == SPELL_CAST_OK)
Talk(SAY_SLEEP);
context.Repeat(35s, 48s);
}).Schedule(30s, 48s, [this](TaskContext context)
{
if (DoCastRandomTarget(SPELL_INFERNO))
if (DoCastRandomTarget(SPELL_INFERNO) == SPELL_CAST_OK)
Talk(SAY_INFERNO);
context.Repeat(50s, 55s);
@@ -138,7 +140,24 @@ private:
};
class spell_anetheron_sleep : public SpellScript
{
PrepareSpellScript(spell_anetheron_sleep);
void FilterTargets(std::list<WorldObject*>& targets)
{
if (!targets.empty())
Acore::Containers::RandomResize(targets, 3);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_anetheron_sleep::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
void AddSC_boss_anetheron()
{
RegisterHyjalAI(boss_anetheron);
RegisterSpellScript(spell_anetheron_sleep);
}

View File

@@ -144,79 +144,10 @@ struct npc_ancient_wisp : public ScriptedAI
return;
}
private:
InstanceScript* _instance;
};
//TODO: move to db?
struct npc_doomfire : public ScriptedAI
{
npc_doomfire(Creature* creature) : ScriptedAI(creature), _summons(me) { }
void Reset() override
{
_summons.DespawnAll();
}
void MoveInLineOfSight(Unit* /*who*/) override { }
void JustEngagedWith(Unit* /*who*/) override { }
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
damage = 0;
}
void JustSummoned(Creature* summoned) override
{
_summons.Summon(summoned);
if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT)
{
me->GetMotionMaster()->MoveFollow(summoned, 0.0f, 0.0f);
}
}
private:
SummonList _summons;
};
struct npc_doomfire_targetting : public ScriptedAI
{
npc_doomfire_targetting(Creature* creature) : ScriptedAI(creature) { }
void Reset() override
{
_chaseTarget = nullptr;
ScheduleTimedEvent(5s, [&]
{
if (_chaseTarget)
{
me->GetMotionMaster()->MoveFollow(_chaseTarget, 0.0f, 0.0f);
}
else
{
Position randomPosition = me->GetRandomNearPosition(40.0f);
me->GetMotionMaster()->MovePoint(0, randomPosition);
}
}, 5s);
}
void MoveInLineOfSight(Unit* who) override
{
if (who->IsPlayer())
{
_chaseTarget = who;
}
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
damage = 0;
}
private:
Unit* _chaseTarget;
};
struct boss_archimonde : public BossAI
{
boss_archimonde(Creature* creature) : BossAI(creature, DATA_ARCHIMONDE)
@@ -256,6 +187,7 @@ struct boss_archimonde : public BossAI
}
ScheduleHealthCheckEvent(10, [&]{
scheduler.CancelAll();
me->SetReactState(REACT_PASSIVE);
DoCastProtection();
Talk(SAY_ENRAGE);
@@ -326,11 +258,11 @@ struct boss_archimonde : public BossAI
ScheduleTimedEvent(25s, 35s, [&]
{
Talk(SAY_AIR_BURST);
DoCastRandomTarget(SPELL_AIR_BURST);
DoCastRandomTarget(SPELL_AIR_BURST, 0, 0.0f, true, false, false);
}, 25s, 40s);
ScheduleTimedEvent(25s, 35s, [&]
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
DoCastDoomFire(target);
}
@@ -441,18 +373,22 @@ struct boss_archimonde : public BossAI
{
summoned->AI()->AttackStart(me);
}
else if (summoned->GetEntry() == CREATURE_DOOMFIRE)
{
summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN);
summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID());
}
else if (summoned->GetEntry() == CREATURE_DOOMFIRE_SPIRIT)
{
Position randomPosition = summoned->GetRandomNearPosition(40.0f);
summoned->GetMotionMaster()->MovePoint(0, randomPosition);
}
else
{
summoned->SetFaction(me->GetFaction()); //remove?
summoned->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
summoned->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
}
if (summoned->GetEntry() == CREATURE_DOOMFIRE)
{
summoned->CastSpell(summoned, SPELL_DOOMFIRE_SPAWN);
summoned->CastSpell(summoned, SPELL_DOOMFIRE, true, 0, 0, me->GetGUID());
}
}
void DoCastDoomFire(Unit* target)
@@ -461,12 +397,16 @@ struct boss_archimonde : public BossAI
Talk(SAY_DOOMFIRE);
Position spiritPosition = { target->GetPositionX() + DOOMFIRE_OFFSET, target->GetPositionY() + DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f };
Position doomfirePosition = { target->GetPositionX() - DOOMFIRE_OFFSET, target->GetPositionY() - DOOMFIRE_OFFSET, target->GetPositionZ(), 0.0f };
if (Unit* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
if (Creature* doomfireSpirit = me->SummonCreature(CREATURE_DOOMFIRE_SPIRIT, spiritPosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
{
if (Unit* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
if (Creature* doomfire = me->SummonCreature(CREATURE_DOOMFIRE, doomfirePosition, TEMPSUMMON_TIMED_DESPAWN, 27000))
{
doomfireSpirit->SetVisible(false);
doomfire->SetVisible(false);
doomfireSpirit->SetWalk(false);
doomfireSpirit->SetReactState(REACT_PASSIVE);
doomfire->SetReactState(REACT_PASSIVE);
doomfire->GetMotionMaster()->MoveFollow(doomfireSpirit, 0.0f, 0.0f);
}
}
}
@@ -567,8 +507,6 @@ void AddSC_boss_archimonde()
RegisterSpellScript(spell_hand_of_death);
RegisterSpellScript(spell_finger_of_death);
RegisterHyjalAI(boss_archimonde);
RegisterHyjalAI(npc_doomfire);
RegisterHyjalAI(npc_doomfire_targetting);
RegisterHyjalAI(npc_ancient_wisp);
}

View File

@@ -48,14 +48,19 @@ struct boss_kazrogal : public BossAI
public:
boss_kazrogal(Creature* creature) : BossAI(creature, DATA_KAZROGAL)
{
_recentlySpoken = false;
_markCounter = 0;
scheduler.SetValidator([this]
{
return !me->HasUnitState(UNIT_STATE_CASTING);
});
}
void Reset() override
{
_recentlySpoken = false;
_markCounter = 0;
BossAI::Reset();
}
void JustEngagedWith(Unit * who) override
{
BossAI::JustEngagedWith(who);

View File

@@ -96,8 +96,6 @@ public:
void Initialize() override
{
SetHeaders(DataHeader);
_bossWave = 0;
_retreat = 0;
trash = 0;

View File

@@ -16,11 +16,19 @@
*/
#include "boss_four_horsemen.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "naxxramas.h"
using namespace FourHorsemen;
void AddSC_boss_four_horsemen()
{
new boss_four_horsemen();
new spell_four_horsemen_mark();
RegisterSpellScript(spell_four_horsemen_consumption);
}

View File

@@ -17,13 +17,19 @@
#include "boss_maexxna.h"
#include "CreatureScript.h"
#include "Player.h"
#include "PassiveAI.h"
#include "ScriptedCreature.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
#include "naxxramas.h"
using namespace Maexxna;
void AddSC_boss_maexxna()
{
new boss_maexxna();
new boss_maexxna_webwrap();
RegisterSpellScript(spell_web_wrap_damage);
}

View File

@@ -1196,7 +1196,12 @@ public:
{
if (InstanceScript *instance = player->GetInstanceScript())
{
if (instance->CheckRequiredBosses(BOSS_SAPPHIRON))
bool AreAllWingsCleared = instance->GetBossState(BOSS_MAEXXNA) == DONE
&& (instance->GetBossState(BOSS_LOATHEB) == DONE)
&& (instance->GetBossState(BOSS_THADDIUS) == DONE)
&& (instance->GetBossState(BOSS_HORSEMAN) == DONE);
if (AreAllWingsCleared)
{
player->TeleportTo(533, sapphironEntryTP.m_positionX, sapphironEntryTP.m_positionY, sapphironEntryTP.m_positionZ, sapphironEntryTP.m_orientation);
return true;

View File

@@ -46,7 +46,6 @@ enum Spells
SPELL_COSMIC_SMASH_VISUAL_STATE = 62300,
SPELL_SELF_STUN = 65256,
SPELL_KILL_CREDIT = 65184,
SPELL_TELEPORT = 62940,
SPELL_DUAL_WIELD = 42459,
// Algalon Stalker

View File

@@ -347,7 +347,6 @@ public:
uint32 chestId = RAID_MODE(GO_FREYA_CHEST, GO_FREYA_CHEST_HERO);
chestId -= 2 * _elderCount; // offset
me->DespawnOrUnsummon(5000);
if (GameObject* go = me->SummonGameObject(chestId, 2345.61f, -71.20f, 425.104f, 3.0f, 0, 0, 0, 0, 0))
{
go->ReplaceAllGameObjectFlags((GameObjectFlags)0);
@@ -360,10 +359,24 @@ public:
me->CastSpell(me, 65074, true); // credit
m_pInstance->SetData(TYPE_FREYA, DONE);
}
scheduler.Schedule(14s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_TELEPORT);
});
}
}
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TELEPORT)
{
me->DespawnOrUnsummon();
m_pInstance->SetData(EVENT_KEEPER_TELEPORTED, DONE);
}
}
void JustSummoned(Creature* cr) override
{
if (cr->GetEntry() == NPC_FREYA_UNSTABLE_SUN_BEAM)
@@ -547,6 +560,7 @@ public:
void UpdateAI(uint32 diff) override
{
scheduler.Update(diff);
if (!UpdateVictim())
return;

View File

@@ -346,6 +346,7 @@ public:
{
pInstance->SetData(TYPE_HODIR, DONE);
me->CastSpell(me, 64899, true); // credit
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BITING_COLD_PLAYER_AURA);
}
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
@@ -355,7 +356,6 @@ public:
me->CombatStop();
me->InterruptNonMeleeSpells(true);
me->RemoveAllAuras();
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BITING_COLD_PLAYER_AURA);
events.Reset();
summons.DespawnAll();
@@ -383,13 +383,17 @@ public:
}
Talk(TEXT_DEATH);
me->DespawnOrUnsummon(10000);
scheduler.Schedule(14s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_TELEPORT);
});
}
}
}
void UpdateAI(uint32 diff) override
{
scheduler.Update(diff);
if (me->GetPositionY() <= ENTRANCE_DOOR.GetPositionY() || me->GetPositionY() >= EXIT_DOOR.GetPositionY())
{
boss_hodirAI::EnterEvadeMode();
@@ -497,6 +501,15 @@ public:
DoMeleeAttackIfReady();
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TELEPORT)
{
me->DespawnOrUnsummon();
pInstance->SetData(EVENT_KEEPER_TELEPORTED, DONE);
}
}
Creature* GetHelper(uint8 index)
{
return Helpers[index] ? ObjectAccessor::GetCreature(*me, Helpers[index]) : nullptr;

View File

@@ -237,7 +237,6 @@ public:
_looksAchievement = true;
me->SetDisableGravity(true);
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE);
me->DisableRotate(true);
events.Reset();
@@ -327,6 +326,8 @@ public:
arm->DespawnOrUnsummon(3000); // visual
if (Creature* arm = ObjectAccessor::GetCreature(*me, _right))
arm->DespawnOrUnsummon(3000); // visual
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisableGravity(true);
}
void KilledUnit(Unit*) override

View File

@@ -802,12 +802,21 @@ public:
case EVENT_DISAPPEAR:
if( pInstance )
pInstance->SetData(TYPE_MIMIRON, DONE);
DoCastSelf(SPELL_TELEPORT);
summons.DespawnAll();
me->DespawnOrUnsummon();
break;
}
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TELEPORT)
{
me->DespawnOrUnsummon();
pInstance->SetData(EVENT_KEEPER_TELEPORTED, DONE);
}
}
void MoveInLineOfSight(Unit* /*mover*/) override {}
void EnterEvadeMode(EvadeReason why) override

View File

@@ -197,6 +197,7 @@ enum ThorimEvents
EVENT_THORIM_OUTRO1 = 13,
EVENT_THORIM_OUTRO2 = 14,
EVENT_THORIM_OUTRO3 = 15,
EVENT_THORIM_OUTRO4 = 16,
EVENT_DR_ACOLYTE_GH = 20,
EVENT_DR_ACOLYTE_HS = 21,
@@ -630,6 +631,11 @@ public:
me->CastSpell(me, SPELL_LIGHTNING_CHARGE_BUFF, true);
events.RescheduleEvent(EVENT_THORIM_LIGHTNING_CHARGE, 10s, 0, EVENT_PHASE_RING);
}
else if (spellInfo->Id == SPELL_TELEPORT)
{
me->DespawnOrUnsummon();
m_pInstance->SetData(EVENT_KEEPER_TELEPORTED, DONE);
}
}
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
@@ -773,12 +779,13 @@ public:
{
Talk(SAY_END_NORMAL_3);
}
// Defeat credit
if (m_pInstance)
m_pInstance->SetData(TYPE_THORIM, DONE);
me->DespawnOrUnsummon(8000);
events.ScheduleEvent(EVENT_THORIM_OUTRO4, 14s, 0, 3);
break;
case EVENT_THORIM_OUTRO4:
DoCastSelf(SPELL_TELEPORT);
break;
}

View File

@@ -251,6 +251,8 @@ enum Misc
ACTION_ILLUSION_ICECROWN = 2,
ACTION_ILLUSION_STORMWIND = 3,
// ACTION_SARA_UPDATE_SUMMON_KEEPERS = 4, // defined in ulduar.h
EVENT_PHASE_ONE = 1,
EVENT_PHASE_TWO = 2,
EVENT_PHASE_THREE = 3,
@@ -271,6 +273,26 @@ struct LocationsXY
float x, y, z;
};
Position const GossipKeepersPos[4] =
{
{1945.6823f, 33.342014f, 411.44083f, 5.270895f}, // Freya
{1945.7609f, -81.52171f, 411.4407f, 1.029744f}, // Hodir
{2028.7656f, 17.42014f, 411.44458f, 3.857178f}, // Mimiron
{2028.8219f, -65.73573f, 411.44257f, 2.460914f} // Thorim
};
const Position KeepersPos[4] =
{
{1939.32f, 42.165f, 338.415f, 5.17955f}, // Freya
{1939.13f, -90.8332f, 338.415f, 1.00123f}, // Hodir
{2036.81f, 25.6646f, 338.415f, 3.74227f}, // Mimiron
{2036.59f, -73.8499f, 338.415f, 2.34819f} // Thorim
};
const uint32 TABLE_KEEPER_ENTRY[4] = {NPC_FREYA_KEEPER, NPC_HODIR_KEEPER, NPC_MIMIRON_KEEPER, NPC_THORIM_KEEPER};
const uint32 TABLE_GOSSIP_ENTRY[4] = {NPC_FREYA_GOSSIP, NPC_HODIR_GOSSIP, NPC_MIMIRON_GOSSIP, NPC_THORIM_GOSSIP};
const uint32 TABLE_KEEPER_TYPE[4] = {TYPE_FREYA, TYPE_HODIR, TYPE_MIMIRON, TYPE_THORIM};
static LocationsXY yoggPortalLoc[] =
{
{1970.48f, -9.75f, 325.5f},
@@ -344,7 +366,6 @@ enum Texts
SAY_LK_2 = 1,
SAY_YOGG_5 = 3,
SAY_YOGG_6 = 4,
};
const Position Middle = {1980.28f, -25.5868f, 329.397f, M_PI * 1.5f};
@@ -371,7 +392,6 @@ public:
SummonList summons;
uint32 _initFight;
ObjectGuid _keepersGUID[4];
uint8 _summonedGuardiansCount;
uint32 _p2TalkTimer;
bool _secondPhase;
@@ -382,17 +402,9 @@ public:
void AttackStart(Unit*) override { }
void MoveInLineOfSight(Unit*) override { }
void JustSummoned(Creature* cr) override
void JustSummoned(Creature* summon) override
{
summons.Summon(cr);
if (cr->GetEntry() >= NPC_FREYA_KEEPER && cr->GetEntry() <= NPC_THORIM_KEEPER)
{
if (cr->GetEntry() == NPC_FREYA_KEEPER)
cr->CastSpell(cr, SPELL_CONJURE_SANITY_WELL, false);
_keepersGUID[cr->GetEntry() - NPC_FREYA_KEEPER] = cr->GetGUID();
}
else if (cr->GetEntry() == NPC_SANITY_WELL)
cr->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_SCALE, true);
summons.Summon(summon);
}
void SpawnClouds()
@@ -407,15 +419,6 @@ public:
}
}
void SpawnWeels()
{
me->SummonCreature(NPC_SANITY_WELL, 2042.56f, -40.3667f, 329.274f, 0.0f);
me->SummonCreature(NPC_SANITY_WELL, 1975.89f, 40.0216f, 331.1f, 0.0f);
me->SummonCreature(NPC_SANITY_WELL, 1987.12f, -91.2702f, 330.186f, 0.0f);
me->SummonCreature(NPC_SANITY_WELL, 1900.48f, -51.2386f, 332.13f, 0.0f);
me->SummonCreature(NPC_SANITY_WELL, 1899.94f, 0.330621f, 332.296f, 0.0f);
}
void EnterEvadeMode(EvadeReason why) override
{
if (!_EnterEvadeMode(why))
@@ -469,9 +472,7 @@ public:
_initFight = 1;
for (uint8 i = 0; i < 4; ++i)
_keepersGUID[i].Clear();
UpdateKeeperSpawns();
_summonedGuardiansCount = 0;
_p2TalkTimer = 0;
_secondPhase = false;
@@ -503,9 +504,11 @@ public:
me->SetInCombatWithZone();
AttackStart(target);
me->CastSpell(me, SPELL_SANITY_BASE, true);
DespawnGossipKeepers();
// Engage Keepers
summons.DoZoneInCombat();
SaveKeepers();
me->CastSpell(me, SPELL_SANITY_BASE, true);
events.ScheduleEvent(EVENT_SARA_P1_DOORS_CLOSE, 15s, 0, EVENT_PHASE_ONE);
events.ScheduleEvent(EVENT_SARA_P1_BERSERK, 15min, 0, 0);
@@ -516,26 +519,27 @@ public:
me->setActive(true);
}
void SaveKeepers()
void DespawnGossipKeepers()
{
for (uint8 i = 0; i < 4; ++i)
for (uint8 i = KEEPER_FREYA; i <= KEEPER_THORIM; i++)
summons.DespawnEntry(TABLE_GOSSIP_ENTRY[i]);
}
void UpdateKeeperSpawns()
{
for (uint8 i = KEEPER_FREYA; i <= KEEPER_THORIM; i++)
{
if (m_pInstance->GetData(TYPE_WATCHERS) & (1 << i))
switch (i)
{
case KEEPER_FREYA:
SpawnWeels();
me->SummonCreature(NPC_FREYA_KEEPER, 1939.32f, 42.165f, 338.415f, 5.17955f);
break;
case KEEPER_HODIR:
me->SummonCreature(NPC_HODIR_KEEPER, 1939.13f, -90.8332f, 338.415f, 1.00123f);
break;
case KEEPER_MIMIRON:
me->SummonCreature(NPC_MIMIRON_KEEPER, 2036.81f, 25.6646f, 338.415f, 3.74227f);
break;
case KEEPER_THORIM:
me->SummonCreature(NPC_THORIM_KEEPER, 2036.59f, -73.8499f, 338.415f, 2.34819f);
break;
}
{
if (!summons.HasEntry(TABLE_KEEPER_ENTRY[i]))
me->SummonCreature(TABLE_KEEPER_ENTRY[i], KeepersPos[i]);
}
else if (m_pInstance->GetData(TABLE_KEEPER_TYPE[i]) == DONE)
{
if (!summons.HasEntry(TABLE_GOSSIP_ENTRY[i]))
me->SummonCreature(TABLE_GOSSIP_ENTRY[i], GossipKeepersPos[i]);
}
}
}
void InformCloud()
@@ -625,9 +629,8 @@ public:
{
uint8 _count = 0;
for (uint8 i = 0; i < 4; ++i)
if (_keepersGUID[i])
if (m_pInstance->GetData(TYPE_WATCHERS) & (1 << i))
++_count;
return _count;
}
else if (param == DATA_GET_SARA_PHASE)
@@ -638,7 +641,11 @@ public:
void DoAction(int32 param) override
{
if (param == ACTION_BRAIN_DAMAGED)
if (param == ACTION_SARA_UPDATE_SUMMON_KEEPERS)
{
UpdateKeeperSpawns();
}
else if (param == ACTION_BRAIN_DAMAGED)
{
summons.DoAction(ACTION_REMOVE_STUN);
@@ -648,7 +655,7 @@ public:
EntryCheckPredicate pred3(NPC_THORIM_KEEPER);
summons.DoAction(ACTION_THORIM_START_STORM, pred3);
if (!(_keepersGUID[0] && _keepersGUID[1] && _keepersGUID[2] && _keepersGUID[3]) && me->GetMap()->Is25ManRaid())
if (me->GetMap()->Is25ManRaid() && (GetData(DATA_GET_KEEPERS_COUNT) > 0))
summons.DoAction(ACTION_YOGG_SARON_HARD_MODE, pred2);
summons.DespawnEntry(NPC_DEATH_ORB);
@@ -660,8 +667,17 @@ public:
}
else if (param == ACTION_YOGG_SARON_DEATH)
{
// Despawn everything but Yogg-Saron's corpse
summons.DoAction(ACTION_DESPAWN_ADDS);
summons.DespawnEntry(NPC_CRUSHER_TENTACLE);
summons.DespawnEntry(NPC_CONSTRICTOR_TENTACLE);
summons.DespawnEntry(NPC_CORRUPTOR_TENTACLE);
summons.DespawnEntry(NPC_VOICE_OF_YOGG_SARON);
summons.DespawnEntry(NPC_BRAIN_OF_YOGG_SARON);
summons.DespawnEntry(NPC_MIMIRON_GOSSIP);
summons.DespawnEntry(NPC_HODIR_GOSSIP);
summons.DespawnEntry(NPC_FREYA_GOSSIP);
summons.DespawnEntry(NPC_THORIM_GOSSIP);
summons.DespawnEntry(NPC_MIMIRON_KEEPER);
summons.DespawnEntry(NPC_HODIR_KEEPER);
summons.DespawnEntry(NPC_FREYA_KEEPER);
@@ -1709,52 +1725,56 @@ public:
};
};
class boss_yoggsaron_keeper : public CreatureScript
struct boss_yoggsaron_keeper : public NullCreatureAI
{
public:
boss_yoggsaron_keeper() : CreatureScript("boss_yoggsaron_keeper") { }
boss_yoggsaron_keeper(Creature* creature) : NullCreatureAI(creature), _summons(creature) { }
CreatureAI* GetAI(Creature* pCreature) const override
void DoAction(int32 param) override
{
return GetUlduarAI<boss_yoggsaron_keeperAI>(pCreature);
if (me->GetEntry() == NPC_THORIM_KEEPER && param == ACTION_THORIM_START_STORM)
me->CastSpell(me, SPELL_TITANIC_STORM_PASSIVE, false);
else if (param == ACTION_DESPAWN_ADDS)
_summons.DespawnAll();
}
struct boss_yoggsaron_keeperAI : public NullCreatureAI
void JustSummoned(Creature* summon) override
{
boss_yoggsaron_keeperAI(Creature* pCreature) : NullCreatureAI(pCreature)
_summons.Summon(summon);
}
void JustEngagedWith(Unit* /*who*/) override
{
switch (me->GetEntry())
{
_checkTimer = 0;
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_SCALE, true);
}
uint32 _checkTimer;
void DoAction(int32 param) override
{
if (me->GetEntry() == NPC_THORIM_KEEPER && param == ACTION_THORIM_START_STORM)
me->CastSpell(me, SPELL_TITANIC_STORM_PASSIVE, false);
}
void UpdateAI(uint32 diff) override
{
if (me->GetInstanceScript())
if (me->GetInstanceScript()->GetData(TYPE_YOGGSARON) != IN_PROGRESS)
return;
_checkTimer += diff;
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (me->GetEntry() == NPC_MIMIRON_KEEPER)
{
if (_checkTimer >= 2000)
case NPC_FREYA_KEEPER:
me->AddAura(SPELL_FREYA_PASSIVE, me);
me->CastSpell(me, SPELL_CONJURE_SANITY_WELL, false);
break;
case NPC_HODIR_KEEPER:
me->AddAura(SPELL_HODIR_PASSIVE, me);
me->AddAura(SPELL_PROTECTIVE_GAZE, me);
break;
case NPC_MIMIRON_KEEPER:
me->AddAura(SPELL_MIMIRON_PASSIVE, me);
scheduler.Schedule(2s, [this](TaskContext context)
{
me->CastSpell(me, SPELL_DESTABILIZATION_MATRIX, false);
_checkTimer = 0;
}
}
if (!me->HasUnitState(UNIT_STATE_CASTING))
me->CastSpell(me, SPELL_DESTABILIZATION_MATRIX, false);
context.Repeat(2s);
});
break;
case NPC_THORIM_KEEPER:
me->AddAura(SPELL_THORIM_PASSIVE, me);
break;
}
};
}
void UpdateAI(uint32 diff) override
{
scheduler.Update(diff);
}
private:
SummonList _summons;
};
class boss_yoggsaron_descend_portal : public CreatureScript
@@ -2739,6 +2759,33 @@ public:
}
};
const Position SanityWellsPos[5] =
{
{2042.56f, -40.3667f, 329.274f, 0.0f},
{1975.89f, 40.0216f, 331.1f, 0.0f},
{1987.12f, -91.2702f, 330.186f, 0.0f},
{1900.48f, -51.2386f, 332.13f, 0.0f},
{1899.94f, 0.330621f, 332.296f, 0.0f}
};
// 64170 - Sanity Well
class spell_keeper_freya_summon_sanity_well : public SpellScript
{
PrepareSpellScript(spell_keeper_freya_summon_sanity_well);
void OnEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* caster = GetCaster())
for (int i = 0; i < 5; i++)
caster->SummonCreature(NPC_SANITY_WELL, SanityWellsPos[i]);
}
void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_keeper_freya_summon_sanity_well::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
}
};
/* 63881 - Malady of the Mind
63795 - Psychosis
63830 - Malady of the Mind
@@ -3032,7 +3079,7 @@ void AddSC_boss_yoggsaron()
new boss_yoggsaron_crusher_tentacle();
new boss_yoggsaron_corruptor_tentacle();
new boss_yoggsaron_constrictor_tentacle();
new boss_yoggsaron_keeper();
RegisterUlduarCreatureAI(boss_yoggsaron_keeper);
new boss_yoggsaron_descend_portal();
new boss_yoggsaron_influence_tentacle();
new boss_yoggsaron_immortal_guardian();
@@ -3053,6 +3100,7 @@ void AddSC_boss_yoggsaron()
new spell_yogg_saron_insane_periodic_trigger();
new spell_yogg_saron_insane();
new spell_yogg_saron_sanity_well();
RegisterSpellScript(spell_keeper_freya_summon_sanity_well);
new spell_yogg_saron_sanity_reduce();
new spell_yogg_saron_empowering_shadows();
new spell_yogg_saron_in_the_maws_of_the_old_god();

View File

@@ -370,22 +370,6 @@ public:
case NPC_MIMIRON_ACU:
m_MimironACUguid = creature->GetGUID();
break;
case NPC_FREYA_GOSSIP:
m_keepersGossipGUID[TYPE_FREYA - TYPE_FREYA] = creature->GetGUID();
ShowKeeperGossip(TYPE_FREYA, creature);
break;
case NPC_HODIR_GOSSIP:
m_keepersGossipGUID[TYPE_HODIR - TYPE_FREYA] = creature->GetGUID();
ShowKeeperGossip(TYPE_HODIR, creature);
break;
case NPC_THORIM_GOSSIP:
m_keepersGossipGUID[TYPE_THORIM - TYPE_FREYA] = creature->GetGUID();
ShowKeeperGossip(TYPE_THORIM, creature);
break;
case NPC_MIMIRON_GOSSIP:
m_keepersGossipGUID[TYPE_MIMIRON - TYPE_FREYA] = creature->GetGUID();
ShowKeeperGossip(TYPE_MIMIRON, creature);
break;
case NPC_ELDER_IRONBRANCH:
case NPC_ELDER_STONEBARK:
case NPC_ELDER_BRIGHTLEAF:
@@ -433,19 +417,6 @@ public:
go->SetGoState(state);
}
void ShowKeeperGossip(uint8 type, Creature* cr, ObjectGuid guid = ObjectGuid::Empty)
{
if (!cr)
{
cr = instance->GetCreature(guid);
if (!cr)
return;
}
bool on = (GetData(type) == DONE && !(GetData(TYPE_WATCHERS) & (1 << (type - TYPE_FREYA))));
cr->SetVisible(on);
}
void OnGameObjectCreate(GameObject* gameObject) override
{
switch (gameObject->GetEntry())
@@ -695,7 +666,6 @@ public:
case TYPE_THORIM:
case TYPE_FREYA:
m_auiEncounter[type] = data;
ShowKeeperGossip(type, nullptr, m_keepersGossipGUID[type - TYPE_FREYA]);
if (GetData(TYPE_MIMIRON) == DONE && GetData(TYPE_FREYA) == DONE && GetData(TYPE_HODIR) == DONE && GetData(TYPE_THORIM) == DONE)
{
if (GameObject* go = instance->GetGameObject(m_keepersgateGUID))
@@ -716,8 +686,11 @@ public:
break;
case TYPE_WATCHERS:
m_auiEncounter[type] |= 1 << data;
[[fallthrough]];
case EVENT_KEEPER_TELEPORTED:
if (Creature* sara = instance->GetCreature(m_saraGUID))
sara->AI()->DoAction(ACTION_SARA_UPDATE_SUMMON_KEEPERS);
break;
case DATA_MAGE_BARRIER:
m_mageBarrier = data;
break;
@@ -728,6 +701,7 @@ public:
case EVENT_TOWER_OF_FLAMES_DESTROYED:
{
instance->LoadGrid(364.0f, -16.0f); //make sure leviathan is loaded
instance->LoadGrid(364.0f, 32.0f); //make sure Mimiron's and Thorim's Targetting Crystal are loaded
m_leviathanTowers[type - EVENT_TOWER_OF_LIFE_DESTROYED] = data;
for (uint8 i = 0; i < 2; ++i)
{

View File

@@ -21,6 +21,7 @@
#include "GameObjectScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "PassiveAI.h"
#include "ScriptedGossip.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
@@ -51,7 +52,14 @@ enum Texts
GOSSIP_MENU_CONFIRM = 10333,
NPC_TEXT_CONFIRM = 14325,
SAY_KEEPER_SELECTED = 1,
// Chosen
SAY_KEEPER_CHOSEN_TO_PLAYER = 0,
SAY_KEEPER_CHOSEN_ANNOUNCE = 1,
};
enum UldActions
{
ACTION_KEEPER_OUTRO = 0,
};
enum UldNPCs
@@ -69,6 +77,8 @@ enum UldGameObjects
enum UldSpells
{
SPELL_SIMPLE_TELEPORT = 12980,
SPELL_KEEPER_TELEPORT = 62940,
SPELL_SNOW_MOUND_PARTICLES = 64615
};
@@ -77,6 +87,68 @@ class npc_ulduar_keeper : public CreatureScript
public:
npc_ulduar_keeper() : CreatureScript("npc_ulduar_keeper_gossip") { }
struct npc_ulduar_keeperAI : public NullCreatureAI
{
npc_ulduar_keeperAI(Creature* creature) : NullCreatureAI(creature) { }
void Reset() override
{
scheduler.Schedule(250ms, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_SIMPLE_TELEPORT);
});
}
void DoAction(int32 param) override
{
if (param == ACTION_KEEPER_OUTRO)
{
switch (me->GetEntry())
{
case NPC_FREYA_GOSSIP:
_keeper = KEEPER_FREYA;
break;
case NPC_HODIR_GOSSIP:
_keeper = KEEPER_HODIR;
break;
case NPC_MIMIRON_GOSSIP:
_keeper = KEEPER_MIMIRON;
break;
case NPC_THORIM_GOSSIP:
_keeper = KEEPER_THORIM;
break;
default:
return;
}
scheduler.Schedule(1s, [this](TaskContext /*context*/)
{
DoCastSelf(SPELL_KEEPER_TELEPORT);
});
}
}
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_TELEPORT)
{
me->DespawnOrUnsummon();
me->GetInstanceScript()->SetData(TYPE_WATCHERS, _keeper);
}
}
void UpdateAI(uint32 diff) override
{
scheduler.Update(diff);
}
private:
uint8 _keeper;
};
CreatureAI* GetAI(Creature* creature) const override
{
return GetUlduarAI<npc_ulduar_keeperAI>(creature);
}
bool OnGossipHello(Player* player, Creature* creature) override
{
uint32 gossipMenuId = 0;
@@ -109,7 +181,6 @@ public:
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
ClearGossipMenuFor(player);
uint8 _keeper = 0;
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
@@ -118,34 +189,12 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF+2:
{
switch (creature->GetEntry())
{
case NPC_FREYA_GOSSIP:
creature->AI()->Talk(SAY_KEEPER_SELECTED);
_keeper = KEEPER_FREYA;
break;
case NPC_HODIR_GOSSIP:
creature->AI()->Talk(SAY_KEEPER_SELECTED);
_keeper = KEEPER_HODIR;
break;
case NPC_MIMIRON_GOSSIP:
creature->AI()->Talk(SAY_KEEPER_SELECTED);
_keeper = KEEPER_MIMIRON;
break;
case NPC_THORIM_GOSSIP:
creature->AI()->Talk(SAY_KEEPER_SELECTED);
_keeper = KEEPER_THORIM;
break;
}
creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
CloseGossipMenuFor(player);
if (creature->GetInstanceScript())
{
creature->GetInstanceScript()->SetData(TYPE_WATCHERS, _keeper);
creature->DespawnOrUnsummon(6000);
}
creature->AI()->Talk(SAY_KEEPER_CHOSEN_TO_PLAYER, player);
creature->AI()->Talk(SAY_KEEPER_CHOSEN_ANNOUNCE);
creature->AI()->DoAction(ACTION_KEEPER_OUTRO);
}
}
return true;

View File

@@ -284,6 +284,14 @@ enum UlduarMisc
TIMER_ALGALON_TO_SUMMON = 200,
TIMER_ALGALON_SUMMONED = 100,
// Algalon the Observer, Freya, Hodir, Mimiron, Thorim, Gossip Keepers
SPELL_TELEPORT = 62940,
// Freya, Hodir, Mimiron, Thorim
EVENT_KEEPER_TELEPORTED = 62941,
// Yogg-Saron
ACTION_SARA_UPDATE_SUMMON_KEEPERS = 4,
KEEPER_FREYA = 0,
KEEPER_HODIR = 1,
KEEPER_MIMIRON = 2,

View File

@@ -1287,19 +1287,21 @@ public:
if (!summoner)
return;
if (summoner->GetTypeId() != TYPEID_UNIT)
{
if (summoner->GetTypeId() != TYPEID_PLAYER)
return;
}
summoner->ToUnit()->CastSpell(summoner->ToUnit(), SPELL_WAITING_FOR_A_BOMBER, true);
summoner->ToUnit()->CastSpell(summoner->ToUnit(), SPELL_FLIGHT_ORDERS, true);
Player* player = summoner->ToPlayer();
if (!player)
return;
player->CastSpell(player, SPELL_WAITING_FOR_A_BOMBER, true);
player->CastSpell(player, SPELL_FLIGHT_ORDERS, true);
events.ScheduleEvent(EVENT_START_FLIGHT, 0);
events.ScheduleEvent(EVENT_TAKE_PASSENGER, 3000);
me->SetCanFly(true);
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
me->SetSpeed(MOVE_FLIGHT, 0.1f);
me->SetFaction(summoner->ToUnit()->GetFaction());
me->SetFaction(player->GetFaction());
}
void DamageTaken(Unit* who, uint32&, DamageEffectType, SpellSchoolMask) override

View File

@@ -472,7 +472,7 @@ struct boss_kaelthas : public BossAI
{
DoCastRandomTarget(SPELL_FLAME_STRIKE, 0, 100.0f);
}, 30250ms, 50650ms);
ScheduleTimedEvent(71000ms, [&]
ScheduleTimedEvent(50000ms, [&]
{
Talk(SAY_SUMMON_PHOENIX);
DoCastSelf(SPELL_PHOENIX);

View File

@@ -439,9 +439,6 @@ enum EnshlavedNetherwingDrake
NPC_DRAGONMAW_WRANGLER = 21717,
NPC_ESCAPE_DUMMY = 22317,
EVENT_TAKE_OFF = 1,
EVENT_CREDIT_PLAYER = 2,
// Point
POINT_DESPAWN = 1
};
@@ -451,18 +448,14 @@ struct npc_enslaved_netherwing_drake : public ScriptedAI
public:
npc_enslaved_netherwing_drake(Creature* creature) : ScriptedAI(creature)
{
Tapped = false;
_tapped = false;
Reset();
}
ObjectGuid PlayerGUID;
bool Tapped;
Player* GetPlayer() { return ObjectAccessor::GetPlayer(*me, PlayerGUID); }
void Reset() override
{
if (!Tapped)
scheduler.CancelAll();
if (!_tapped)
{
me->RestoreFaction();
me->SetReactState(REACT_AGGRESSIVE);
@@ -474,9 +467,8 @@ public:
void JustDied(Unit* /*killer*/) override
{
Tapped = false;
_tapped = false;
me->RestoreFaction();
events.CancelEvent(EVENT_TAKE_OFF);
}
void SpellHit(Unit* caster, SpellInfo const* spell) override
@@ -485,20 +477,45 @@ public:
if (!playerCaster)
return;
if (spell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !Tapped &&
if (spell->Id == SPELL_HIT_FORCE_OF_NELTHARAKU && !_tapped &&
playerCaster->GetQuestStatus(QUEST_THE_FORCE_OF_NELTHARAKU) == QUEST_STATUS_INCOMPLETE)
{
Tapped = true;
PlayerGUID = caster->GetGUID();
_tapped = true;
_playerGUID = caster->GetGUID();
me->SetFaction(FACTION_FLAYER_HUNTER); // Not sure if this is correct, it was taken off of Mordenai.
scheduler.Schedule(2s, [this](TaskContext)
{
me->SetFaction(FACTION_FLAYER_HUNTER); // Not sure if this is correct, it was taken off of Mordenai.
if (Unit* Dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_SUBJUGATOR, 25.0f))
AttackStart(Dragonmaw);
else if (Unit* Dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_WRANGLER, 25.0f))
AttackStart(Dragonmaw);
if (Unit* dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_SUBJUGATOR, 25.0f))
AttackStart(dragonmaw);
else if (Unit* dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_WRANGLER, 25.0f))
AttackStart(dragonmaw);
scheduler.Schedule(2s, [this](TaskContext)
{
_tapped = false;
Position pos;
if (Unit* escapeDummy = me->FindNearestCreature(NPC_ESCAPE_DUMMY, 30.0f))
pos = escapeDummy->GetPosition();
else
{
pos = me->GetRandomNearPosition(20.0f);
pos.m_positionZ += 25.0f;
}
events.ScheduleEvent(EVENT_TAKE_OFF, 2s);
me->SetDisableGravity(true);
me->GetMotionMaster()->MovePoint(POINT_DESPAWN, pos);
me->SetReactState(REACT_PASSIVE);
scheduler.Schedule(100ms, [this](TaskContext)
{
if (Player* player = _GetPlayer())
{
DoCast(player, SPELL_FORCE_OF_NELTHARAKU, true);
}
me->DespawnOrUnsummon(3s, 0s);
});
});
});
}
}
@@ -514,40 +531,21 @@ public:
void UpdateAI(uint32 diff) override
{
events.Update(diff);
scheduler.Update(diff);
if (!UpdateVictim())
{
switch (events.ExecuteEvent())
{
case EVENT_TAKE_OFF:
{
Tapped = false;
Position pos;
if (Unit* EscapeDummy = me->FindNearestCreature(NPC_ESCAPE_DUMMY, 30))
pos = EscapeDummy->GetPosition();
else
{
pos = me->GetRandomNearPosition(20);
pos.m_positionZ += 25;
}
me->SetDisableGravity(true);
me->GetMotionMaster()->MovePoint(POINT_DESPAWN, pos);
me->SetReactState(REACT_PASSIVE);
events.ScheduleEvent(EVENT_CREDIT_PLAYER, 100ms);
break;
}
case EVENT_CREDIT_PLAYER:
DoCast(GetPlayer(), SPELL_FORCE_OF_NELTHARAKU, true);
me->DespawnOrUnsummon(3s, 0s);
break;
}
return;
}
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
DoMeleeAttackIfReady();
}
private:
bool _tapped;
ObjectGuid _playerGUID;
Player* _GetPlayer() { return ObjectAccessor::GetPlayer(*me, _playerGUID); }
};
/*#####

View File

@@ -628,6 +628,7 @@ class spell_gen_black_magic_enchant : public AuraScript
};
// 53642 - The Might of Mograine
// 64174 - Protective Gaze
class spell_gen_area_aura_select_players : public AuraScript
{
PrepareAuraScript(spell_gen_area_aura_select_players);
@@ -642,6 +643,24 @@ class spell_gen_area_aura_select_players : public AuraScript
}
};
// 62650 - Fortitude of Frost
// 62670 - Resilience of Nature
// 62671 - Speed of Invention
// 62702 - Fury of the Storm
class spell_gen_area_aura_select_players_and_caster : public AuraScript
{
PrepareAuraScript(spell_gen_area_aura_select_players_and_caster);
bool CheckAreaTarget(Unit* target)
{
return target->GetTypeId() == TYPEID_PLAYER || target == GetCaster();
}
void Register() override
{
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_gen_area_aura_select_players_and_caster::CheckAreaTarget);
}
};
/* 29883 - Blink (spell_gen_select_target_count_15_1)
38573 - Spore Drop Effect (spell_gen_select_target_count_15_1)
38633 - Arcane Volley (spell_gen_select_target_count_15_1)
@@ -5134,6 +5153,43 @@ class spell_gen_choking_vines : public AuraScript
}
};
// 28865 - Consumption
class spell_gen_consumption : public SpellScript
{
PrepareSpellScript(spell_gen_consumption);
void CalculateDamage(SpellEffIndex /*effIndex*/)
{
Map* map = GetCaster()->GetMap();
if (!map)
{
return;
}
int32 value = 0;
if (map->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL) // NAXX25 N
{
value = urand(4500, 4700);
}
else if (map->GetId() == 533) // NAXX10 N
{
value = urand(3000, 3200);
}
else if (map->GetId() == 532) // Karazhan
{
value = urand(1110, 1310);
}
if (value)
{
SetEffectValue(value);
}
}
void Register() override
{
OnEffectLaunchTarget += SpellEffectFn(spell_gen_consumption::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -5156,6 +5212,7 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_disabled_above_63);
RegisterSpellScript(spell_gen_black_magic_enchant);
RegisterSpellScript(spell_gen_area_aura_select_players);
RegisterSpellScript(spell_gen_area_aura_select_players_and_caster);
RegisterSpellScriptWithArgs(spell_gen_select_target_count, "spell_gen_select_target_count_15_1", TARGET_UNIT_SRC_AREA_ENEMY, 1);
RegisterSpellScriptWithArgs(spell_gen_select_target_count, "spell_gen_select_target_count_15_2", TARGET_UNIT_SRC_AREA_ENEMY, 2);
RegisterSpellScriptWithArgs(spell_gen_select_target_count, "spell_gen_select_target_count_15_5", TARGET_UNIT_SRC_AREA_ENEMY, 5);
@@ -5287,5 +5344,6 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_jubling_cooldown);
RegisterSpellScript(spell_gen_yehkinya_bramble);
RegisterSpellScript(spell_gen_choking_vines);
RegisterSpellScript(spell_gen_consumption);
}