TrinityCore / TrinityCore/TrinityCore
[6.x] DB/Creature: Anetheron, Kaz'rogal and Azgalor Hellfire Citadel SAI.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.8k
- Forks
- 6.4k
- Avg merge
- 3d 16m
- Merged PRs (30d)
- 6
Description
Description:
Anetheron, Kazrogal and Azgalor Hellfire Citadel SAI
Link:
Anetheron - http://www.wowhead.com/npc=95408/anetheron
Kaz'rogal - http://www.wowhead.com/npc=95280/kazrogal
Azgalor - http://www.wowhead.com/npc=95282/azgalor
Current behaviour: Tell us what happens
Not scripted!
Expected behaviour: Tell us what should happen instead
Steps to reproduce the problem:
- No
- No
- No
Branch(es): 335/6x
6.x only.
TC hash/commit:
https://github.com/TrinityCore/TrinityCore/commit/25e1ecb33de8bfaea7fa7fa8c7f3da3074ea89e0
TDB version:
https://github.com/TrinityCore/TrinityCore/releases/tag/TDB6.04
Operating system:
Linking model: static/dynamic
Cannot find spell for summon http://ru.wowhead.com/npc=95655 in dbc files, in wowhead.
Maybe need additional summon in SpellAuraEffects.cpp write:
https://github.com/TrinityCore/TrinityCore/blob/3cbbcdb51a8fe2c0fdc0a0fbe1c7d3395b5dc2a1/src/server/game/Spells/Auras/SpellAuraEffects.cpp#L5703
// Doom Hellfire Citadel Version.
/// @todo effect trigger spell may be independant on spell targets, and executed in spell finish phase
// so instakill will be naturally done before trigger spell
case 189538:
{
// Should summon lesser doomguard, but spell for summon not found in dbc.
target->SummonCreature(95655, 0, 0, 0, target->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0);
target->KillSelf();
return;
}
Anetheron spell Towering Inferno ( On future - one from first spell have TARGET_UNK_138 - not implemented)
ID - 189491 Summon Towering Infernal
=================================================
Description: Summons a Towering Infernal to defend the caster.
Category = 1152, SpellIconID = 460, activeIconID = 0, SpellVisual = (48902,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000 [3] 0x00000000
SpellSchoolMask = 4 (SPELL_SCHOOL_MASK_FIRE)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Attributes: 0x00040000 (SPELL_ATTR0_DONT_AFFECT_SHEATH_STATE)
AttributesEx1: 0x00000088 (SPELL_ATTR1_CANT_BE_REDIRECTED, SPELL_ATTR1_CANT_BE_REFLECTED)
AttributesEx2: 0x00000004 (SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS)
AttributesEx3: 0x00000100 (SPELL_ATTR3_ONLY_TARGET_PLAYERS)
=================================================
MaxAffectedTargets: 1
Spell Level = 0, base 0, max 0
Category = 1152
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 1) "Self Only":
MinRangeNegative = 0, MinRangePositive = 0
MaxRangeNegative = 0, MaxRangePositive = 0
Cast time (Id 5) = 2,00
RecoveryTime: 0 ms, CategoryRecoveryTime: 5000 ms
StartRecoveryCategory = 0, StartRecoveryTime = 0,00 ms
Interrupt Flags: 0x0000002D, AuraIF 0x00000000, ChannelIF 0x00000000
Chance = 0, charges - 0
=================================================
Effect 0: Id 3 (SPELL_EFFECT_DUMMY) DIFFICULTY_NONE
BasePoints = 189495
Targets (18, 16) (TARGET_DEST_CASTER, TARGET_UNIT_DEST_AREA_ENEMY)
Max Radius (Id 12) 100,00
enum Towering Infernal
{
SPELL_ANETHERON_SUMMON_TOWERING_INFERNAL = 189491;
};
class spell_gen_anetheron_summon_towering_infernal : public SpellScriptLoader
{
public:
spell_gen_anetheron_summon_towering_infernal() : SpellScriptLoader("spell_gen_anetheron_summon_towering_infernal") { }
class spell_gen_anetheron_summon_towering_infernal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_anetheron_summon_towering_infernal_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_ANETHERON_SUMMON_TOWERING_INFERNAL))
return false;
return true;
}
void HandleDummy(SpellEffIndex /* effIndex */)
{
GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_gen_anetheron_summon_towering_infernal_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_gen_anetheron_summon_towering_infernal_SpellScript();
}
};
-- spell_gen_anetheron_summon_towering_infernal
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_gen_anetheron_summon_towering_infernal';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(189491,'spell_gen_anetheron_summon_towering_infernal');
Kazrogal mark have analogic behaviour with https://github.com/TrinityCore/TrinityCore/blob/a56a402190c885e51038df55654875cc9e875c03/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_kazrogal.cpp#L183
Only spell enum differences:
enum Kaz'rogal Mark Hellfire
{
SPELL_MARK_OF_KAZROGAL_HELLFIRE = 189512;
SPELL_MARK_OF_KAZROGAL_DAMAGE_HELLFIRE = 189515;
};
class MarkTargetFilter
{
public:
bool operator()(WorldObject* target) const
{
if (Unit* unit = target->ToUnit())
return unit->getPowerType() != POWER_MANA;
return false;
}
};
class spell_gen_mark_of_kazrogal_hellfire : public SpellScriptLoader
{
public:
spell_gen_mark_of_kazrogal_hellfire() : SpellScriptLoader("spell_gen_mark_of_kazrogal_hellfire") { }
class spell_mark_of_kazrogal_hellfire_SpellScript : public SpellScript
{
PrepareSpellScript(spell_gen_mark_of_kazrogal_hellfire_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(MarkTargetFilter());
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_gen_mark_of_kazrogal_hellfire_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_gen_mark_of_kazrogal_hellfire_AuraScript : public AuraScript
{
PrepareAuraScript(spell_gen_mark_of_kazrogal_hellfire_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_KAZROGAL_DAMAGE_HELLFIRE))
return false;
return true;
}
void OnPeriodic(AuraEffect const* aurEff)
{
Unit* target = GetTarget();
if (target->GetPower(POWER_MANA) == 0)
{
target->CastSpell(target, SPELL_MARK_OF_KAZROGAL_DAMAGE_HELLFIRE, true, NULL, aurEff);
// Remove aura
SetDuration(0);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_mark_of_kazrogal_hellfire_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_POWER_BURN);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_gen_mark_of_kazrogal_hellfire_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_gen_mark_of_kazrogal_hellfire_AuraScript();
}
};
-- spell_gen_mark_of_kazrogal_hellfire
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_gen_mark_of_kazrogal_hellfire';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(189512,'spell_gen_mark_of_kazrogal_hellfire');
Kaz'rogal SAI (not sniff timer and not combat log, but please keep for information, Anetheron and Azgalor maybe scripted in later.
-- Creating a new SmartAI script for [Creature] ENTRY 95280 (name: Kaz'rogal)
-- Table creature_template
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 95280;
-- Table smart_scripts
DELETE FROM `smart_scripts` WHERE (source_type = 0 AND entryorguid = 95280);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(95280, 0, 0, 0, 0, 0, 100, 126, 5000, 5000, 6000, 15000, 11, 189534, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Kaz\'rogal - In Combat - Cast Cleave (Dungeon & Raid) (Raid)'),
(95280, 0, 1, 0, 0, 0, 100, 126, 43000, 45000, 45000, 45000, 11, 189512, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kaz\'rogal - In Combat - Cast Mark of Kaz'rogal (Dungeon & Raid) (Raid)'),
(95280, 0, 2, 0, 0, 0, 100, 126, 15000, 15000, 60000, 60000, 11, 189504, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Kaz\'rogal - In Combat - Cast War Stomp. (Dungeon & Raid) (Raid)');
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/server/game/Spells/Auras/SpellAuraEffects.cpp and the existing boss_kazrogal.cpp implementation linked in the issue, then review the proposed spell_script_names and smart_scripts entries for creatures 95280, 95282, and 95408. Done means the three Hellfire Citadel encounters have the requested SAI and spell behavior, with the relevant scripts and database entries validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- databases, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100