6 Commits
Author SHA1 Message Date
Céfiro_Caecias 5de7d827b3 DB/World: Orc Starting Zone 2026-09-25 20:00:00 -03:00
Céfiro_Caecias 95ff338eca DB/World: DBErrors Fixes 2026-09-25 16:40:56 -03:00
luis 1911c8b01b fix crash 2026-09-25 13:53:04 -03:00
Céfiro_Caecias bc9e2c6d08 DB/World: Gameobject Translates 2026-09-25 09:20:18 -03:00
Céfiro_Caecias 7816605b95 Update 2026_09_24_05_world.sql 2026-09-25 08:20:05 -03:00
Céfiro_Caecias d259e0c817 Update 2026_09_24_05_world.sql 2026-09-25 08:14:30 -03:00
8 changed files with 23032 additions and 931 deletions
@@ -272,7 +272,7 @@ INSERT INTO `creature_template_spell` (`CreatureID`, `Index`, `Spell`, `Verified
(156267, 0, 305557, 69875);
INSERT INTO `quest_template_addon` (`ID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `BreadcrumbForQuestId`) VALUES
REPLACE INTO `quest_template_addon` (`ID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `BreadcrumbForQuestId`) VALUES
(54933, 0, 0, 0, 0), -- Freeing the Light
(54951, 55122, 54952, 0, 0), -- Emergency First Aid (Alliance)
(54952, 54951, 55174, 0, 0), -- Finding the Lost Expedition (Alliance)
@@ -376,11 +376,12 @@ INSERT INTO `quest_template_addon` (`ID`, `PrevQuestID`, `NextQuestID`, `Exclusi
(66349, 0, 0, 0, 0), -- Training Rock
(85678, 55639, 0, 0, 0), -- Repair Yourself (Alliance)
(85679, 59949, 0, 0, 0); -- Repair Yourself (Horde)
ON DUPLICATE KEY UPDATE
`PrevQuestID` = VALUES(`PrevQuestID`),
`NextQuestID` = VALUES(`NextQuestID`),
`ExclusiveGroup` = VALUES(`ExclusiveGroup`),
`BreadcrumbForQuestId` = VALUES(`BreadcrumbForQuestId`);
-- ON DUPLICATE KEY UPDATE
-- `PrevQuestID` = VALUES(`PrevQuestID`),
-- `NextQuestID` = VALUES(`NextQuestID`),
-- `ExclusiveGroup` = VALUES(`ExclusiveGroup`),
-- `BreadcrumbForQuestId` = VALUES(`BreadcrumbForQuestId`);
-- Retail quest givers and turn-ins that were missing. The creature and quest pairs are the
-- sniffed rows of TrinityCore TDB 1210.26091, so every quest can be picked up and handed in
File diff suppressed because one or more lines are too long
@@ -0,0 +1,67 @@
-- ==============
-- DBErrors Fixes
-- ==============
UPDATE `quest_template_addon` SET `ProvidedItemCount`=1 WHERE `ID` IN (59941,59930,54951,56034);
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry` IN (245394,245397,245667,245686);
UPDATE `creature_template_difficulty` SET `LootID`=154145 WHERE `Entry`=154145;
UPDATE `creature_template_difficulty` SET `LootID`=154146 WHERE `Entry`=154146;
UPDATE `creature_template_difficulty` SET `LootID`=154147 WHERE `Entry`=154147;
UPDATE `creature_template` SET `npcflag`=65667 WHERE `entry`=191025;
UPDATE `npc_vendor` SET `maxcount`=0 WHERE `entry`=190526 AND `item`=6533 AND `ExtendedCost`=0 AND `type`=1;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (17826,17827);
UPDATE `creature_template` SET `ScriptName`='npc_malfunctioning_goliath' WHERE `entry`=171750;
UPDATE `creature_template` SET `ScriptName`='npc_smashspite_fel_bat' WHERE `entry`=100759;
UPDATE `creature_template` SET `ScriptName`='npc_amarth' WHERE `entry`=162692;
UPDATE `creature_template` SET `ScriptName`='npc_brh_boulder_instance_trash' WHERE `entry`=100485;
UPDATE `creature_template` SET `ScriptName`='npc_brh_fel_bat' WHERE `entry`=102781;
UPDATE `creature_template` SET `ScriptName`='npc_illysanna_commandir' WHERE `entry`=98706;
UPDATE `creature_template` SET `ScriptName`='npc_illysanna_eye_beam_stalker' WHERE `entry`=100436;
UPDATE `creature_template` SET `ScriptName`='npc_illysanna_trash_generic' WHERE `entry`=100486;
UPDATE `creature_template` SET `ScriptName`='npc_kurtalos_ravencrest' WHERE `entry`=98965;
UPDATE `creature_template` SET `ScriptName`='npc_kurtalos_stinging_swarm' WHERE `entry`=101008;
UPDATE `creature_template` SET `ScriptName`='npc_tushui_huojin_trainee' WHERE `entry` IN (54587,65471);
UPDATE `creature_template` SET `ScriptName`='npc_huojin_trainee' WHERE `entry` IN (54586,65470);
UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=236190;
UPDATE `creature_template` SET `ScriptName`='boss_illysanna_ravencrest' WHERE `entry`=98696;
UPDATE `creature_template` SET `ScriptName`='boss_nalthor' WHERE `entry`=166945;
UPDATE `creature_template` SET `ScriptName`='boss_swampface' WHERE `entry`=226396;
UPDATE `creature_template` SET `ScriptName`='boss_geezle_gigazap' WHERE `entry`=242255;
UPDATE `creature_template` SET `ScriptName`='boss_amarth' WHERE `entry`=163157;
UPDATE `creature_template` SET `ScriptName`='npc_kurtalos_trigger' WHERE `entry` IN (101054,100861,101028);
UPDATE `creature_template` SET `ScriptName`='boss_bront' WHERE `entry`=226402;
UPDATE `creature_template` SET `ScriptName`='boss_big_momma' WHERE `entry`=226398;
UPDATE `creature_template` SET `ScriptName`='boss_latosius' WHERE `entry`=98970;
UPDATE `creature_template` SET `ScriptName`='boss_blightbone' WHERE `entry`=162691;
UPDATE `creature_template` SET `ScriptName`='npc_brh_boulder' WHERE `entry`=100485;
UPDATE `creature_template` SET `ScriptName`='boss_keeza_quickfuse' WHERE `entry`=226403;
UPDATE `creature_template` SET `ScriptName`='npc_brh_wyrmtongue_scavenger' WHERE `entry`=98792;
UPDATE `creature_template` SET `ScriptName`='boss_smashspite_the_hateful' WHERE `entry`=98949;
UPDATE `creature_template` SET `ScriptName`='boss_surgeon_stitchflesh' WHERE `entry`=166882;
UPDATE `creature_template` SET `ScriptName`='npc_carrion_worm_nw' WHERE `entry`=164702;
UPDATE `instance_template` SET `script`='instance_operation_floodgate' WHERE `map`=2773;
UPDATE `instance_template` SET `script`='instance_necrotic_wake' WHERE `map`=2286;
DELETE FROM `spell_script_names` WHERE `spell_id`=197484 AND `ScriptName`='spell_illysanna_dark_rush';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(197484, 'spell_illysanna_dark_rush');
DELETE FROM `spell_script_names` WHERE `spell_id`=197696 AND `ScriptName`='spell_illysanna_eye_beams';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(197696, 'spell_illysanna_eye_beams');
DELETE FROM `spell_script_names` WHERE `spell_id`=197394 AND `ScriptName`='spell_illysanna_periodic_energize';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(197394, 'spell_illysanna_periodic_energize');
DELETE FROM `spell_script_names` WHERE `spell_id`=198835 AND `ScriptName`='spell_latosius_random_teleport';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(198835, 'spell_latosius_random_teleport');
DELETE FROM `spell_script_names` WHERE `spell_id`=198114 AND `ScriptName`='spell_smashpite_brutality_proc';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(198114, 'spell_smashpite_brutality_proc');
DELETE FROM `spell_script_names` WHERE `spell_id`=201733 AND `ScriptName`='spell_kurtalos_stinging_swarm';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(201733, 'spell_kurtalos_stinging_swarm');
File diff suppressed because it is too large Load Diff
@@ -1,770 +0,0 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaTriggerAI.h"
#include "CellImpl.h"
#include "Containers.h"
#include "GameObject.h"
#include "GridNotifiersImpl.h"
#include "InstanceScript.h"
#include "MotionMaster.h"
#include "MoveSplineInit.h"
#include "ObjectAccessor.h"
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellAuras.h"
#include "SpellAuraEffects.h"
#include "SpellScript.h"
#include "ecodome_aldani.h"
enum AzhiccarSpells
{
// Intro
SPELL_DEVOUR_INTRO = 1233112,
SPELL_DEVOUR_INTRO_SELECTOR = 1233116,
SPELL_DEVOUR_INSTAKILL = 1233147,
SPELL_KNOCKBACK = 1222792,
// Combat
SPELL_DEVOUR = 1217232,
SPELL_DEVOUR_AREATRIGGER = 1217240,
SPELL_DEVOUR_SELECTOR = 1217255,
SPELL_DEVOURER_VORTEX = 1227068,
SPELL_DIGESTIVE_SPITTLE = 1217446,
SPELL_DIGESTIVE_SPITTLE_NPC_SLOW = 1217526,
SPELL_ENERGY_CONTROLLER = 1217202,
SPELL_FEAST = 1217241,
SPELL_FEAST_HEAL = 1217247,
SPELL_FEAST_INSTAKILL = 1217252,
SPELL_INVADING_SHRIEK_DAMAGE = 1231850,
SPELL_INVADING_SHRIEK_DUMMY = 1217330,
SPELL_INVADING_SHRIEK_PERIODIC = 1217327,
SPELL_INVADING_SHRIEK_SUMMON = 1217331,
SPELL_PLAYER_DETECTION = 1217757,
SPELL_THRASH = 1217664,
SPELL_TOXIC_REGURGITATION_CAST = 1227745,
SPELL_TOXIC_REGURGITATION_MARKER = 1227748,
SPELL_TOXIC_REGURGITATION_MISSILE = 1217438,
SPELL_TOXIC_REGURGITATION_SELECTOR = 1217436,
// Mites
SPELL_UNCONTROLLED = 1231811,
SPELL_STUNNED = 1235707,
};
enum AzhiccarEvents
{
EVENT_INVADING_SHRIEK = 1,
EVENT_TOXIC_REGURGITATION,
EVENT_CHECK_ENERGY
};
enum AzhiccarActions
{
ACTION_START_INTRO = 1
};
enum AzhiccarTexts
{
SAY_DEVOUR = 0
};
enum AzhiccarMisc
{
ANIMKIT_NONE = 0,
ANIMKIT_EMERGE = 21290,
ANIMKIT_MITE_DEVOUR_BIRTH = 11428,
SPELL_VISUALKIT_ALARM = 222521,
POINT_AZHICCAR = 0,
SPELL_VISUAL_DEVOURED = 155836,
NPC_PORTAL_STALKER = 237454,
NPC_FRENZIED_MITE = 236190,
};
static constexpr Position AzhiccarPosition = { 436.8889f, -746.0f, 1002.0926f };
static constexpr Position OrphanSpellVisualPosition = { 436.8889f, -746.0f, 1018.0926f };
// 234893 - Azhiccar
struct boss_azhiccar : public BossAI
{
boss_azhiccar(Creature* creature) : BossAI(creature, DATA_AZHICCAR), _invadingShriekCount(1), _toxicRegurgitationCount(1) { }
void JustAppeared() override
{
if (instance->GetData(DATA_AZHICCAR_INTRO) == DONE)
{
me->SetUninteractible(false);
me->SetImmuneToAll(false);
me->SetAIAnimKitId(ANIMKIT_NONE);
me->PlayOneShotAnimKitId(ANIMKIT_EMERGE);
}
me->SetPowerType(POWER_ENERGY);
me->SetPower(POWER_ENERGY, 0);
DoCastSelf(SPELL_DEVOURER_VORTEX);
}
void Reset() override
{
BossAI::Reset();
_invadingShriekCount = 1;
_toxicRegurgitationCount = 1;
_lastPortalPositions.clear();
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 1);
DoCastSelf(SPELL_PLAYER_DETECTION);
DoCastSelf(SPELL_ENERGY_CONTROLLER);
events.ScheduleEvent(EVENT_TOXIC_REGURGITATION, 15400ms);
events.ScheduleEvent(EVENT_INVADING_SHRIEK, 5200ms);
if (IsHeroicOrHigher())
events.ScheduleEvent(EVENT_CHECK_ENERGY, 500ms);
}
void JustDied(Unit* /*killer*/) override
{
_JustDied();
summons.DespawnAll();
me->RemoveAllAreaTriggers();
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
}
void EnterEvadeMode(EvadeReason /*why*/) override
{
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
summons.DespawnAll();
me->RemoveAllAreaTriggers();
_EnterEvadeMode();
_DespawnAtEvade();
}
void OnSpellStart(SpellInfo const* spellInfo) override
{
switch (spellInfo->Id)
{
case SPELL_DEVOUR:
{
Talk(SAY_DEVOUR);
break;
}
default:
break;
}
}
void DoAction(int32 actionId) override
{
switch (actionId)
{
case ACTION_START_INTRO:
{
me->SetAIAnimKitId(ANIMKIT_NONE);
me->PlayOneShotAnimKitId(ANIMKIT_EMERGE);
scheduler.Schedule(2s + 170ms, [this](TaskContext context)
{
DoCastSelf(SPELL_KNOCKBACK);
DoCastSelf(SPELL_DEVOUR_INTRO);
context.Schedule(7s, [this](TaskContext const&)
{
me->SetUninteractible(false);
me->SetImmuneToAll(false);
instance->SetData(DATA_AZHICCAR_INTRO, DONE);
});
});
break;
}
default:
break;
}
}
void UpdateAI(uint32 diff) override
{
scheduler.Update(diff);
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_INVADING_SHRIEK:
{
std::vector<float> portalAngles =
{
float(M_PI / 4.0f),
-float(M_PI / 4.0f),
-(3.0f * float(M_PI / 4.0f)),
(3.0f * float(M_PI / 4.0f))
};
Trinity::Containers::RandomResize(portalAngles, 3);
static constexpr float PORTAL_STALKER_DIST = 30.0f;
_lastPortalPositions.clear();
for (float angle : portalAngles)
{
angle += me->GetOrientation();
Position pos = me->GetPosition();
me->MovePosition(pos, PORTAL_STALKER_DIST, angle);
me->SummonCreature(NPC_PORTAL_STALKER, pos, TEMPSUMMON_TIMED_DESPAWN, 4100ms);
_lastPortalPositions.push_back(pos);
}
DoCastSelf(SPELL_INVADING_SHRIEK_PERIODIC);
_invadingShriekCount++;
if (_invadingShriekCount % 2 == 0)
events.Repeat(37200ms);
else
events.Repeat(48500ms);
break;
}
case EVENT_TOXIC_REGURGITATION:
{
DoCastSelf(SPELL_TOXIC_REGURGITATION_SELECTOR);
_toxicRegurgitationCount++;
if (_toxicRegurgitationCount % 2 == 0)
events.Repeat(18200ms);
else
events.Repeat(67500ms);
break;
}
case EVENT_CHECK_ENERGY:
{
if (me->GetPower(POWER_ENERGY) >= 100)
{
DoCastSelf(SPELL_DEVOUR);
if (IsMythic())
{
for (Position const& lastPos : _lastPortalPositions)
{
me->SummonCreature(NPC_PORTAL_STALKER, lastPos, TEMPSUMMON_TIMED_DESPAWN, 2s);
for (uint8 i = 0; i < 3; i++)
{
Position pos(lastPos);
me->MovePosition(pos, 3.0f, frand(0, 2 * float(M_PI)));
me->m_Events.AddEventAtOffset([caster = me, pos]()
{
caster->CastSpell(pos, SPELL_INVADING_SHRIEK_SUMMON, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR
});
}, 2100ms);
}
}
}
events.Repeat(25s);
}
else
events.Repeat(500ms);
break;
}
default:
break;
}
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
}
}
private:
uint32 _invadingShriekCount;
uint32 _toxicRegurgitationCount;
std::vector<Position> _lastPortalPositions;
};
// 236190 - Frenzied Mite
struct npc_azhiccar_frenzied_mite : public ScriptedAI
{
npc_azhiccar_frenzied_mite(Creature* creature) : ScriptedAI(creature) {}
void JustAppeared() override
{
Creature* azhiccar = me->GetInstanceScript()->GetCreature(DATA_AZHICCAR);
if (!azhiccar)
return;
if (azhiccar->GetPower(POWER_ENERGY) >= 100)
{
me->SetReactState(REACT_PASSIVE);
DoCastSelf(SPELL_STUNNED);
me->PlayOneShotAnimKitId(ANIMKIT_MITE_DEVOUR_BIRTH);
}
else
DoCastSelf(SPELL_UNCONTROLLED);
}
};
// 1217202 - Energy Controller
class spell_azhiccar_energy_controller : public AuraScript
{
static constexpr std::array<uint8, 3> AzhiccarEnergizeCycle = { 1, 2, 2 };
void PeriodicTick(AuraEffect const* aurEff) const
{
if (GetTarget()->HasAura(SPELL_DEVOUR))
return;
uint8 cycleIdx = aurEff->GetTickNumber() % AzhiccarEnergizeCycle.size();
GetTarget()->ModifyPower(POWER_ENERGY, AzhiccarEnergizeCycle[cycleIdx]);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_azhiccar_energy_controller::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
// 1217436 - Toxic Regurgitation
class spell_azhiccar_toxic_regurgitation_selector : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_TOXIC_REGURGITATION_MARKER, SPELL_TOXIC_REGURGITATION_CAST });
}
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
Unit* caster = GetCaster();
CastSpellExtraArgs args;
args.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR;
args.TriggeringSpell = GetSpell();
caster->CastSpell(caster, SPELL_TOXIC_REGURGITATION_CAST, args);
caster->CastSpell(GetHitUnit(), SPELL_TOXIC_REGURGITATION_MARKER, args);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_azhiccar_toxic_regurgitation_selector::HandleHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 1227745 - Toxic Regurgitation
class spell_azhiccar_toxic_regurgitation_cast : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_TOXIC_REGURGITATION_MARKER, SPELL_TOXIC_REGURGITATION_MISSILE });
}
void HandleOnHit() const
{
Unit* caster = GetCaster();
std::list<Player*> players;
Trinity::UnitAuraCheck check(true, SPELL_TOXIC_REGURGITATION_MARKER);
Trinity::PlayerListSearcher<Trinity::UnitAuraCheck> searcher(caster, players, check);
Cell::VisitWorldObjects(caster, searcher, 200.0f);
for (Player* player : players)
{
caster->CastSpell(player, SPELL_TOXIC_REGURGITATION_MISSILE, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
}
void Register() override
{
OnHit += SpellHitFn(spell_azhiccar_toxic_regurgitation_cast::HandleOnHit);
}
};
// 1217327 - Invading Shriek
class spell_azhiccar_invading_shriek : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo ({ SPELL_INVADING_SHRIEK_DAMAGE });
}
void HandleAfterCast() const
{
Unit* caster = GetCaster();
caster->CastSpell(caster, SPELL_INVADING_SHRIEK_DAMAGE, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
void Register() override
{
AfterCast += SpellCastFn(spell_azhiccar_invading_shriek::HandleAfterCast);
}
};
// 1217327 - Invading Shriek
class spell_azhiccar_invading_shriek_aura : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo ({ SPELL_INVADING_SHRIEK_DAMAGE });
}
void OnApply(AuraEffect const* /*auraEffect*/, AuraEffectHandleModes /*mode*/)
{
std::vector<Creature*> stalkers;
GetCaster()->GetCreatureListWithEntryInGrid(stalkers, NPC_PORTAL_STALKER, 150.0f);
Trinity::Containers::RandomShuffle(stalkers);
for (Creature* creature : stalkers)
_stalkerList.push(creature->GetGUID());
}
void OnPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetTickNumber() <= 1)
return;
Unit* caster = GetCaster();
ObjectGuid guid = _stalkerList.front();
_stalkerList.pop();
if (Creature* stalker = ObjectAccessor::GetCreature(*caster, guid))
{
caster->CastSpell(stalker->GetPosition(), SPELL_INVADING_SHRIEK_DUMMY, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringAura = aurEff
});
}
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_azhiccar_invading_shriek_aura::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_azhiccar_invading_shriek_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
private:
std::queue<ObjectGuid> _stalkerList;
};
// 1217330 - Invading Shriek
class spell_azhiccar_invading_shriek_dummy : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_INVADING_SHRIEK_SUMMON });
}
void HandleHit(SpellEffIndex /*effIndex*/) const
{
GetCaster()->CastSpell(GetHitDest()->GetPosition(), SPELL_INVADING_SHRIEK_SUMMON, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
void Register() override
{
OnEffectHit += SpellEffectFn(spell_azhiccar_invading_shriek_dummy::HandleHit, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 1217758 - Player Detection (SERVERSIDE)
class spell_azhiccar_player_detection : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DEVOUR, SPELL_THRASH });
}
void HandlePlayerDetection() const
{
Unit* caster = GetCaster();
int64 const targetsHit = GetUnitTargetCountForEffect(EFFECT_0);
if (targetsHit > 0)
return;
Spell* currentChanneledSpell = caster->GetCurrentSpell(CURRENT_CHANNELED_SPELL);
if (currentChanneledSpell && (currentChanneledSpell->GetSpellInfo()->Id == SPELL_DEVOUR))
return;
if (caster->HasAura(SPELL_DEVOUR))
return;
caster->CastSpell(caster, SPELL_THRASH, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
}
void Register() override
{
AfterCast += SpellCastFn(spell_azhiccar_player_detection::HandlePlayerDetection);
}
};
// 1217232 - Devour
class spell_azhiccar_devour : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DEVOUR_AREATRIGGER, SPELL_DEVOUR_SELECTOR });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* caster = GetCaster();
caster->CastSpell(caster, SPELL_DEVOUR_AREATRIGGER, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
caster->CastSpell(caster, SPELL_DEVOUR_SELECTOR, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
}
void Register() override
{
AfterEffectApply += AuraEffectRemoveFn(spell_azhiccar_devour::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
// 1217255 - Devour
class spell_azhiccar_devour_selector : public SpellScript
{
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if([](WorldObject* target) {
return !target->IsPlayer() && target->GetEntry() != NPC_FRENZIED_MITE;
});
}
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
Unit* target = GetHitUnit();
std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
{
init.SetBackward();
init.MoveTo(AzhiccarPosition.GetPositionX(), AzhiccarPosition.GetPositionY(), AzhiccarPosition.GetPositionZ(), false);
};
target->SendPlaySpellVisualKit(SPELL_VISUALKIT_ALARM, 4, 9000);
target->GetMotionMaster()->LaunchMoveSpline(std::move(initializer), POINT_AZHICCAR, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
target->SetSpeed(MOVE_RUN_BACK, 12.0f);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_azhiccar_devour_selector::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_azhiccar_devour_selector::HandleHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 1217241 - Feast
// 1217252 - Feast
class spell_azhiccar_feast : public SpellScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_FEAST_HEAL });
}
void HandleHit(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
caster->CastSpell(caster, SPELL_FEAST_HEAL, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringSpell = GetSpell()
});
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_azhiccar_feast::HandleHit, EFFECT_0, SPELL_EFFECT_ANY);
}
};
// 1217441 - Digestive Spittle
// Id - 36181
struct at_azhiccar_digestive_spittle : AreaTriggerAI
{
using AreaTriggerAI::AreaTriggerAI;
void OnUnitEnter(Unit* unit) override
{
Unit* caster = at->GetCaster();
if (!caster)
return;
caster->CastSpell(unit, (unit->IsPlayer() ? SPELL_DIGESTIVE_SPITTLE : SPELL_DIGESTIVE_SPITTLE_NPC_SLOW), TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
}
void OnUnitExit(Unit* unit, AreaTriggerExitReason /*reason*/) override
{
unit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_SPITTLE);
unit->RemoveAurasDueToSpell(SPELL_DIGESTIVE_SPITTLE_NPC_SLOW);
}
};
// 1217240 - Devour
// Id - 38188
struct at_azhiccar_devour_force : AreaTriggerAI
{
using AreaTriggerAI::AreaTriggerAI;
void OnUnitEnter(Unit* unit) override
{
if (!unit->IsPlayer() || unit->GetEntry() == NPC_PORTAL_STALKER)
return;
unit->ApplyMovementForce(at->GetGUID(), at->GetPosition(), 3.0f, MovementForceType::Gravity);
}
void OnUnitExit(Unit* unit, AreaTriggerExitReason /*reason*/) override
{
unit->RemoveMovementForce(at->GetGUID());
}
};
// 1217240 - Devour
// Id - 38189
struct at_azhiccar_devour : AreaTriggerAI
{
using AreaTriggerAI::AreaTriggerAI;
void OnUnitEnter(Unit* unit) override
{
Unit* caster = at->GetCaster();
if (!caster)
return;
if (unit->IsPlayer())
caster->CastSpell(unit, SPELL_FEAST, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
else if (unit->HasAura(SPELL_DEVOUR_SELECTOR))
caster->CastSpell(unit, SPELL_FEAST_INSTAKILL, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
}
};
// Id - 176
struct at_azhiccar_intro : AreaTriggerAI
{
at_azhiccar_intro(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { }
void OnUnitEnter(Unit* unit) override
{
InstanceScript* instance = at->GetInstanceScript();
if (!instance)
return;
Player* player = unit->ToPlayer();
if (!player || player->IsGameMaster())
return;
if (Creature* azhiccar = instance->GetCreature(DATA_AZHICCAR))
azhiccar->AI()->DoAction(ACTION_START_INTRO);
at->Remove();
}
};
// 245411 - Ravaging Scavenger
// 245412 - Voracious Gorger
struct npc_azhiccar_intro_creature : public ScriptedAI
{
npc_azhiccar_intro_creature(Creature* creature) : ScriptedAI(creature) { }
void SpellHit(WorldObject* /*caster*/, SpellInfo const* spellInfo) override
{
if (spellInfo->Id == SPELL_DEVOUR_INTRO_SELECTOR)
{
_scheduler.Schedule(2000ms, 4500ms, [this](TaskContext const&)
{
me->SendPlayOrphanSpellVisual(OrphanSpellVisualPosition, me->GetPosition(), SPELL_VISUAL_DEVOURED, 45.0f, false);
DoCastSelf(SPELL_DEVOUR_INSTAKILL);
me->DespawnOrUnsummon(5s);
});
}
}
void UpdateAI(uint32 diff) override
{
_scheduler.Update(diff);
}
private:
TaskScheduler _scheduler;
};
// 1233116 - Devour
class spell_azhiccar_devour_intro_selector : public SpellScript
{
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
{
Unit* target = GetHitUnit();
std::function<void(Movement::MoveSplineInit&)> initializer = [](Movement::MoveSplineInit& init)
{
init.SetBackward();
init.MoveTo(AzhiccarPosition.GetPositionX(), AzhiccarPosition.GetPositionY(), AzhiccarPosition.GetPositionZ(), false);
};
target->SendPlaySpellVisualKit(SPELL_VISUALKIT_ALARM, 4, 9000);
target->GetMotionMaster()->LaunchMoveSpline(std::move(initializer), POINT_AZHICCAR, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
target->SetSpeed(MOVE_RUN_BACK, 16.0f);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_azhiccar_devour_intro_selector::HandleHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
void AddSC_boss_azhiccar()
{
RegisterEcodomeAldaniCreatureAI(boss_azhiccar);
RegisterEcodomeAldaniCreatureAI(npc_azhiccar_frenzied_mite);
RegisterSpellScript(spell_azhiccar_energy_controller);
RegisterSpellScript(spell_azhiccar_toxic_regurgitation_selector);
RegisterSpellScript(spell_azhiccar_toxic_regurgitation_cast);
RegisterSpellAndAuraScriptPair(spell_azhiccar_invading_shriek, spell_azhiccar_invading_shriek_aura);
RegisterSpellScript(spell_azhiccar_invading_shriek_dummy);
RegisterSpellScript(spell_azhiccar_player_detection);
RegisterSpellScript(spell_azhiccar_devour);
RegisterSpellScript(spell_azhiccar_devour_selector);
RegisterSpellScript(spell_azhiccar_feast);
RegisterAreaTriggerAI(at_azhiccar_digestive_spittle);
RegisterAreaTriggerAI(at_azhiccar_devour_force);
RegisterAreaTriggerAI(at_azhiccar_devour);
// Intro
RegisterAreaTriggerAI(at_azhiccar_intro);
RegisterEcodomeAldaniCreatureAI(npc_azhiccar_intro_creature);
RegisterSpellScript(spell_azhiccar_devour_intro_selector);
}
@@ -1,58 +0,0 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DEF_ECODOME_ALDANI_H_
#define DEF_ECODOME_ALDANI_H_
#include "CreatureAIImpl.h"
#define EAScriptName "instance_ecodome_aldani"
#define DataHeader "EcodomeAldani"
uint32 const EncounterCount = 3;
enum EcodomeAldaniDataTypes
{
// Encounters
DATA_AZHICCAR = 0,
DATA_TAAHBAT_AND_AWAZJ = 1,
DATA_SOUL_SCRIBE = 2,
DATA_TAAHBAT,
DATA_AWAZJ,
DATA_AZHICCAR_INTRO
};
enum EcodomeAldaniCreatureIds
{
// Bosses
BOSS_AZHICCAR = 234893,
BOSS_TAAHBAT = 234933,
BOSS_AWAZJ = 241375,
BOSS_SOUL_SCRIBE = 247283
};
template <class AI, class T>
inline AI* GetEcodomeAldaniAI(T* obj)
{
return GetInstanceAI<AI>(obj, EAScriptName);
}
#define RegisterEcodomeAldaniCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetEcodomeAldaniAI)
#endif
@@ -1,93 +0,0 @@
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Creature.h"
#include "InstanceScript.h"
#include "ScriptMgr.h"
#include "ecodome_aldani.h"
static constexpr ObjectData creatureData[] =
{
{ BOSS_AZHICCAR, DATA_AZHICCAR },
{ BOSS_TAAHBAT, DATA_TAAHBAT },
{ BOSS_AWAZJ, DATA_AWAZJ },
{ BOSS_SOUL_SCRIBE, DATA_SOUL_SCRIBE },
{ 0, 0 } // END
};
static constexpr DungeonEncounterData encounters[] =
{
{ DATA_AZHICCAR, {{ 3107 }} },
{ DATA_TAAHBAT_AND_AWAZJ, {{ 3108 }} },
{ DATA_SOUL_SCRIBE, {{ 3109 }} }
};
class instance_ecodome_aldani : public InstanceMapScript
{
public:
instance_ecodome_aldani() : InstanceMapScript(EAScriptName, 2830) { }
struct instance_ecodome_aldani_InstanceMapScript: public InstanceScript
{
instance_ecodome_aldani_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, {});
LoadDungeonEncounterData(encounters);
_azhiccarIntroState = NOT_STARTED;
}
uint32 GetData(uint32 dataId) const override
{
switch (dataId)
{
case DATA_AZHICCAR_INTRO:
return _azhiccarIntroState;
default:
break;
}
return 0;
}
void SetData(uint32 dataId, uint32 value) override
{
switch (dataId)
{
case DATA_AZHICCAR_INTRO:
_azhiccarIntroState = value;
break;
default:
break;
}
}
private:
uint8 _azhiccarIntroState;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_ecodome_aldani_InstanceMapScript(map);
}
};
void AddSC_instance_ecodome_aldani()
{
new instance_ecodome_aldani();
}
@@ -18,14 +18,10 @@
// This is where scripts' loading functions should be declared:
// Eco-Dome Aldani
void AddSC_boss_azhiccar();
void AddSC_instance_ecodome_aldani();
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
void AddKareshScripts()
{
// Eco-Dome Aldani
AddSC_boss_azhiccar();
AddSC_instance_ecodome_aldani();
}