mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Scripts/TotFW: initial work on Conclave of the Wind basic abilites
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
20:25:39.343 -- jet stream cast
|
||||
20:25:41.376 -- wind pre effect warning
|
||||
|
||||
20:25:43.394
|
||||
20:25:43.394 --
|
||||
20:25:43.493 -- you think you outrun the wind???
|
||||
20:26:44.509 -- teleport to center west
|
||||
|
||||
@@ -53,6 +53,12 @@ UPDATE `creature_template` SET `unit_flags`= 33555200, `flags_extra`= 128, `Scri
|
||||
UPDATE `creature_template` SET `unit_flags`= 33554432, `flags_extra`= 128 WHERE `entry`= 46246;
|
||||
-- North Wind
|
||||
UPDATE `creature_template` SET `unit_flags`= 33554432, `flags_extra`= 128 WHERE `entry`= 47926;
|
||||
-- Ravenous Creeper
|
||||
UPDATE `creature_template` SET `ScriptName`= 'npc_conclave_of_wind_ravenous_creeper' WHERE `entry`= 45812;
|
||||
-- Tornado
|
||||
UPDATE `creature_template` SET `unit_flags`= 33554432, `flags_extra`= 128 WHERE `entry`= 46207;
|
||||
-- World Trigger World Trigger (Not Immune NPC)
|
||||
UPDATE `creature_template` SET `speed_walk`= 1, `speed_run`= 1 WHERE `entry`= 19871;
|
||||
|
||||
-- Creature Text
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` IN (21252, 45870, 45871, 45872);
|
||||
@@ -91,21 +97,37 @@ UPDATE `creature_model_info` SET `BoundingRadius`= 6.987639, `CombatReach`= 12.5
|
||||
UPDATE `creature_model_info` SET `BoundingRadius`= 6.987639 WHERE `DisplayID`= 35232;
|
||||
|
||||
-- Template Addon
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN (46246);
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN (46246, 46207);
|
||||
INSERT INTO `creature_template_addon` (`entry`, `auras`) VALUES
|
||||
(46246, '86206 86207 86208');
|
||||
(46246, '86206 86207 86208'),
|
||||
(46207, '86134');
|
||||
|
||||
-- Spells
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN
|
||||
('spell_conclave_of_wind_winds_pre_effect_warning',
|
||||
'spell_conclave_of_wind_winds_distance_checker',
|
||||
'spell_conclave_of_winds_teleport_to_center');
|
||||
'spell_conclave_of_wind_teleport_to_center',
|
||||
'spell_conclave_of_wind_winds',
|
||||
'spell_conclave_of_wind_wind_blast');
|
||||
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(96508, 'spell_conclave_of_wind_winds_pre_effect_warning'),
|
||||
(85763, 'spell_conclave_of_wind_winds_distance_checker'),
|
||||
(89843, 'spell_conclave_of_winds_teleport_to_center'),
|
||||
(89844, 'spell_conclave_of_winds_teleport_to_center');
|
||||
(89843, 'spell_conclave_of_wind_teleport_to_center'),
|
||||
(89844, 'spell_conclave_of_wind_teleport_to_center'),
|
||||
(85573, 'spell_conclave_of_wind_winds'),
|
||||
(85578, 'spell_conclave_of_wind_winds'),
|
||||
(85576, 'spell_conclave_of_wind_winds'),
|
||||
(93190, 'spell_conclave_of_wind_winds'),
|
||||
(93191, 'spell_conclave_of_wind_winds'),
|
||||
(93192, 'spell_conclave_of_wind_winds'),
|
||||
(93147, 'spell_conclave_of_wind_winds'),
|
||||
(93148, 'spell_conclave_of_wind_winds'),
|
||||
(93149, 'spell_conclave_of_wind_winds'),
|
||||
(93181, 'spell_conclave_of_wind_winds'),
|
||||
(93182, 'spell_conclave_of_wind_winds'),
|
||||
(93183, 'spell_conclave_of_wind_winds'),
|
||||
(86193, 'spell_conclave_of_wind_wind_blast'),
|
||||
(85480, 'spell_conclave_of_wind_wind_blast');
|
||||
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceEntry` IN (89844, 89843) AND `SourceTypeOrReferenceId`= 13;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES
|
||||
|
||||
@@ -4803,6 +4803,17 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->AttributesEx &= ~SPELL_ATTR1_CHANNELED_2;
|
||||
});
|
||||
|
||||
// Tornado
|
||||
ApplySpellFix({
|
||||
86189,
|
||||
86190,
|
||||
86191
|
||||
}, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
|
||||
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_15_YARDS);
|
||||
});
|
||||
|
||||
// ENDOF THRONE OF THE FOUR WINDS SPELLS
|
||||
|
||||
// Disenchant
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "throne_of_the_four_winds.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
@@ -30,11 +31,10 @@ enum Spells
|
||||
// Conclave of Wind
|
||||
SPELL_WINDS_PRE_EFFECT_WARNING = 96508,
|
||||
SPELL_POWER_DRAIN = 89840,
|
||||
SPELL_WIND_DISTANCE_CHECKER = 85763,
|
||||
|
||||
// Anshal
|
||||
SPELL_PRE_FIGHT_VISUAL_WEST = 85537,
|
||||
SPELL_WITHERING_WINDS_NORMAL = 85576,
|
||||
SPELL_WITHERING_WINDS_RESET_AURA = 89137,
|
||||
SPELL_WITHERING_WINDS_DAMAGE = 93168,
|
||||
SPELL_NURTURE = 85422,
|
||||
SPELL_SOOTHING_BREEZE = 86205,
|
||||
@@ -43,25 +43,39 @@ enum Spells
|
||||
|
||||
// Nezir
|
||||
SPELL_PRE_FIGHT_VISUAL_NORTH = 85532,
|
||||
SPELL_CHILLING_WINDS_NORMAL = 85578,
|
||||
SPELL_CHILLING_WINDS_DAMAGE = 93163,
|
||||
SPELL_TELEPORT_TO_CENTER_NORTH = 89843,
|
||||
|
||||
// Rohash
|
||||
SPELL_PRE_FIGHT_VISUAL_EAST = 85538,
|
||||
SPELL_DEAFENING_WINDS_NORMAL = 85573,
|
||||
SPELL_DEAFENING_WINDS_DAMAGE = 93166,
|
||||
SPELL_SLICING_GALE = 86182,
|
||||
SPELL_STORM_SHIELD = 93059,
|
||||
SPELL_SUMMON_TORNADOS = 86192,
|
||||
SPELL_WIND_BLAST = 86193,
|
||||
|
||||
// World Trigger
|
||||
SPELL_POWER_GAIN = 89898,
|
||||
|
||||
// West Wind
|
||||
SPELL_WITHERING_WINDS_RESET_AURA = 89137,
|
||||
|
||||
// North Wind
|
||||
SPELL_CHILLING_WINDS_RESET_AURA = 89135,
|
||||
|
||||
// East Wind
|
||||
SPELL_DEAFENING_WINDS_RESET_AURA = 89136,
|
||||
|
||||
// Ravenous Creeper Trigger
|
||||
SPELL_NURTURE_VISUAL = 85428,
|
||||
SPELL_NURTURE_SUMMON = 85429,
|
||||
|
||||
// Ravenous Creeper
|
||||
SPELL_TOXIC_SPORES = 86281,
|
||||
SPELL_AI_CLEAR_TARGET = 89020,
|
||||
|
||||
// World Trigger
|
||||
SPELL_WIND_BLAST_SPEED_BUFF = 93106,
|
||||
};
|
||||
|
||||
#define SPELL_DEAFENING_WINDS RAID_MODE<uint32>(85573, 93190, 93191, 93192)
|
||||
@@ -78,8 +92,20 @@ enum Events
|
||||
EVENT_SOOTHING_BREEZE,
|
||||
EVENT_NURTURE,
|
||||
|
||||
// Nezir
|
||||
|
||||
// Rohash
|
||||
EVENT_SLICING_GALE,
|
||||
EVENT_STORM_SHIELD,
|
||||
EVENT_SUMMON_TORNADOS,
|
||||
EVENT_WIND_BLAST,
|
||||
|
||||
// Ravenous Creeper Trigger
|
||||
EVENT_SUMMON_RAVENOUS_CREEPER,
|
||||
|
||||
// Ravenous Creeper
|
||||
EVENT_ATTACK_PLAYERS,
|
||||
EVENT_TOXIC_SPORES,
|
||||
};
|
||||
|
||||
enum Actions
|
||||
@@ -105,10 +131,19 @@ enum Texts
|
||||
SAY_ANNOUNCE_NEAR_FULL_STRENGHTH = 0
|
||||
};
|
||||
|
||||
enum SpellVisualKits
|
||||
{
|
||||
SPELL_VISUAL_STORM_SHIELD = 18812
|
||||
};
|
||||
|
||||
enum GuidData
|
||||
{
|
||||
DATA_WIND_BLAST_TRIGGER = 0
|
||||
};
|
||||
|
||||
#define MAX_HOME_POSITION_DISTANCE 65.0f
|
||||
|
||||
// A collection of helpers that all bosses can access
|
||||
// A collection of helpers that all creatures related to the encounter can access
|
||||
namespace ConclaveHandler
|
||||
{
|
||||
bool IsTargetOnPlatform(Position attackerPosition, Unit* target)
|
||||
@@ -121,6 +156,9 @@ namespace ConclaveHandler
|
||||
}
|
||||
}
|
||||
|
||||
Position const WesternPlatformCenterPosition = { -48.081f, 1053.930f, 199.572f };
|
||||
Position const WindBlastTriggerPosition = { -111.3979f, 594.4973f, 206.2773f };
|
||||
|
||||
struct boss_anshal : public BossAI
|
||||
{
|
||||
boss_anshal(Creature* creature) : BossAI(creature, DATA_CONCLAVE_OF_WIND)
|
||||
@@ -201,6 +239,8 @@ struct boss_anshal : public BossAI
|
||||
}
|
||||
break;
|
||||
case ACTION_PLAYER_LEFT_PLATFORM:
|
||||
if (!me->IsInCombat())
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 2s);
|
||||
break;
|
||||
default:
|
||||
@@ -208,6 +248,15 @@ struct boss_anshal : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_WIND_DISTANCE_CHECKER)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_WINDS_PRE_EFFECT_WARNING);
|
||||
me->RemoveAurasDueToSpell(SPELL_WITHERING_WINDS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
@@ -349,6 +398,8 @@ struct boss_nezir : public BossAI
|
||||
}
|
||||
break;
|
||||
case ACTION_PLAYER_LEFT_PLATFORM:
|
||||
if (!me->IsInCombat())
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 2s);
|
||||
break;
|
||||
default:
|
||||
@@ -356,6 +407,15 @@ struct boss_nezir : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_WIND_DISTANCE_CHECKER)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_WINDS_PRE_EFFECT_WARNING);
|
||||
me->RemoveAurasDueToSpell(SPELL_CHILLING_WINDS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
@@ -420,6 +480,12 @@ struct boss_rohash : public BossAI
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me);
|
||||
me->RemoveAurasDueToSpell(SPELL_PRE_FIGHT_VISUAL_EAST);
|
||||
events.ScheduleEvent(EVENT_SLICING_GALE, 1s);
|
||||
events.ScheduleEvent(EVENT_SUMMON_TORNADOS, 8s);
|
||||
events.ScheduleEvent(EVENT_WIND_BLAST, 32s + 500ms);
|
||||
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_STORM_SHIELD, 30s);
|
||||
|
||||
if (ConclaveHandler::IsTargetOnPlatform(me->GetHomePosition(), who))
|
||||
Talk(SAY_AGGRO);
|
||||
@@ -433,6 +499,12 @@ struct boss_rohash : public BossAI
|
||||
Initialize();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
if (Creature* dummy = DoSummon(NPC_WORLD_TRIGGER_IMMUNE_TO_PC, WindBlastTriggerPosition, 0, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
_windBlastTriggerGUID = dummy->GetGUID();
|
||||
dummy->CastSpell(dummy, SPELL_WIND_BLAST_SPEED_BUFF, true);
|
||||
dummy->GetMotionMaster()->MoveCirclePath(me->GetPositionX(), me->GetPositionY(), dummy->GetPositionZ(), dummy->GetExactDist2d(me), true, 19);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* killed) override
|
||||
@@ -469,6 +541,8 @@ struct boss_rohash : public BossAI
|
||||
}
|
||||
break;
|
||||
case ACTION_PLAYER_LEFT_PLATFORM:
|
||||
if (!me->IsInCombat())
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_PRE_WIND_EFFECT_WARNING, 2s);
|
||||
break;
|
||||
default:
|
||||
@@ -476,9 +550,28 @@ struct boss_rohash : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_WIND_DISTANCE_CHECKER)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_WINDS_PRE_EFFECT_WARNING);
|
||||
me->RemoveAurasDueToSpell(SPELL_DEAFENING_WINDS);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
|
||||
switch (summon->GetEntry())
|
||||
{
|
||||
case NPC_TORNADO:
|
||||
summon->SetHomePosition(me->GetPosition());
|
||||
summon->GetMotionMaster()->MoveRandom(25.0f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
@@ -486,6 +579,14 @@ struct boss_rohash : public BossAI
|
||||
return 0;
|
||||
}
|
||||
|
||||
ObjectGuid GetGUID(int32 type) const override
|
||||
{
|
||||
if (type == DATA_WIND_BLAST_TRIGGER)
|
||||
return _windBlastTriggerGUID;
|
||||
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
UpdateVictim();
|
||||
@@ -503,12 +604,28 @@ struct boss_rohash : public BossAI
|
||||
DoCastSelf(SPELL_WINDS_PRE_EFFECT_WARNING, true);
|
||||
events.Repeat(2s + 500ms);
|
||||
break;
|
||||
case EVENT_SLICING_GALE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, MAX_HOME_POSITION_DISTANCE, true, 0))
|
||||
DoCast(target, SPELL_SLICING_GALE);
|
||||
events.Repeat(2s + 100ms);
|
||||
break;
|
||||
case EVENT_STORM_SHIELD:
|
||||
me->SendPlaySpellVisualKit(SPELL_VISUAL_STORM_SHIELD, 0, 0);
|
||||
DoCastSelf(SPELL_STORM_SHIELD);
|
||||
break;
|
||||
case EVENT_SUMMON_TORNADOS:
|
||||
DoCastSelf(SPELL_SUMMON_TORNADOS);
|
||||
break;
|
||||
case EVENT_WIND_BLAST:
|
||||
DoCastAOE(SPELL_WIND_BLAST);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoSpellAttackIfReady(SPELL_SLICING_GALE);
|
||||
}
|
||||
private:
|
||||
ObjectGuid _windBlastTriggerGUID;
|
||||
};
|
||||
|
||||
struct npc_conclave_of_wind_ravenous_creeper_trigger : public ScriptedAI
|
||||
@@ -537,7 +654,85 @@ struct npc_conclave_of_wind_ravenous_creeper_trigger : public ScriptedAI
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CircleBoundary const anshalPlatformCircle(Position(-47.953f, 1053.439f), MAX_HOME_POSITION_DISTANCE);
|
||||
CreatureBoundary const AnshalPlatformBoundary = { &anshalPlatformCircle };
|
||||
|
||||
struct npc_conclave_of_wind_ravenous_creeper : public ScriptedAI
|
||||
{
|
||||
npc_conclave_of_wind_ravenous_creeper(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
SetBoundary(&AnshalPlatformBoundary);
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
DoZoneInCombat();
|
||||
_events.ScheduleEvent(EVENT_ATTACK_PLAYERS, 1s + 500ms);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_TOXIC_SPORES, 5s, 6s);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
if (ConclaveHandler::IsTargetOnPlatform(WesternPlatformCenterPosition, who))
|
||||
ScriptedAI::AttackStart(who);
|
||||
/*
|
||||
else
|
||||
DoCast(who, SPELL_AI_CLEAR_TARGET); //our threat system works different.Need to merge the threat system rewrite first.
|
||||
*/
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_AI_CLEAR_TARGET)
|
||||
DoModifyThreatPercent(target, -100);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
me->SetLastDamagedTime(0);
|
||||
me->SetCannotReachTarget(false);
|
||||
me->DoNotReacquireTarget();
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ATTACK_PLAYERS:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
break;
|
||||
case EVENT_TOXIC_SPORES:
|
||||
DoCastSelf(SPELL_TOXIC_SPORES);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
@@ -551,7 +746,7 @@ class spell_conclave_of_wind_winds_pre_effect_warning : public AuraScript
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* conclave = caster->ToCreature())
|
||||
if (conclave->IsAIEnabled && conclave->IsInCombat())
|
||||
if (conclave->IsAIEnabled)
|
||||
conclave->AI()->DoAction(ACTION_NO_NEARBY_PLAYER);
|
||||
}
|
||||
|
||||
@@ -561,30 +756,9 @@ class spell_conclave_of_wind_winds_pre_effect_warning : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_conclave_of_wind_winds_distance_checker : public SpellScript
|
||||
class spell_conclave_of_wind_teleport_to_center : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_conclave_of_wind_winds_distance_checker);
|
||||
|
||||
void HandleDummyEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
caster->RemoveAurasDueToSpell(SPELL_WINDS_PRE_EFFECT_WARNING);
|
||||
caster->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_WITHERING_WINDS_NORMAL, caster));
|
||||
caster->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_CHILLING_WINDS_NORMAL, caster));
|
||||
caster->RemoveAurasDueToSpell(sSpellMgr->GetSpellIdForDifficulty(SPELL_DEAFENING_WINDS_NORMAL, caster));
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_conclave_of_wind_winds_distance_checker::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_conclave_of_winds_teleport_to_center : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_conclave_of_winds_teleport_to_center);
|
||||
PrepareSpellScript(spell_conclave_of_wind_teleport_to_center);
|
||||
|
||||
void SetDest(SpellDestination& dest)
|
||||
{
|
||||
@@ -594,7 +768,70 @@ class spell_conclave_of_winds_teleport_to_center : public SpellScript
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_conclave_of_winds_teleport_to_center::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_conclave_of_wind_teleport_to_center::SetDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_conclave_of_wind_winds : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_conclave_of_wind_winds);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_WITHERING_WINDS_DAMAGE,
|
||||
SPELL_CHILLING_WINDS_DAMAGE,
|
||||
SPELL_DEAFENING_WINDS_DAMAGE
|
||||
});
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
Unit* owner = GetUnitOwner();
|
||||
uint8 tickNumber = aurEff->GetTickNumber();
|
||||
int32 damage = std::min<uint32>(1500 * tickNumber, 150000);
|
||||
uint32 spellId = 0;
|
||||
switch (owner->GetEntry())
|
||||
{
|
||||
case BOSS_ANSHAL:
|
||||
spellId = SPELL_WITHERING_WINDS_DAMAGE;
|
||||
break;
|
||||
case BOSS_NEZIR:
|
||||
spellId = SPELL_CHILLING_WINDS_DAMAGE;
|
||||
break;
|
||||
case BOSS_ROHASH:
|
||||
spellId = SPELL_DEAFENING_WINDS_DAMAGE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spellId)
|
||||
owner->CastCustomSpell(spellId, SPELLVALUE_BASE_POINT0, damage, owner, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_conclave_of_wind_winds::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_conclave_of_wind_wind_blast : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_conclave_of_wind_wind_blast);
|
||||
|
||||
void SetTarget(WorldObject*& target)
|
||||
{
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* rohash = instance->GetCreature(DATA_ROHASH))
|
||||
if (Creature* trigger = ObjectAccessor::GetCreature(*GetCaster(), rohash->AI()->GetGUID(DATA_WIND_BLAST_TRIGGER)))
|
||||
target = trigger;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_conclave_of_wind_wind_blast::SetTarget, EFFECT_0, TARGET_UNIT_NEARBY_ENTRY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -604,8 +841,10 @@ void AddSC_boss_conclave_of_wind()
|
||||
RegisterThroneOfTheFourWindsCreatureAI(boss_nezir);
|
||||
RegisterThroneOfTheFourWindsCreatureAI(boss_rohash);
|
||||
RegisterThroneOfTheFourWindsCreatureAI(npc_conclave_of_wind_ravenous_creeper_trigger);
|
||||
RegisterThroneOfTheFourWindsCreatureAI(npc_conclave_of_wind_ravenous_creeper);
|
||||
|
||||
RegisterAuraScript(spell_conclave_of_wind_winds_pre_effect_warning);
|
||||
RegisterSpellScript(spell_conclave_of_wind_winds_distance_checker);
|
||||
RegisterSpellScript(spell_conclave_of_winds_teleport_to_center);
|
||||
RegisterSpellScript(spell_conclave_of_wind_teleport_to_center);
|
||||
RegisterAuraScript(spell_conclave_of_wind_winds);
|
||||
RegisterSpellScript(spell_conclave_of_wind_wind_blast);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ enum Spells
|
||||
enum Events
|
||||
{
|
||||
EVENT_EJECT_ALL_PASSENGERS = 1,
|
||||
EVENT_THROW_PASSENGER = 2,
|
||||
EVENT_THROW_PASSENGER = 2
|
||||
};
|
||||
|
||||
enum Actions
|
||||
@@ -87,6 +87,15 @@ class at_totfw_catch_fall : public AreaTriggerScript
|
||||
if (Creature* trigger = player->FindNearestCreature(NPC_WORLD_TRIGGER, 500.0f, true))
|
||||
trigger->CastSpell(player, SPELL_CATCH_FALL, true);
|
||||
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
if (Creature* anshal = instance->GetCreature(DATA_ANSHAL))
|
||||
anshal->AI()->DoAction(ACTION_PLAYER_LEFT_PLATFORM);
|
||||
else if (Creature* nezir = instance->GetCreature(DATA_NEZIR))
|
||||
nezir->AI()->DoAction(ACTION_PLAYER_LEFT_PLATFORM);
|
||||
else if (Creature* rohash = instance->GetCreature(DATA_ROHASH))
|
||||
rohash->AI()->DoAction(ACTION_PLAYER_LEFT_PLATFORM);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,15 +41,17 @@ enum TFWDataTypes
|
||||
enum TFWCreatureIds
|
||||
{
|
||||
// Bosses
|
||||
BOSS_ANSHAL = 45870,
|
||||
BOSS_NEZIR = 45871,
|
||||
BOSS_ROHASH = 45872,
|
||||
BOSS_ALAKIR = 46753,
|
||||
BOSS_ANSHAL = 45870,
|
||||
BOSS_NEZIR = 45871,
|
||||
BOSS_ROHASH = 45872,
|
||||
BOSS_ALAKIR = 46753,
|
||||
|
||||
// Creatures
|
||||
NPC_WORLD_TRIGGER = 21252,
|
||||
NPC_FALL_CATCHER = 45710,
|
||||
NPC_RAVENOUS_CREEPER = 45812
|
||||
NPC_WORLD_TRIGGER = 21252,
|
||||
NPC_FALL_CATCHER = 45710,
|
||||
NPC_RAVENOUS_CREEPER = 45812,
|
||||
NPC_TORNADO = 46207,
|
||||
NPC_WORLD_TRIGGER_IMMUNE_TO_PC = 19871,
|
||||
};
|
||||
|
||||
enum TFWGameObjectIds
|
||||
|
||||
@@ -115,7 +115,7 @@ void AddSC_boss_altairus();
|
||||
void AddSC_boss_asaad();
|
||||
void AddSC_instance_throne_of_the_four_winds(); // Throne of the Four Winds
|
||||
void AddSC_throne_of_the_four_winds();
|
||||
//void AddSC_boss_conclave_of_wind();
|
||||
void AddSC_boss_conclave_of_wind();
|
||||
void AddSC_instance_firelands(); //Firelands
|
||||
void AddSC_boss_alysrazor();
|
||||
void AddSC_boss_baleroc();
|
||||
@@ -239,7 +239,7 @@ void AddKalimdorScripts()
|
||||
AddSC_boss_asaad();
|
||||
AddSC_instance_throne_of_the_four_winds(); // Throne of the Four Winds
|
||||
AddSC_throne_of_the_four_winds();
|
||||
//AddSC_boss_conclave_of_wind();
|
||||
AddSC_boss_conclave_of_wind();
|
||||
AddSC_instance_firelands(); //Firelands
|
||||
AddSC_boss_alysrazor();
|
||||
AddSC_boss_baleroc();
|
||||
|
||||
Reference in New Issue
Block a user