Merge branch 'master' into Playerbot
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#ifndef _LOG_H__
|
||||
#define _LOG_H__
|
||||
|
||||
#include "IoContext.h"
|
||||
#include "Define.h"
|
||||
#include "LogCommon.h"
|
||||
#include "StringFormat.h"
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#include "PreparedStatement.h"
|
||||
#include "QueryCallback.h"
|
||||
#include "QueryResult.h"
|
||||
#include "Transaction.h"
|
||||
|
||||
/// Accessor to the world database
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Define.h"
|
||||
#include "QueryResult.h"
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
|
||||
#include "GuardAI.h"
|
||||
#include "CreatureAIImpl.h"
|
||||
#include "Player.h"
|
||||
|
||||
int32 GuardAI::Permissible(Creature const* creature)
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
#ifndef CREATUREAIIMPL_H
|
||||
#define CREATUREAIIMPL_H
|
||||
|
||||
#include "CreatureAI.h"
|
||||
#include "Define.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
template<typename First, typename Second, typename... Rest>
|
||||
|
||||
@@ -145,7 +145,16 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3
|
||||
ConditionSourceInfo info = ConditionSourceInfo(unit, GetBaseObject(), me ? me->GetVictim() : nullptr);
|
||||
|
||||
if (sConditionMgr->IsObjectMeetToConditions(info, conds))
|
||||
ProcessEvent(*i, unit, var0, var1, bvar, spell, gob);
|
||||
{
|
||||
ASSERT(executionStack.empty());
|
||||
executionStack.emplace_back(SmartScriptFrame{ *i, unit, var0, var1, bvar, spell, gob });
|
||||
while (!executionStack.empty())
|
||||
{
|
||||
auto [stack_holder , stack_unit, stack_var0, stack_var1, stack_bvar, stack_spell, stack_gob] = executionStack.back();
|
||||
executionStack.pop_back();
|
||||
ProcessEvent(stack_holder, stack_unit, stack_var0, stack_var1, stack_bvar, stack_spell, stack_gob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -684,7 +693,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
bool isSpellIgnoreLOS = spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT);
|
||||
|
||||
// If target is rooted we move out of melee range before casting, but not further than spell max range.
|
||||
if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell)
|
||||
if (isWithinLOSInMap && isWithinMeleeRange && isRangedAttack && isTargetRooted && canCastSpell && !me->IsVehicle())
|
||||
{
|
||||
failedSpellCast = true; // Mark spellcast as failed so we can retry it later
|
||||
float minDistance = std::max(meleeRange, spellMinRange) - distanceToTarget + NOMINAL_MELEE_RANGE;
|
||||
@@ -3255,9 +3264,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
if (e.link && e.link != e.event_id)
|
||||
{
|
||||
SmartScriptHolder linked = FindLinkedEvent(e.link);
|
||||
if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK)
|
||||
ProcessEvent(linked, unit, var0, var1, bvar, spell, gob);
|
||||
auto linked = FindLinkedEvent(e.link);
|
||||
if (linked.has_value() && linked.value().get().GetEventType() == SMART_EVENT_LINK)
|
||||
executionStack.emplace_back(SmartScriptFrame{ linked.value(), unit, var0, var1, bvar, spell, gob });
|
||||
else
|
||||
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Link Event {} not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
|
||||
}
|
||||
@@ -4852,7 +4861,14 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
|
||||
case SMART_EVENT_DISTANCE_CREATURE:
|
||||
case SMART_EVENT_DISTANCE_GAMEOBJECT:
|
||||
{
|
||||
ProcessEvent(e);
|
||||
ASSERT(executionStack.empty());
|
||||
executionStack.emplace_back(SmartScriptFrame{ e, nullptr, 0, 0, false, nullptr, nullptr });
|
||||
while (!executionStack.empty())
|
||||
{
|
||||
auto [stack_holder, stack_unit, stack_var0, stack_var1, stack_bvar, stack_spell, stack_gob] = executionStack.back();
|
||||
executionStack.pop_back();
|
||||
ProcessEvent(stack_holder, stack_unit, stack_var0, stack_var1, stack_bvar, stack_spell, stack_gob);
|
||||
}
|
||||
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
|
||||
{
|
||||
e.enableTimed = false;//disable event if it is in an ActionList and was processed once
|
||||
|
||||
@@ -25,9 +25,21 @@
|
||||
#include "SmartScriptMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "Unit.h"
|
||||
#include <deque>
|
||||
|
||||
class SmartScript
|
||||
{
|
||||
struct SmartScriptFrame
|
||||
{
|
||||
SmartScriptHolder& holder;
|
||||
Unit* unit;
|
||||
uint32 var0;
|
||||
uint32 var1;
|
||||
bool bvar;
|
||||
SpellInfo const* spell;
|
||||
GameObject* gob;
|
||||
};
|
||||
|
||||
public:
|
||||
SmartScript();
|
||||
~SmartScript();
|
||||
@@ -253,7 +265,8 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
SmartScriptHolder FindLinkedEvent (uint32 link)
|
||||
std::optional<std::reference_wrapper<
|
||||
SmartScriptHolder>> FindLinkedEvent(uint32 link)
|
||||
{
|
||||
if (!mEvents.empty())
|
||||
{
|
||||
@@ -261,15 +274,16 @@ private:
|
||||
{
|
||||
if (i->event_id == link)
|
||||
{
|
||||
return (*i);
|
||||
return std::ref(*i);
|
||||
}
|
||||
}
|
||||
}
|
||||
SmartScriptHolder s;
|
||||
return s;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
GuidUnorderedSet _summonList;
|
||||
|
||||
std::deque<SmartScriptFrame> executionStack;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "DBCStores.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include <chrono>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Log.h"
|
||||
#include "Timer.h"
|
||||
#include "QueryResult.h"
|
||||
#include <list>
|
||||
|
||||
namespace AddonMgr
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <array>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
struct AddonInfo
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Types.h"
|
||||
#include "World.h"
|
||||
|
||||
bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::string const& name)
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "DBCEnums.h"
|
||||
#include "EventProcessor.h"
|
||||
#include <array>
|
||||
#include <deque>
|
||||
|
||||
constexpr auto COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME = 10;
|
||||
|
||||
|
||||
@@ -1328,6 +1328,27 @@ bool BattlegroundAV::SetupBattleground()
|
||||
return false;
|
||||
}
|
||||
|
||||
// Hallow's End decorations
|
||||
if (IsHolidayActive(HOLIDAY_HALLOWS_END))
|
||||
for (uint16 i = 0; i <= (BG_AV_OBJECT_HALLOWS_END_MAX - BG_AV_OBJECT_HALLOWS_END_MIN); i++)
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_HALLOWS_END_MIN + i,
|
||||
std::get<0>(BG_AV_HallowsEndObjectPos[i]),
|
||||
std::get<1>(BG_AV_HallowsEndObjectPos[i]).GetPositionX(),
|
||||
std::get<1>(BG_AV_HallowsEndObjectPos[i]).GetPositionY(),
|
||||
std::get<1>(BG_AV_HallowsEndObjectPos[i]).GetPositionZ(),
|
||||
std::get<1>(BG_AV_HallowsEndObjectPos[i]).GetOrientation(),
|
||||
std::get<2>(BG_AV_HallowsEndObjectPos[i])[0],
|
||||
std::get<2>(BG_AV_HallowsEndObjectPos[i])[1],
|
||||
std::get<2>(BG_AV_HallowsEndObjectPos[i])[2],
|
||||
std::get<2>(BG_AV_HallowsEndObjectPos[i])[3],
|
||||
RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!11.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Generic gameobjects
|
||||
for (uint16 i = 0; i <= (BG_AV_OBJECT_GENERIC_MAX - BG_AV_OBJECT_GENERIC_MIN); i++)
|
||||
{
|
||||
@@ -1403,6 +1424,11 @@ bool BattlegroundAV::SetupBattleground()
|
||||
for (i = BG_AV_OBJECT_HANDPACKED_SNOWDRIFT_MIN ; i <= BG_AV_OBJECT_HANDPACKED_SNOWDRIFT_MAX; i++)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
|
||||
// Hallow's End decorations
|
||||
if (IsHolidayActive(HOLIDAY_HALLOWS_END))
|
||||
for (uint16 i = BG_AV_OBJECT_HALLOWS_END_MIN; i <= BG_AV_OBJECT_HALLOWS_END_MAX; i++)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
|
||||
// Generic gameobjects
|
||||
for (uint16 i = BG_AV_OBJECT_GENERIC_MIN; i <= BG_AV_OBJECT_GENERIC_MAX; i++)
|
||||
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
|
||||
|
||||
@@ -326,8 +326,10 @@ enum BG_AV_ObjectTypes
|
||||
BG_AV_OBJECT_STORMPIKE_BANNER = 248,
|
||||
BG_AV_OBJECT_GENERIC_MIN = 249,
|
||||
BG_AV_OBJECT_GENERIC_MAX = 323,
|
||||
BG_AV_OBJECT_HALLOWS_END_MIN = 324,
|
||||
BG_AV_OBJECT_HALLOWS_END_MAX = 403,
|
||||
|
||||
BG_AV_OBJECT_MAX = 324
|
||||
BG_AV_OBJECT_MAX = 404
|
||||
};
|
||||
|
||||
enum BG_AV_OBJECTS
|
||||
@@ -658,6 +660,96 @@ std::tuple<uint32, Position, std::array<float, 4>> const BG_AV_GenericObjectPos[
|
||||
{ 179438, { -1181.10f, -370.747f, 53.6246f, 2.68781f }, { 0.0f, 0.0f, 0.974370f, 0.224951f } }, // 46248
|
||||
};
|
||||
|
||||
// GO template ID, Position, rotation0-3, VerifiedBuild
|
||||
std::tuple<uint32, Position, std::array<float, 4>> const BG_AV_HallowsEndObjectPos[BG_AV_OBJECT_HALLOWS_END_MAX - BG_AV_OBJECT_HALLOWS_END_MIN + 1] =
|
||||
{
|
||||
// G_Pumpkin_01
|
||||
{ 180405, { -1158.97f, -357.826f, 52.0172f, 2.02458f }, { 0.0f, 0.0f, 0.848047f, 0.529921f } }, // 46248
|
||||
{ 180405, { -126.302f, -453.835f, 36.749f, 1.97222f }, { 0.0f, 0.0f, 0.833885f, 0.551938f } }, // 46248
|
||||
{ 180405, { -1305.91f, -299.92f, 92.6384f, 3.85718f }, { 0.0f, 0.0f, -0.936671f, 0.35021f } }, // 46248
|
||||
{ 180405, { -1357.74f, -283.203f, 95.7139f, 1.309f }, { 0.0f, 0.0f, 0.608761f, 0.793354f } }, // 46248
|
||||
{ 180405, { -500.524f, -192.561f, 57.4784f, 2.02458f }, { 0.0f, 0.0f, 0.848047f, 0.529921f } }, // 46248
|
||||
{ 180405, { -766.615f, -343.542f, 67.8594f, 2.32129f }, { 0.0f, 0.0f, 0.91706f, 0.39875f } }, // 46248
|
||||
{ 180405, { 14.5434f, -288.689f, 18.6031f, 1.309f }, { 0.0f, 0.0f, 0.608761f, 0.793354f } }, // 46248
|
||||
{ 180405, { 15.1771f, -417.266f, 45.4566f, 4.64258f }, { 0.0f, 0.0f, -0.731354f, 0.681998f } }, // 46248
|
||||
{ 180405, { 233.097f, -339.278f, 45.7862f, 1.18682f }, { 0.0f, 0.0f, 0.559193f, 0.829038f } }, // 46248
|
||||
{ 180405, { 587.37f, -82.283f, 48.2967f, 2.32129f }, { 0.0f, 0.0f, 0.91706f, 0.39875f } }, // 46248
|
||||
{ 180405, { 607.686f, -18.3559f, 49.127f, 0.837757f }, { 0.0f, 0.0f, 0.406736f, 0.913546f } }, // 46248
|
||||
{ 180405, { 615.03f, -192.127f, 41.8927f, 0.59341f }, { 0.0f, 0.0f, 0.292371f, 0.956305f } }, // 46248
|
||||
{ 180405, { 629.882f, -153.54f, 42.6296f, 0.558504f }, { 0.0f, 0.0f, 0.275637f, 0.961262f } }, // 46248
|
||||
{ 180405, { 644.681f, -121.622f, 53.0553f, 3.50812f }, { 0.0f, 0.0f, -0.983254f, 0.182238f } }, // 46248
|
||||
{ 180405, { 646.655f, -265.535f, 39.2146f, 0.279252f }, { 0.0f, 0.0f, 0.139173f, 0.990268f } }, // 46248
|
||||
{ 180405, { 666.656f, -16.0868f, 53.9853f, 5.81195f }, { 0.0f, 0.0f, -0.233445f, 0.97237f } }, // 46248
|
||||
// G_Pumpkin_02
|
||||
{ 180406, { -115.708f, -559.182f, 46.4159f, 3.3685f }, { 0.0f, 0.0f, -0.993571f, 0.113208f } }, // 46248
|
||||
{ 180406, { -1208.5f, -248.34f, 73.0666f, 1.6057f }, { 0.0f, 0.0f, 0.719339f, 0.694659f } }, // 46248
|
||||
{ 180406, { -1227.88f, -372.741f, 57.9504f, 2.51327f }, { 0.0f, 0.0f, 0.951056f, 0.309017f } }, // 46248
|
||||
{ 180406, { -1315.84f, -266.819f, 91.5945f, 6.14356f }, { 0.0f, 0.0f, -0.0697556f, 0.997564f } }, // 46248
|
||||
{ 180406, { -132.559f, -469.016f, 36.7525f, 1.53589f }, { 0.0f, 0.0f, 0.694658f, 0.71934f } }, // 46248
|
||||
{ 180406, { -1343.9f, -278.906f, 95.8878f, 0.157079f }, { 0.0f, 0.0f, 0.0784588f, 0.996917f } }, // 46248
|
||||
{ 180406, { -1359.55f, -275.984f, 97.4804f, 1.25664f }, { 0.0f, 0.0f, 0.587785f, 0.809017f } }, // 46248
|
||||
{ 180406, { -494.535f, -177.293f, 57.4655f, 0.820303f }, { 0.0f, 0.0f, 0.398748f, 0.91706f } }, // 46248
|
||||
{ 180406, { -563.554f, -277.615f, 51.8459f, 1.25664f }, { 0.0f, 0.0f, 0.587785f, 0.809017f } }, // 46248
|
||||
{ 180406, { 11.2743f, -309.234f, 18.5687f, 2.02458f }, { 0.0f, 0.0f, 0.848047f, 0.529921f } }, // 46248
|
||||
{ 180406, { 226.415f, -343.573f, 52.7243f, 2.65289f }, { 0.0f, 0.0f, 0.970295f, 0.241925f } }, // 46248
|
||||
{ 180406, { 4.625f, -287.089f, 18.9285f, 1.53589f }, { 0.0f, 0.0f, 0.694658f, 0.71934f } }, // 46248
|
||||
{ 180406, { 580.425f, -67.8611f, 48.2671f, 1.79769f }, { 0.0f, 0.0f, 0.782608f, 0.622515f } }, // 46248
|
||||
{ 180406, { 602.411f, -20.1337f, 49.127f, 0.523598f }, { 0.0f, 0.0f, 0.258819f, 0.965926f } }, // 46248
|
||||
{ 180406, { 609.092f, -156.634f, 42.63f, 0.523598f }, { 0.0f, 0.0f, 0.258819f, 0.965926f } }, // 46248
|
||||
{ 180406, { 626.033f, -268.701f, 39.2121f, 0.471238f }, { 0.0f, 0.0f, 0.233445f, 0.97237f } }, // 46248
|
||||
{ 180406, { 640.854f, -230.306f, 40.6572f, 0.349065f }, { 0.0f, 0.0f, 0.173648f, 0.984808f } }, // 46248
|
||||
{ 180406, { 657.406f, -19.0451f, 53.6367f, 5.70723f }, { 0.0f, 0.0f, -0.284015f, 0.95882f } }, // 46248
|
||||
{ 180406, { 659.373f, -113.127f, 59.9997f, 4.85202f }, { 0.0f, 0.0f, -0.656058f, 0.75471f } }, // 46248
|
||||
{ 180406, { 672.715f, -36.0156f, 53.9853f, 5.00909f }, { 0.0f, 0.0f, -0.594823f, 0.803857f } }, // 46248
|
||||
// G_Pumpkin_03
|
||||
{ 180407, { -1160.13f, -348.217f, 52.0004f, 1.8675f }, { 0.0f, 0.0f, 0.803857f, 0.594823f } }, // 46248
|
||||
{ 180407, { -119.587f, -457.271f, 29.7838f, 1.71042f }, { 0.0f, 0.0f, 0.754709f, 0.656059f } }, // 46248
|
||||
{ 180407, { -1209.86f, -258.707f, 72.7768f, 1.8675f }, { 0.0f, 0.0f, 0.803857f, 0.594823f } }, // 46248
|
||||
{ 180407, { -1346.58f, -271.594f, 97.4922f, 0.209439f }, { 0.0f, 0.0f, 0.104528f, 0.994522f } }, // 46248
|
||||
{ 180407, { -1362.37f, -309.545f, 91.7044f, 2.46091f }, { 0.0f, 0.0f, 0.942641f, 0.333808f } }, // 46248
|
||||
{ 180407, { -556.349f, -269.62f, 52.3396f, 0.90757f }, { 0.0f, 0.0f, 0.438371f, 0.898794f } }, // 46248
|
||||
{ 180407, { -756.531f, -349.429f, 67.5058f, 3.47321f }, { 0.0f, 0.0f, -0.986285f, 0.16505f } }, // 46248
|
||||
{ 180407, { 1.51215f, -307.455f, 18.9285f, 2.14675f }, { 0.0f, 0.0f, 0.878817f, 0.47716f } }, // 46248
|
||||
{ 180407, { 236.859f, -356.431f, 52.7499f, 2.26893f }, { 0.0f, 0.0f, 0.906307f, 0.422619f } }, // 46248
|
||||
{ 180407, { 587.264f, -64.75f, 41.3224f, 1.71042f }, { 0.0f, 0.0f, 0.754709f, 0.656059f } }, // 46248
|
||||
{ 180407, { 621.241f, -233.352f, 40.6083f, 0.663223f }, { 0.0f, 0.0f, 0.325567f, 0.945519f } }, // 46248
|
||||
{ 180407, { 634.472f, -189.106f, 41.8665f, 0.523598f }, { 0.0f, 0.0f, 0.258819f, 0.965926f } }, // 46248
|
||||
{ 180407, { 650.7f, -126.259f, 59.9983f, 3.94445f }, { 0.0f, 0.0f, -0.920505f, 0.390732f } }, // 46248
|
||||
{ 180407, { 663.257f, -38.8993f, 53.6307f, 4.92183f }, { 0.0f, 0.0f, -0.62932f, 0.777146f } }, // 46248
|
||||
// Bat01
|
||||
{ 180426, { -1329.83f, -300.214f, 107.965f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { -1332.54f, -294.962f, 117.904f, 1.51844f }, { 0.0f, 0.0f, 0.688354f, 0.725374f } }, // 46248
|
||||
{ 180426, { -1336.12f, -293.71f, 109.14f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { -1338.41f, -299.877f, 111.3f, 0.767944f }, { 0.0f, 0.0f, 0.374606f, 0.927184f } }, // 46248
|
||||
{ 180426, { -247.924f, -289.095f, 43.7022f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { -250.307f, -294.67f, 51.5083f, 1.51844f }, { 0.0f, 0.0f, 0.688354f, 0.725374f } }, // 46248
|
||||
{ 180426, { -255.208f, -305.076f, 47.9254f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { -263.672f, -294.012f, 66.9219f, 3.4383f }, { 0.0f, 0.0f, -0.989016f, 0.147811f } }, // 46248
|
||||
{ 180426, { -268.958f, -286.128f, 65.7266f, 5.28835f }, { 0.0f, 0.0f, -0.477159f, 0.878817f } }, // 46248
|
||||
{ 180426, { -269.526f, -278.163f, 65.567f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { -270.384f, -292.399f, 57.8192f, 5.14872f }, { 0.0f, 0.0f, -0.537299f, 0.843392f } }, // 46248
|
||||
{ 180426, { 617.543f, -72.4375f, 61.5847f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
{ 180426, { 622.451f, -62.4271f, 70.3966f, 2.70526f }, { 0.0f, 0.0f, 0.976295f, 0.216442f } }, // 46248
|
||||
{ 180426, { 627.418f, -47.6285f, 58.8142f, 0.890117f }, { 0.0f, 0.0f, 0.430511f, 0.902586f } }, // 46248
|
||||
{ 180426, { 630.523f, -44.9826f, 69.864f, 3.24635f }, { 0.0f, 0.0f, -0.998629f, 0.0523532f } }, // 46248
|
||||
{ 180426, { 632.502f, -67.3333f, 65.444f, 3.14159f }, { 0.0f, 0.0f, -1.0f, 0.0f } }, // 46248
|
||||
{ 180426, { 635.186f, -45.3333f, 55.8426f, 2.09439f }, { 0.0f, 0.0f, 0.866025f, 0.500001f } }, // 46248
|
||||
// Bat02
|
||||
{ 180427, { -1336.3f, -295.644f, 116.531f, 3.45576f }, { 0.0f, 0.0f, -0.987688f, 0.156436f } }, // 46248
|
||||
{ 180427, { -1338.58f, -296.351f, 117.126f, 4.13643f }, { 0.0f, 0.0f, -0.878817f, 0.47716f } }, // 46248
|
||||
{ 180427, { -1341.88f, -298.439f, 119.023f, 4.97419f }, { 0.0f, 0.0f, -0.608761f, 0.793354f } }, // 46248
|
||||
{ 180427, { -1347.11f, -291.332f, 110.968f, 3.45576f }, { 0.0f, 0.0f, -0.987688f, 0.156436f } }, // 46248
|
||||
{ 180427, { -258.149f, -300.316f, 52.5291f, 2.80998f }, { 0.0f, 0.0f, 0.986285f, 0.16505f } }, // 46248
|
||||
{ 180427, { -263.734f, -304.363f, 41.6929f, 4.97419f }, { 0.0f, 0.0f, -0.608761f, 0.793354f } }, // 46248
|
||||
{ 180427, { -265.972f, -290.925f, 73.3895f, 4.97419f }, { 0.0f, 0.0f, -0.608761f, 0.793354f } }, // 46248
|
||||
{ 180427, { -267.002f, -291.997f, 68.8963f, 4.97419f }, { 0.0f, 0.0f, -0.608761f, 0.793354f } }, // 46248
|
||||
{ 180427, { -273.811f, -288.575f, 50.9076f, 4.97419f }, { 0.0f, 0.0f, -0.608761f, 0.793354f } }, // 46248
|
||||
{ 180427, { 618.34f, -55.8924f, 73.4326f, 2.70526f }, { 0.0f, 0.0f, 0.976295f, 0.216442f } }, // 46248
|
||||
{ 180427, { 625.45f, -53.5191f, 60.4743f, 2.74016f }, { 0.0f, 0.0f, 0.979924f, 0.19937f } }, // 46248
|
||||
{ 180427, { 627.179f, -43.5382f, 72.6337f, 2.65289f }, { 0.0f, 0.0f, 0.970295f, 0.241925f } }, // 46248
|
||||
{ 180427, { 636.71f, -62.2118f, 69.4788f, 2.19911f }, { 0.0f, 0.0f, 0.891006f, 0.453991f } }, // 46248
|
||||
};
|
||||
|
||||
const float BG_AV_DoorPositons[2][4] =
|
||||
{
|
||||
{780.487f, -493.024f, 99.9553f, 3.0976f}, //alliance
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
#include "Common.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class Player;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define __ACORE_CHANNELMGR_H
|
||||
|
||||
#include "Channel.h"
|
||||
#include "Common.h"
|
||||
#include "World.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldSession.h"
|
||||
#include <vector>
|
||||
|
||||
class ChatHandler;
|
||||
class Creature;
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
#include "Define.h"
|
||||
#include "Errors.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Optional.h"
|
||||
#include "StringFormat.h"
|
||||
#include "Util.h"
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "StringConvert.h"
|
||||
#include "StringFormat.h"
|
||||
#include "Util.h"
|
||||
#include <charconv>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef _HOSTILEREFMANAGER
|
||||
#define _HOSTILEREFMANAGER
|
||||
|
||||
#include "Common.h"
|
||||
#include "RefMgr.h"
|
||||
|
||||
class Unit;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef _THREATMANAGER
|
||||
#define _THREATMANAGER
|
||||
|
||||
#include "Common.h"
|
||||
#include "IteratorPair.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "Reference.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define ACORE_CONDITIONMGR_H
|
||||
|
||||
#include "Define.h"
|
||||
#include "Errors.h"
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "SpellMgr.h"
|
||||
#include "StringConvert.h"
|
||||
#include "Tokenize.h"
|
||||
#include "VMapMgr2.h"
|
||||
#include "World.h"
|
||||
|
||||
namespace DisableMgr
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "Map.h"
|
||||
#include "VMapMgr2.h"
|
||||
|
||||
class Unit;
|
||||
|
||||
enum DisableType
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "World.h"
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
typedef std::vector<FlyByCamera> FlyByCameraCollection;
|
||||
std::unordered_map<uint32, FlyByCameraCollection> sFlyByCameraStore;
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
#ifndef _LFG_H
|
||||
#define _LFG_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldPacket.h"
|
||||
#include <array>
|
||||
#include <map>
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "LFGGroupData.h"
|
||||
#include "LFGPlayerData.h"
|
||||
#include "LFGQueue.h"
|
||||
#include "LFGScripts.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define _LFGPLAYERDATA_H
|
||||
|
||||
#include "LFG.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectDefines.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "LootMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "Common.h"
|
||||
#include "CreatureData.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "ItemTemplate.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Unit.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ItemTemplate.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Unit.h"
|
||||
#include "World.h"
|
||||
#include <list>
|
||||
|
||||
#define MAX_AGGRO_RESET_TIME 10 // in seconds
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include "Item.h"
|
||||
#include "Common.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameTime.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "G3D/Vector3.h"
|
||||
#include <cmath>
|
||||
|
||||
class ByteBuffer;
|
||||
|
||||
|
||||
@@ -11350,8 +11350,6 @@ void Player::LeaveBattleground(Battleground* bg)
|
||||
if (bg->isArena() && (bg->GetStatus() == STATUS_IN_PROGRESS || bg->GetStatus() == STATUS_WAIT_JOIN))
|
||||
sScriptMgr->OnBattlegroundDesertion(this, ARENA_DESERTION_TYPE_LEAVE_BG);
|
||||
|
||||
bg->RemovePlayerAtLeave(this);
|
||||
|
||||
// xinef: reset corpse reclaim time
|
||||
m_deathExpireTime = GameTime::GetGameTime().count();
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "Battlefield.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Channel.h"
|
||||
#include "CharacterDatabaseCleaner.h"
|
||||
#include "Chat.h"
|
||||
#include "Common.h"
|
||||
@@ -46,7 +45,6 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "OutdoorPvP.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "QueryHolder.h"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,6 @@
|
||||
#include "DisableMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "GameTime.h"
|
||||
#include "GossipDef.h"
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "MapMgr.h"
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <numeric>
|
||||
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
|
||||
ScriptMapMap sSpellScripts;
|
||||
ScriptMapMap sEventScripts;
|
||||
ScriptMapMap sWaypointScripts;
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "Bag.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "Corpse.h"
|
||||
#include "Creature.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "Common.h"
|
||||
#include "MapDefines.h"
|
||||
#include "NGrid.h"
|
||||
#include <cmath>
|
||||
|
||||
// Forward class definitions
|
||||
class Corpse;
|
||||
|
||||
@@ -29,15 +29,11 @@
|
||||
#include "MapMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Pet.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "UpdateFieldFlags.h"
|
||||
#include "Util.h"
|
||||
#include "Vehicle.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
@@ -22,11 +22,9 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Optional.h"
|
||||
#include "Player.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
class Item;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "UpdateData.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include <cmath>
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Spell.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WhoListCacheMgr.h"
|
||||
#include "World.h"
|
||||
@@ -53,6 +52,8 @@
|
||||
#include "WorldSession.h"
|
||||
#include <zlib.h>
|
||||
|
||||
#include "Corpse.h"
|
||||
|
||||
void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
LOG_DEBUG("network", "WORLD: Recvd CMSG_REPOP_REQUEST Message");
|
||||
|
||||
@@ -18,11 +18,9 @@
|
||||
#ifndef ACORE_LOOTITEMSTORAGE_H
|
||||
#define ACORE_LOOTITEMSTORAGE_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "Item.h"
|
||||
#include "LootMgr.h"
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
struct StoredLootItem
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Containers.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "Group.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "Log.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "RefMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Unit.h"
|
||||
#include "World.h"
|
||||
|
||||
MailSender::MailSender(Object* sender, MailStationery stationery) : m_stationery(stationery)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
struct AuctionEntry;
|
||||
struct CalendarEvent;
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "GridNotifiers.h"
|
||||
#include "Group.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "IVMapMgr.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "MapInstanced.h"
|
||||
#include "Metric.h"
|
||||
@@ -39,6 +40,7 @@
|
||||
#include "Transport.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "Vehicle.h"
|
||||
#include "VMapMgr2.h"
|
||||
#include "Weather.h"
|
||||
|
||||
union u_map_magic
|
||||
|
||||
@@ -33,11 +33,9 @@
|
||||
#include "Position.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "Timer.h"
|
||||
#include <bitset>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <shared_mutex>
|
||||
|
||||
class Unit;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "VMapFactory.h"
|
||||
|
||||
MapInstanced::MapInstanced(uint32 id) : Map(id, 0, DUNGEON_DIFFICULTY_NORMAL)
|
||||
{
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "MapUpdater.h"
|
||||
#include "Object.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
class Transport;
|
||||
class StaticTransport;
|
||||
class MotionTransport;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "Define.h"
|
||||
#include "PCQueue.h"
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
|
||||
class Map;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef ZONE_SCRIPT_H_
|
||||
#define ZONE_SCRIPT_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include "Creature.h"
|
||||
|
||||
class GameObject;
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "AuctionHouseMgr.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
class AuctionListOwnerItemsDelayEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef _GAMEGRAVEYARD_H_
|
||||
#define _GAMEGRAVEYARD_H_
|
||||
|
||||
#include "Common.h"
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <map>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "DatabaseEnv.h"
|
||||
#include "GridDefines.h"
|
||||
#include "Log.h"
|
||||
#include "QueryResult.h"
|
||||
|
||||
WaypointMgr::WaypointMgr()
|
||||
{
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define OUTDOOR_PVP_H_
|
||||
|
||||
#include "SharedDefines.h"
|
||||
#include "Util.h"
|
||||
#include "ZoneScript.h"
|
||||
#include <array>
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL 1000
|
||||
|
||||
#include "OutdoorPvP.h"
|
||||
#include <memory>
|
||||
|
||||
class Player;
|
||||
class GameObject;
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef _PETITIONMGR_H
|
||||
#define _PETITIONMGR_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "ObjectGuid.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@@ -31,10 +31,8 @@
|
||||
#include "LFGMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PetDefines.h"
|
||||
#include "QuestDef.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Tuples.h"
|
||||
#include "Types.h"
|
||||
#include "Weather.h"
|
||||
#include "World.h"
|
||||
#include <atomic>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "ScriptObjectFwd.h"
|
||||
#include <string_view>
|
||||
|
||||
//#include "Duration.h"
|
||||
//#include "LFG.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define _WORLDPACKET_H_
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "Common.h"
|
||||
#include "Duration.h"
|
||||
#include "Opcodes.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "QueryHolder.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SocialMgr.h"
|
||||
#include "Tokenize.h"
|
||||
#include "Transport.h"
|
||||
#include "Vehicle.h"
|
||||
#include "WardenWin.h"
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "zlib.h"
|
||||
#include <memory>
|
||||
|
||||
#include "ServerPktHeader.h"
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
void compressBuff(void* dst, uint32* dst_size, void* src, int src_size)
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "AuthCrypt.h"
|
||||
#include "Common.h"
|
||||
#include "MPSCQueue.h"
|
||||
#include "ServerPktHeader.h"
|
||||
#include "Socket.h"
|
||||
#include "Util.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Unit.h"
|
||||
#include "UpdateData.h"
|
||||
#include "Util.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "Vehicle.h"
|
||||
@@ -60,6 +59,8 @@
|
||||
// there is probably some underlying problem with imports which should properly addressed
|
||||
// see: https://github.com/azerothcore/azerothcore-wotlk/issues/9766
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "IVMapMgr.h"
|
||||
#include "VMapMgr2.h"
|
||||
|
||||
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "SpellInfo.h"
|
||||
#include "Chat.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "Corpse.h"
|
||||
#include "DBCStores.h"
|
||||
#include "LootMgr.h"
|
||||
#include "Player.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "Creature.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "Opcodes.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#define _PLAYER_DUMP_H
|
||||
|
||||
#include "ObjectGuid.h"
|
||||
#include <iosfwd>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Util.h"
|
||||
#include "World.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
#ifndef _WARDEN_MAC_H
|
||||
#define _WARDEN_MAC_H
|
||||
|
||||
#include "ARC4.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "Warden.h"
|
||||
#include <map>
|
||||
|
||||
class WorldSession;
|
||||
class Warden;
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#define _WARDEN_WIN_H
|
||||
|
||||
#include "ByteBuffer.h"
|
||||
#include "Cryptography/ARC4.h"
|
||||
#include "Cryptography/BigNumber.h"
|
||||
#include "Warden.h"
|
||||
#include <list>
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#ifndef __WEATHER_H
|
||||
#define __WEATHER_H
|
||||
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Timer.h"
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ EndScriptData */
|
||||
#include "CreatureTextMgr.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "GameGraveyard.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "Language.h"
|
||||
#include "MapMgr.h"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "karazhan.h"
|
||||
#include <array>
|
||||
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum EchoOfMedivhGossipOptions
|
||||
{
|
||||
MEDIVH_GOSSIP_START_PVE = 1,
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "karazhan.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum Texts
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ EndScriptData */
|
||||
#include "CreatureScript.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "zulaman.h"
|
||||
|
||||
@@ -60,7 +61,8 @@ enum Spells
|
||||
SPELL_FIRE_BOMB_DAMAGE = 42630,
|
||||
|
||||
// Hatcher Spells
|
||||
SPELL_HATCH_EGG = 42471, // 43734
|
||||
SPELL_HATCH_EGG_ALL = 42471,
|
||||
SPELL_HATCH_EGG_SINGULAR = 43734,
|
||||
SPELL_SUMMON_HATCHLING = 42493,
|
||||
|
||||
// Hatchling Spells
|
||||
@@ -78,609 +80,415 @@ enum Creatures
|
||||
const int area_dx = 44;
|
||||
const int area_dy = 51;
|
||||
|
||||
float JanalainPos[1][3] =
|
||||
{
|
||||
{-33.93f, 1149.27f, 19}
|
||||
};
|
||||
const Position janalainPos = {-33.93f, 1149.27f, 19.0f, 0.0f};
|
||||
|
||||
float FireWallCoords[4][4] =
|
||||
const Position fireWallCoords[4] =
|
||||
{
|
||||
{-10.13f, 1149.27f, 19, 3.1415f},
|
||||
{-33.93f, 1123.90f, 19, 0.5f * 3.1415f},
|
||||
{-54.80f, 1150.08f, 19, 0},
|
||||
{-54.80f, 1150.08f, 19, 0.0f},
|
||||
{-33.93f, 1175.68f, 19, 1.5f * 3.1415f}
|
||||
};
|
||||
|
||||
float hatcherway[2][5][3] =
|
||||
const Position hatcherway[2][5] =
|
||||
{
|
||||
{
|
||||
{-87.46f, 1170.09f, 6},
|
||||
{-74.41f, 1154.75f, 6},
|
||||
{-52.74f, 1153.32f, 19},
|
||||
{-33.37f, 1172.46f, 19},
|
||||
{-33.09f, 1203.87f, 19}
|
||||
{-87.46f, 1170.09f, 6.0f, 0.0f},
|
||||
{-74.41f, 1154.75f, 6.0f, 0.0f},
|
||||
{-52.74f, 1153.32f, 19.0f, 0.0f},
|
||||
{-33.37f, 1172.46f, 19.0f, 0.0f},
|
||||
{-33.09f, 1203.87f, 19.0f, 0.0f}
|
||||
},
|
||||
{
|
||||
{-86.57f, 1132.85f, 6},
|
||||
{-73.94f, 1146.00f, 6},
|
||||
{-52.29f, 1146.51f, 19},
|
||||
{-33.57f, 1125.72f, 19},
|
||||
{-34.29f, 1095.22f, 19}
|
||||
{-86.57f, 1132.85f, 6.0f, 0.0f},
|
||||
{-73.94f, 1146.00f, 6.0f, 0.0f},
|
||||
{-52.29f, 1146.51f, 19.0f, 0.0f},
|
||||
{-33.57f, 1125.72f, 19.0f, 0.0f},
|
||||
{-34.29f, 1095.22f, 19.0f, 0.0f}
|
||||
}
|
||||
};
|
||||
class boss_janalai : public CreatureScript
|
||||
|
||||
enum HatchActions
|
||||
{
|
||||
public:
|
||||
boss_janalai()
|
||||
: CreatureScript("boss_janalai")
|
||||
HATCH_RESET = 0,
|
||||
HATCH_ALL = 1
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
MAX_BOMB_COUNT = 40,
|
||||
|
||||
SCHEDULER_GROUP_HATCHING = 1,
|
||||
|
||||
EVENT_BERSERK = 0
|
||||
};
|
||||
|
||||
struct boss_janalai : public BossAI
|
||||
{
|
||||
boss_janalai(Creature* creature) : BossAI(creature, DATA_JANALAIEVENT) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
instance->SetData(DATA_JANALAIEVENT, NOT_STARTED);
|
||||
HatchAllEggs(HATCH_RESET);
|
||||
_isBombing = false;
|
||||
_isFlameBreathing = false;
|
||||
|
||||
ScheduleHealthCheckEvent(25, [&]{
|
||||
DoCastSelf(SPELL_ENRAGE, true);
|
||||
});
|
||||
|
||||
ScheduleHealthCheckEvent(35, [&]{
|
||||
Talk(SAY_ALL_EGGS);
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->SetPosition(janalainPos);
|
||||
me->StopMovingOnCurrentPos();
|
||||
DoCastSelf(SPELL_HATCH_ALL);
|
||||
HatchAllEggs(HATCH_ALL);
|
||||
});
|
||||
}
|
||||
|
||||
struct boss_janalaiAI : public ScriptedAI
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
boss_janalaiAI(Creature* creature) : ScriptedAI(creature)
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetData(DATA_JANALAIEVENT, DONE);
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damagetype*/) override
|
||||
{
|
||||
if (_isFlameBreathing)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
if (!me->HasInArc(M_PI / 6, target))
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 FireBreathTimer;
|
||||
uint32 BombTimer;
|
||||
uint32 BombSequenceTimer;
|
||||
uint32 BombCount;
|
||||
uint32 HatcherTimer;
|
||||
uint32 EnrageTimer;
|
||||
|
||||
bool noeggs;
|
||||
bool enraged;
|
||||
bool isBombing;
|
||||
|
||||
bool isFlameBreathing;
|
||||
|
||||
ObjectGuid FireBombGUIDs[40];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
instance->SetData(DATA_JANALAIEVENT, NOT_STARTED);
|
||||
|
||||
FireBreathTimer = 8000;
|
||||
BombTimer = 30000;
|
||||
BombSequenceTimer = 1000;
|
||||
BombCount = 0;
|
||||
HatcherTimer = 10000;
|
||||
EnrageTimer = MINUTE * 5 * IN_MILLISECONDS;
|
||||
|
||||
noeggs = false;
|
||||
isBombing = false;
|
||||
enraged = false;
|
||||
|
||||
isFlameBreathing = false;
|
||||
|
||||
for (uint8 i = 0; i < 40; ++i)
|
||||
FireBombGUIDs[i].Clear();
|
||||
|
||||
HatchAllEggs(1);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetData(DATA_JANALAIEVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
// DoZoneInCombat();
|
||||
}
|
||||
|
||||
void DamageDealt(Unit* target, uint32& damage, DamageEffectType /*damagetype*/) override
|
||||
{
|
||||
if (isFlameBreathing)
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS);
|
||||
Talk(SAY_AGGRO);
|
||||
//schedule abilities
|
||||
ScheduleTimedEvent(30s, [&]{
|
||||
StartBombing();
|
||||
}, 20s, 40s);
|
||||
ScheduleTimedEvent(10s, [&]{
|
||||
if (HatchAllEggs(HATCH_RESET))
|
||||
{
|
||||
if (!me->HasInArc(M_PI / 6, target))
|
||||
damage = 0;
|
||||
Talk(SAY_SUMMON_HATCHER);
|
||||
me->SummonCreature(NPC_AMANI_HATCHER, hatcherway[0][0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_AMANI_HATCHER, hatcherway[1][0], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
void FireWall()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
}, 90s);
|
||||
ScheduleTimedEvent(8s, [&]{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
uint8 WallNum = i == 0 || i == 2 ? 3 : 2;
|
||||
|
||||
for (uint8 j = 0; j < WallNum; j++)
|
||||
{
|
||||
Creature* wall = WallNum == 3
|
||||
? me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0], FireWallCoords[i][1] + 5 * (j - 1), FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000)
|
||||
: me->SummonCreature(NPC_FIRE_BOMB, FireWallCoords[i][0] - 2 + 4 * j, FireWallCoords[i][1], FireWallCoords[i][2], FireWallCoords[i][3], TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
|
||||
if (wall)
|
||||
{
|
||||
wall->CastSpell(wall, SPELL_FIRE_WALL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnBombs()
|
||||
{
|
||||
float dx, dy;
|
||||
for (int i(0); i < 40; ++i)
|
||||
{
|
||||
dx = float(irand(-area_dx / 2, area_dx / 2));
|
||||
dy = float(irand(-area_dy / 2, area_dy / 2));
|
||||
|
||||
Creature* bomb = DoSpawnCreature(NPC_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
if (bomb)
|
||||
FireBombGUIDs[i] = bomb->GetGUID();
|
||||
}
|
||||
BombCount = 0;
|
||||
}
|
||||
|
||||
bool HatchAllEggs(uint32 action) //1: reset, 2: isHatching all
|
||||
{
|
||||
std::list<Creature*> templist;
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
Acore::AllCreaturesOfEntryInRange check(me, NPC_EGG, 100);
|
||||
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange());
|
||||
|
||||
//LOG_ERROR("scripts", "Eggs {} at middle", templist.size());
|
||||
if (templist.empty())
|
||||
return false;
|
||||
|
||||
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
|
||||
{
|
||||
if (action == 1)
|
||||
(*i)->SetDisplayId(10056);
|
||||
else if (action == 2 && (*i)->GetDisplayId() != 11686)
|
||||
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Boom()
|
||||
{
|
||||
std::list<Creature*> templist;
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
Acore::AllCreaturesOfEntryInRange check(me, NPC_FIRE_BOMB, 100);
|
||||
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange());
|
||||
|
||||
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end(); ++i)
|
||||
{
|
||||
(*i)->CastSpell(*i, SPELL_FIRE_BOMB_DAMAGE, true);
|
||||
(*i)->RemoveAllAuras();
|
||||
}
|
||||
}
|
||||
|
||||
void HandleBombSequence()
|
||||
{
|
||||
if (BombCount < 40)
|
||||
{
|
||||
if (Unit* FireBomb = ObjectAccessor::GetUnit(*me, FireBombGUIDs[BombCount]))
|
||||
{
|
||||
FireBomb->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(FireBomb, SPELL_FIRE_BOMB_THROW, true);
|
||||
FireBomb->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
++BombCount;
|
||||
if (BombCount == 40)
|
||||
{
|
||||
BombSequenceTimer = 5000;
|
||||
}
|
||||
else BombSequenceTimer = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
Boom();
|
||||
isBombing = false;
|
||||
BombTimer = urand(20000, 40000);
|
||||
me->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_CHANNEL);
|
||||
if (EnrageTimer <= 10000)
|
||||
EnrageTimer = 0;
|
||||
else
|
||||
EnrageTimer -= 10000;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (isFlameBreathing)
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCast(false))
|
||||
isFlameBreathing = false;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
if (isBombing)
|
||||
{
|
||||
if (BombSequenceTimer <= diff)
|
||||
HandleBombSequence();
|
||||
else
|
||||
BombSequenceTimer -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//enrage if under 25% hp before 5 min.
|
||||
if (!enraged && HealthBelowPct(25))
|
||||
EnrageTimer = 0;
|
||||
|
||||
if (EnrageTimer <= diff)
|
||||
{
|
||||
if (!enraged)
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE, true);
|
||||
enraged = true;
|
||||
EnrageTimer = 300000;
|
||||
}
|
||||
else
|
||||
{
|
||||
Talk(SAY_BERSERK);
|
||||
DoCast(me, SPELL_BERSERK, true);
|
||||
EnrageTimer = 300000;
|
||||
}
|
||||
}
|
||||
else EnrageTimer -= diff;
|
||||
|
||||
if (BombTimer <= diff)
|
||||
{
|
||||
Talk(SAY_FIRE_BOMBS);
|
||||
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->NearTeleportTo(JanalainPos[0][0], JanalainPos[0][1], JanalainPos[0][2], me->GetOrientation());
|
||||
me->StopMovingOnCurrentPos();
|
||||
DoCast(me, SPELL_FIRE_BOMB_CHANNEL, false);
|
||||
//DoTeleportPlayer(me, JanalainPos[0][0], JanalainPos[0][1], JanalainPos[0][2], 0);
|
||||
//DoCast(me, SPELL_TELE_TO_CENTER, true);
|
||||
|
||||
FireWall();
|
||||
SpawnBombs();
|
||||
isBombing = true;
|
||||
BombSequenceTimer = 100;
|
||||
|
||||
//Teleport every Player into the middle
|
||||
Map* map = me->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
return;
|
||||
|
||||
Map::PlayerList const& PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->GetSource())
|
||||
if (i_pl->IsAlive())
|
||||
DoTeleportPlayer(i_pl, JanalainPos[0][0] - 5 + rand() % 10, JanalainPos[0][1] - 5 + rand() % 10, JanalainPos[0][2], 0);
|
||||
//DoCast(Temp, SPELL_SUMMON_PLAYERS, true) // core bug, spell does not work if too far
|
||||
return;
|
||||
}
|
||||
else BombTimer -= diff;
|
||||
|
||||
if (!noeggs)
|
||||
{
|
||||
if (HealthBelowPct(35))
|
||||
DoCast(target, SPELL_FLAME_BREATH);
|
||||
me->StopMoving();
|
||||
_isFlameBreathing = true;
|
||||
// placeholder time idk yet
|
||||
scheduler.Schedule(2s, [this](TaskContext)
|
||||
{
|
||||
Talk(SAY_ALL_EGGS);
|
||||
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->NearTeleportTo(JanalainPos[0][0], JanalainPos[0][1], JanalainPos[0][2], me->GetOrientation());
|
||||
me->StopMovingOnCurrentPos();
|
||||
DoCast(me, SPELL_HATCH_ALL, false);
|
||||
HatchAllEggs(2);
|
||||
noeggs = true;
|
||||
}
|
||||
else if (HatcherTimer <= diff)
|
||||
{
|
||||
if (HatchAllEggs(0))
|
||||
{
|
||||
Talk(SAY_SUMMON_HATCHER);
|
||||
me->SummonCreature(NPC_AMANI_HATCHER, hatcherway[0][0][0], hatcherway[0][0][1], hatcherway[0][0][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
me->SummonCreature(NPC_AMANI_HATCHER, hatcherway[1][0][0], hatcherway[1][0][1], hatcherway[1][0][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
|
||||
HatcherTimer = 90000;
|
||||
}
|
||||
else
|
||||
noeggs = true;
|
||||
}
|
||||
else HatcherTimer -= diff;
|
||||
_isFlameBreathing = false;
|
||||
});
|
||||
}
|
||||
}, 8s);
|
||||
ScheduleUniqueTimedEvent(5min, [&]{
|
||||
Talk(SAY_BERSERK);
|
||||
DoCastSelf(SPELL_BERSERK);
|
||||
}, EVENT_BERSERK);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
if (FireBreathTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
DoCast(target, SPELL_FLAME_BREATH, false);
|
||||
me->StopMoving();
|
||||
isFlameBreathing = true;
|
||||
}
|
||||
FireBreathTimer = 8000;
|
||||
}
|
||||
else FireBreathTimer -= diff;
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const override
|
||||
{
|
||||
return me->GetPositionZ() <= 12.0f;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
bool HatchAllEggs(uint32 hatchAction)
|
||||
{
|
||||
return GetZulAmanAI<boss_janalaiAI>(creature);
|
||||
std::list<Creature* > eggList;
|
||||
me->GetCreaturesWithEntryInRange(eggList, 100.0f, NPC_EGG);
|
||||
if (eggList.empty())
|
||||
return false;
|
||||
|
||||
if (hatchAction == HATCH_RESET)
|
||||
for (Creature* egg : eggList)
|
||||
egg->Respawn();
|
||||
else if (hatchAction == HATCH_ALL)
|
||||
DoCastSelf(SPELL_HATCH_EGG_ALL);
|
||||
|
||||
if (hatchAction == HATCH_RESET)
|
||||
{
|
||||
std::list<Creature* > hatchlingList;
|
||||
me->GetCreaturesWithEntryInRange(hatchlingList, 100.0f, NPC_HATCHLING);
|
||||
for (Creature* hatchling : hatchlingList)
|
||||
hatchling->DespawnOrUnsummon();
|
||||
hatchlingList.clear();
|
||||
}
|
||||
eggList.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
void FireWall()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
uint8 wallNum = i == 0 || i == 2 ? 3 : 2;
|
||||
|
||||
for (uint8 j = 0; j < wallNum; j++)
|
||||
{
|
||||
Creature* wall = wallNum == 3
|
||||
? me->SummonCreature(NPC_FIRE_BOMB, fireWallCoords[i].GetPositionX(), fireWallCoords[i].GetPositionY() + 5 * (j - 1), fireWallCoords[i].GetPositionZ(), fireWallCoords[i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 15000)
|
||||
: me->SummonCreature(NPC_FIRE_BOMB, fireWallCoords[i].GetPositionX() - 2 + 4 * j, fireWallCoords[i].GetPositionY(), fireWallCoords[i].GetPositionZ(), fireWallCoords[i].GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
|
||||
if (wall)
|
||||
{
|
||||
wall->AI()->DoCastSelf(SPELL_FIRE_WALL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnBombs()
|
||||
{
|
||||
float dx, dy;
|
||||
for (int i = 0; i < MAX_BOMB_COUNT; ++i)
|
||||
{
|
||||
dx = float(irand(-area_dx / 2, area_dx / 2));
|
||||
dy = float(irand(-area_dy / 2, area_dy / 2));
|
||||
DoSpawnCreature(NPC_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
}
|
||||
}
|
||||
|
||||
void Boom()
|
||||
{
|
||||
std::list<Creature*> fireBombs;
|
||||
me->GetCreaturesWithEntryInRange(fireBombs, 100.0f, NPC_FIRE_BOMB);
|
||||
|
||||
if (fireBombs.empty())
|
||||
return;
|
||||
|
||||
for (Creature* bomb : fireBombs)
|
||||
{
|
||||
bomb->AI()->DoCastSelf(SPELL_FIRE_BOMB_DAMAGE, true);
|
||||
bomb->RemoveAllAuras();
|
||||
}
|
||||
fireBombs.clear();
|
||||
}
|
||||
|
||||
void StartBombing()
|
||||
{
|
||||
Talk(SAY_FIRE_BOMBS);
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->SetPosition(janalainPos);
|
||||
me->StopMovingOnCurrentPos();
|
||||
DoCastSelf(SPELL_FIRE_BOMB_CHANNEL);
|
||||
|
||||
FireWall();
|
||||
SpawnBombs();
|
||||
_isBombing = true;
|
||||
|
||||
if (Map* map = me->GetMap())
|
||||
{
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->IsAlive())
|
||||
DoTeleportPlayer(player, janalainPos.GetPositionX() - 5 + rand() % 10, janalainPos.GetPositionY() - 5 + rand() % 10, janalainPos.GetPositionZ(), 0.0f);
|
||||
});
|
||||
}
|
||||
//DoCast(Temp, SPELL_SUMMON_PLAYERS, true) // core bug, spell does not work if too far
|
||||
ThrowBombs();
|
||||
|
||||
scheduler.Schedule(11s, [this](TaskContext)
|
||||
{
|
||||
Boom();
|
||||
_isBombing = false;
|
||||
|
||||
me->RemoveAurasDueToSpell(SPELL_FIRE_BOMB_CHANNEL);
|
||||
});
|
||||
}
|
||||
|
||||
void ThrowBombs()
|
||||
{
|
||||
std::list<Creature*> fireBombs;
|
||||
std::chrono::milliseconds bombTimer = 100ms;
|
||||
me->GetCreaturesWithEntryInRange(fireBombs, 100.0f, NPC_FIRE_BOMB);
|
||||
for (Creature* bomb : fireBombs)
|
||||
{
|
||||
scheduler.Schedule(bombTimer, [this, bomb](TaskContext)
|
||||
{
|
||||
bomb->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(bomb, SPELL_FIRE_BOMB_THROW, true);
|
||||
bomb->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
});
|
||||
bombTimer = bombTimer + 100ms;
|
||||
}
|
||||
fireBombs.clear();
|
||||
}
|
||||
|
||||
bool CheckEvadeIfOutOfCombatArea() const override
|
||||
{
|
||||
return me->GetPositionZ() <= 12.0f;
|
||||
}
|
||||
private:
|
||||
bool _isBombing;
|
||||
bool _isFlameBreathing;
|
||||
};
|
||||
|
||||
struct npc_janalai_firebomb : public NullCreatureAI
|
||||
{
|
||||
npc_janalai_firebomb(Creature* creature) : NullCreatureAI(creature) { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_FIRE_BOMB_THROW)
|
||||
DoCastSelf(SPELL_FIRE_BOMB_DUMMY, true);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_janalai_firebomb : public CreatureScript
|
||||
struct npc_janalai_hatcher : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_janalai_firebomb()
|
||||
: CreatureScript("npc_janalai_firebomb")
|
||||
npc_janalai_hatcher(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
struct npc_janalai_firebombAI : public ScriptedAI
|
||||
void Reset() override
|
||||
{
|
||||
npc_janalai_firebombAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
ScriptedAI::Reset();
|
||||
scheduler.CancelAll();
|
||||
_side = (me->GetPositionY() < 1150);
|
||||
_waypoint = 0;
|
||||
_isHatching = false;
|
||||
_hasChangedSide = false;
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[_side][0]);
|
||||
}
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
void MovementInform(uint32, uint32) override
|
||||
{
|
||||
if (_waypoint == 5)
|
||||
{
|
||||
if (spell->Id == SPELL_FIRE_BOMB_THROW)
|
||||
DoCast(me, SPELL_FIRE_BOMB_DUMMY, true);
|
||||
_isHatching = true;
|
||||
std::list<Creature* > eggList;
|
||||
me->GetCreaturesWithEntryInRange(eggList, 50.0f, NPC_EGG);
|
||||
scheduler.Schedule(1500ms, SCHEDULER_GROUP_HATCHING, [this, eggList](TaskContext context)
|
||||
{
|
||||
std::list<Creature* > unhatchedEggs;
|
||||
for (Creature* egg : eggList)
|
||||
{
|
||||
if (egg->IsAlive())
|
||||
unhatchedEggs.emplace_front(egg);
|
||||
}
|
||||
Acore::Containers::RandomResize(unhatchedEggs, 1);
|
||||
if (Creature* egg = unhatchedEggs.front())
|
||||
egg->AI()->DoCastSelf(SPELL_HATCH_EGG_SINGULAR);
|
||||
else if (!_hasChangedSide)
|
||||
{
|
||||
_side = _side ? 0 : 1;
|
||||
_isHatching = false;
|
||||
_waypoint = 3;
|
||||
MoveToNewWaypoint(_waypoint);
|
||||
_hasChangedSide = true;
|
||||
context.CancelGroup(SCHEDULER_GROUP_HATCHING);
|
||||
}
|
||||
context.Repeat(1500ms);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
MoveToNewWaypoint(_waypoint);
|
||||
++_waypoint;
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulAmanAI<npc_janalai_firebombAI>(creature);
|
||||
}
|
||||
|
||||
void MoveToNewWaypoint(uint8 waypoint)
|
||||
{
|
||||
if (!_isHatching)
|
||||
{
|
||||
scheduler.Schedule(100ms, [this, waypoint](TaskContext)
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[_side][waypoint]);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint8 _side;
|
||||
uint8 _waypoint;
|
||||
bool _isHatching;
|
||||
bool _hasChangedSide;
|
||||
};
|
||||
|
||||
class npc_janalai_hatcher : public CreatureScript
|
||||
struct npc_janalai_hatchling : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
npc_janalai_hatcher()
|
||||
: CreatureScript("npc_janalai_hatcher")
|
||||
npc_janalai_hatchling(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
struct npc_janalai_hatcherAI : public ScriptedAI
|
||||
void Reset() override
|
||||
{
|
||||
npc_janalai_hatcherAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
scheduler.CancelAll();
|
||||
if (me->GetPositionY() > 1150)
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[0][3].GetPositionX() + rand() % 4 - 2, 1150.0f + rand() % 4 - 2, hatcherway[0][3].GetPositionY());
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[1][3].GetPositionX() + rand() % 4 - 2, 1150.0f + rand() % 4 - 2, hatcherway[1][3].GetPositionY());
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 waypoint;
|
||||
uint32 HatchNum;
|
||||
uint32 WaitTimer;
|
||||
|
||||
bool side;
|
||||
bool hasChangedSide;
|
||||
bool isHatching;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetWalk(true);
|
||||
side = (me->GetPositionY() < 1150);
|
||||
waypoint = 0;
|
||||
isHatching = false;
|
||||
hasChangedSide = false;
|
||||
WaitTimer = 1;
|
||||
HatchNum = 0;
|
||||
}
|
||||
|
||||
bool HatchEggs(uint32 num)
|
||||
{
|
||||
std::list<Creature*> templist;
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
|
||||
Acore::AllCreaturesOfEntryInRange check(me, 23817, 50);
|
||||
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
|
||||
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange());
|
||||
|
||||
//LOG_ERROR("scripts", "Eggs {} at {}", templist.size(), side);
|
||||
|
||||
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
|
||||
if ((*i)->GetDisplayId() != 11686)
|
||||
{
|
||||
(*i)->CastSpell(*i, SPELL_HATCH_EGG, false);
|
||||
num--;
|
||||
}
|
||||
|
||||
return num == 0; // if num == 0, no more templist
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
void AttackStart(Unit* /*who*/) override { }
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
void MovementInform(uint32, uint32) override
|
||||
{
|
||||
if (waypoint == 5)
|
||||
{
|
||||
isHatching = true;
|
||||
HatchNum = 1;
|
||||
WaitTimer = 5000;
|
||||
}
|
||||
else
|
||||
WaitTimer = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!instance || instance->GetData(DATA_JANALAIEVENT) != IN_PROGRESS)
|
||||
{
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isHatching)
|
||||
{
|
||||
if (WaitTimer)
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[side][waypoint][0], hatcherway[side][waypoint][1], hatcherway[side][waypoint][2]);
|
||||
++waypoint;
|
||||
WaitTimer = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (WaitTimer <= diff)
|
||||
{
|
||||
if (HatchEggs(HatchNum))
|
||||
{
|
||||
++HatchNum;
|
||||
WaitTimer = 10000;
|
||||
}
|
||||
else if (!hasChangedSide)
|
||||
{
|
||||
side = side ? 0 : 1;
|
||||
isHatching = false;
|
||||
waypoint = 3;
|
||||
WaitTimer = 1;
|
||||
hasChangedSide = true;
|
||||
}
|
||||
else
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
else WaitTimer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulAmanAI<npc_janalai_hatcherAI>(creature);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetInCombatWithZone();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
ScriptedAI::JustEngagedWith(who);
|
||||
ScheduleTimedEvent(7s, [&]{
|
||||
DoCastVictim(SPELL_FLAMEBUFFET);
|
||||
}, 10s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
scheduler.Update(diff);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
class npc_janalai_hatchling : public CreatureScript
|
||||
struct npc_janalai_egg : public NullCreatureAI
|
||||
{
|
||||
public:
|
||||
npc_janalai_hatchling()
|
||||
: CreatureScript("npc_janalai_hatchling")
|
||||
npc_janalai_egg(Creature* creature) : NullCreatureAI(creature) { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_HATCH_EGG_ALL || spell->Id == SPELL_HATCH_EGG_SINGULAR)
|
||||
DoCastSelf(SPELL_SUMMON_HATCHLING);
|
||||
}
|
||||
|
||||
struct npc_janalai_hatchlingAI : public ScriptedAI
|
||||
{
|
||||
npc_janalai_hatchlingAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint32 BuffetTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
BuffetTimer = 7000;
|
||||
if (me->GetPositionY() > 1150)
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[0][3][0] + rand() % 4 - 2, 1150.0f + rand() % 4 - 2, hatcherway[0][3][2]);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(0, hatcherway[1][3][0] + rand() % 4 - 2, 1150.0f + rand() % 4 - 2, hatcherway[1][3][2]);
|
||||
|
||||
me->SetDisableGravity(true);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override {/*DoZoneInCombat();*/ }
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!instance || instance->GetData(DATA_JANALAIEVENT) != IN_PROGRESS)
|
||||
{
|
||||
me->DisappearAndDie();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (BuffetTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FLAMEBUFFET, false);
|
||||
BuffetTimer = 10000;
|
||||
}
|
||||
else BuffetTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulAmanAI<npc_janalai_hatchlingAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_janalai_egg : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_janalai_egg(): CreatureScript("npc_janalai_egg") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetZulAmanAI<npc_janalai_eggAI>(creature);
|
||||
}
|
||||
|
||||
struct npc_janalai_eggAI : public ScriptedAI
|
||||
{
|
||||
npc_janalai_eggAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_HATCH_EGG)
|
||||
{
|
||||
DoCast(SPELL_SUMMON_HATCHLING);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_boss_janalai()
|
||||
{
|
||||
new boss_janalai();
|
||||
new npc_janalai_firebomb();
|
||||
new npc_janalai_hatcher();
|
||||
new npc_janalai_hatchling();
|
||||
new npc_janalai_egg();
|
||||
RegisterZulAmanCreatureAI(boss_janalai);
|
||||
RegisterZulAmanCreatureAI(npc_janalai_firebomb);
|
||||
RegisterZulAmanCreatureAI(npc_janalai_hatcher);
|
||||
RegisterZulAmanCreatureAI(npc_janalai_hatchling);
|
||||
RegisterZulAmanCreatureAI(npc_janalai_egg);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
@@ -39,6 +39,7 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
/*####
|
||||
# quest_a_pawn_on_the_eternal_board (Defines)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "azjol_nerub.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Spells
|
||||
|
||||
+1
@@ -22,6 +22,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Vehicle.h"
|
||||
#include "trial_of_the_champion.h"
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "drak_tharon_keep.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Yells
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum ScriptTexts
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum ScriptTexts
|
||||
{
|
||||
|
||||
@@ -3024,14 +3024,16 @@ struct npc_icc_spire_frostwyrm : public ScriptedAI
|
||||
bool _canResetFlyingEffects;
|
||||
};
|
||||
|
||||
#define VENGEFUL_WP_COUNT 6
|
||||
#define VENGEFUL_WP_COUNT 8
|
||||
const Position VengefulWP[VENGEFUL_WP_COUNT] =
|
||||
{
|
||||
{4432.21f, 3041.5f, 372.783f, 0.0f},
|
||||
{4408.67f, 3041.81f, 372.48f, 0.0f},
|
||||
{4370.50f, 3042.00f, 372.80f, 0.0f},
|
||||
{4370.37f, 3059.16f, 371.69f, 0.0f},
|
||||
{4342.53f, 3058.97f, 371.68f, 0.0f},
|
||||
{4342.51f, 3041.24f, 372.80f, 0.0f},
|
||||
{4304.75f, 3041.57f, 372.43f, 0.0f},
|
||||
{4281.30f, 3041.77f, 372.78f, 0.0f},
|
||||
};
|
||||
|
||||
@@ -3065,6 +3067,8 @@ public:
|
||||
me->SetWalk(false);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(1, 3s, 6s); // leaping face maul
|
||||
if (currPipeWP != VENGEFUL_WP_COUNT)
|
||||
needMove = true;
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
@@ -3132,7 +3136,7 @@ public:
|
||||
--currPipeWP;
|
||||
}
|
||||
me->SetHomePosition(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), me->GetOrientation());
|
||||
if ((forward && currPipeWP == 3) || (!forward && currPipeWP == 2))
|
||||
if ((forward && currPipeWP == 4) || (!forward && currPipeWP == 3))
|
||||
me->GetMotionMaster()->MoveJump(VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ(), 10.0f, 6.0f, 1);
|
||||
else
|
||||
me->GetMotionMaster()->MovePoint(1, VengefulWP[currPipeWP].GetPositionX(), VengefulWP[currPipeWP].GetPositionY(), VengefulWP[currPipeWP].GetPositionZ());
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ScriptedGossip.h"
|
||||
#include "Spell.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
#define GOSSIP_SENDER_ICC_PORT 631
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "sethekk_halls.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum Text
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ struct boss_illidan_stormrage : public BossAI
|
||||
_canTalk = true;
|
||||
_dying = false;
|
||||
_inCutscene = false;
|
||||
beamPosId = 0;
|
||||
beamPosId = urand(0, MAX_EYE_BEAM_POS);
|
||||
me->ReplaceAllUnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
@@ -216,6 +216,7 @@ struct boss_illidan_stormrage : public BossAI
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
me->SetSheath(SHEATH_STATE_UNARMED);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->SetCombatMovement(true);
|
||||
|
||||
ScheduleHealthCheckEvent(90, [&] {
|
||||
// Call for minions
|
||||
@@ -233,6 +234,7 @@ struct boss_illidan_stormrage : public BossAI
|
||||
scheduler.CancelAll();
|
||||
if (me->HasAura(SPELL_DEMON_FORM))
|
||||
DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM_BACK);
|
||||
me->m_Events.CancelEventGroup(GROUP_DEMON_FORM);
|
||||
DoAction(ACTION_SHADOW_PRISON);
|
||||
});
|
||||
}
|
||||
@@ -339,14 +341,13 @@ struct boss_illidan_stormrage : public BossAI
|
||||
DoResetThreatList();
|
||||
DoCastSelf(SPELL_DEMON_TRANSFORM_1, true);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
Talk(SAY_ILLIDAN_MORPH);
|
||||
}, 2630ms);
|
||||
Talk(SAY_ILLIDAN_MORPH, 2630ms);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
// me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
ScheduleAbilities(PHASE_DEMON);
|
||||
}, 12230ms);
|
||||
}, 12230ms, GROUP_DEMON_FORM);
|
||||
}
|
||||
break;
|
||||
case ACTION_ILLIDAN_DEMON_TRANSFORM_BACK:
|
||||
@@ -513,14 +514,17 @@ struct boss_illidan_stormrage : public BossAI
|
||||
scheduler.CancelAll();
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
beamPosId = (beamPosId + 1) % MAX_EYE_BEAM_POS;
|
||||
CycleBeamPos(beamPosId);
|
||||
me->GetMotionMaster()->MovePoint(POINT_ILLIDAN_HOVER, airHoverPos[beamPosId], false, true);
|
||||
}, 20s, GROUP_PHASE_FLYING);
|
||||
});
|
||||
// Check for Phase Transition
|
||||
scheduler.Schedule(5s, [this](TaskContext context) {
|
||||
if (!SelectTargetFromPlayerList(150.0f))
|
||||
{
|
||||
EnterEvadeMode(EVADE_REASON_NO_HOSTILES);
|
||||
return;
|
||||
}
|
||||
|
||||
summons.RemoveNotExisting();
|
||||
if (!summons.HasEntry(NPC_FLAME_OF_AZZINOTH))
|
||||
@@ -557,14 +561,18 @@ struct boss_illidan_stormrage : public BossAI
|
||||
}, 24s);
|
||||
|
||||
ScheduleTimedEvent(60s, [&] {
|
||||
DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM);
|
||||
if (!_inCutscene)
|
||||
DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM);
|
||||
}, 60s);
|
||||
}
|
||||
break;
|
||||
case PHASE_DEMON:
|
||||
{
|
||||
scheduler.CancelAll();
|
||||
DoCastSelf(SPELL_SUMMON_SHADOW_DEMON, true);
|
||||
|
||||
ScheduleTimedEvent(30s, [&] {
|
||||
DoCastSelf(SPELL_SUMMON_SHADOW_DEMON, true);
|
||||
}, 100s);
|
||||
|
||||
ScheduleTimedEvent(1s, 2500ms, [&] {
|
||||
DoCastVictim(SPELL_SHADOW_BLAST);
|
||||
@@ -574,7 +582,7 @@ struct boss_illidan_stormrage : public BossAI
|
||||
DoCastSelf(SPELL_FLAME_BURST);
|
||||
}, 19500ms);
|
||||
|
||||
ScheduleTimedEvent(60s, [&] {
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM_BACK);
|
||||
if (summons.GetCreatureWithEntry(NPC_MAIEV_SHADOWSONG))
|
||||
ScheduleAbilities(PHASE_MAIEV);
|
||||
@@ -685,6 +693,15 @@ private:
|
||||
bool _dying;
|
||||
bool _inCutscene;
|
||||
uint8 beamPosId;
|
||||
|
||||
void CycleBeamPos(uint8 &beamPosId)
|
||||
{
|
||||
uint8 _incumbentBeamPos = urand(0, MAX_EYE_BEAM_POS);
|
||||
if (_incumbentBeamPos == beamPosId)
|
||||
CycleBeamPos(beamPosId);
|
||||
else
|
||||
beamPosId = _incumbentBeamPos;
|
||||
}
|
||||
};
|
||||
|
||||
enum Akama
|
||||
@@ -1514,6 +1531,27 @@ class spell_illidan_shadow_prison : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_illidan_shadow_prison_aura : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_illidan_shadow_prison_aura);
|
||||
|
||||
void HandleOnEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->ApplySpellImmune(GetId(), IMMUNITY_SCHOOL, aurEff->GetMiscValue(), true);
|
||||
}
|
||||
|
||||
void HandleOnEffectRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->ApplySpellImmune(GetId(), IMMUNITY_SCHOOL, aurEff->GetMiscValue(), false);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_illidan_shadow_prison_aura::HandleOnEffectApply, EFFECT_1, SPELL_AURA_DAMAGE_IMMUNITY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_illidan_shadow_prison_aura::HandleOnEffectRemove, EFFECT_1, SPELL_AURA_DAMAGE_IMMUNITY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_illidan_demon_transform1_aura : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_illidan_demon_transform1_aura);
|
||||
@@ -1704,7 +1742,7 @@ void AddSC_boss_illidan()
|
||||
RegisterSpellAndAuraScriptPair(spell_illidan_parasitic_shadowfiend_trigger, spell_illidan_parasitic_shadowfiend_trigger_aura);
|
||||
RegisterSpellScript(spell_illidan_glaive_throw);
|
||||
RegisterSpellScript(spell_illidan_tear_of_azzinoth_summon_channel_aura);
|
||||
RegisterSpellScript(spell_illidan_shadow_prison);
|
||||
RegisterSpellAndAuraScriptPair(spell_illidan_shadow_prison, spell_illidan_shadow_prison_aura);
|
||||
RegisterSpellScript(spell_illidan_demon_transform1_aura);
|
||||
RegisterSpellScript(spell_illidan_demon_transform2_aura);
|
||||
RegisterSpellScript(spell_illidan_flame_burst);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "black_temple.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum Says
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "gruuls_lair.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum HighKingMaulgar
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "blood_furnace.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum MageSpells
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SkillDiscovery.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
/*#####
|
||||
# item_only_for_flight
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "CreatureScript.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
class trigger_periodic : public CreatureScript
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
/* ScriptData
|
||||
SDName: Npc_Professions
|
||||
SD%Complete: 80
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef __ASYNCACCEPT_H_
|
||||
#define __ASYNCACCEPT_H_
|
||||
|
||||
#include "IoContext.h"
|
||||
#include "IpAddress.h"
|
||||
#include "Log.h"
|
||||
#include <atomic>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user