refactor(Core/Spells): Implement QAston Proc System (#11079)

* .

* sql

* .

* .

* 1

* 2

* 3

* 4

* 5

* 6

* 7

* 8

* 9

* 10

* 11

* 12

* 13

* 14

* 15

* Update spell_item.cpp

* Update Unit.cpp

* 16

* 17

* 18

* 19

* 20

* 21

* Update Unit.cpp

* REVERT UltraNIX Commit

* 22

* 23

* .

* .

* .

* warrior

* warlock

* shaman rogue priest paladin mage

* spell item

* hunter

* druid

* dk

* war

* error style

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* Update rev_1647677899565690722.sql

* .

* DOND DEL ME WAD DO DO

* error 2

* .

* .

* .

* FIX

* Update SpellInfoCorrections.cpp

* Update SpellInfoCorrections.cpp

* .

* ja genau

* Update .gitignore

* .

* .

* .,

* .

* .

* .

* .

* Update Unit.cpp
This commit is contained in:
IntelligentQuantum
2022-10-02 21:09:34 +03:30
committed by GitHub
parent 5189b43a28
commit cbd3fd0967
54 changed files with 9126 additions and 5957 deletions

View File

@@ -0,0 +1,58 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "SpellMgr.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
#include "Unit.h"
enum Spells
{
SPELL_MARK_OF_MALICE_TRIGGERED = 33494
};
// 33493 - Mark of Malice
class spell_mark_of_malice : public AuraScript
{
PrepareAuraScript(spell_mark_of_malice);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_MARK_OF_MALICE_TRIGGERED });
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
// just drop charges
if (aurEff->GetBase()->GetCharges() > 1)
return;
GetTarget()->CastSpell(GetTarget(), SPELL_MARK_OF_MALICE_TRIGGERED, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_mark_of_malice::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
void AddSC_shadow_labyrinth()
{
RegisterSpellScript(spell_mark_of_malice);
}

View File

@@ -33,16 +33,17 @@ enum Texts
enum Spells
{
SPELL_SHADOW_VOLLEY = 32963,
SPELL_CLEAVE = 31779,
SPELL_THUNDERCLAP = 36706,
SPELL_VOID_BOLT = 39329,
SPELL_MARK_OF_KAZZAK = 32960,
SPELL_MARK_OF_KAZZAK_DAMAGE = 32961,
SPELL_ENRAGE = 32964,
SPELL_CAPTURE_SOUL = 32966,
SPELL_TWISTED_REFLECTION = 21063,
SPELL_BERSERK = 32965,
SPELL_SHADOW_VOLLEY = 32963,
SPELL_CLEAVE = 31779,
SPELL_THUNDERCLAP = 36706,
SPELL_VOID_BOLT = 39329,
SPELL_MARK_OF_KAZZAK = 32960,
SPELL_MARK_OF_KAZZAK_DAMAGE = 32961,
SPELL_ENRAGE = 32964,
SPELL_CAPTURE_SOUL = 32966,
SPELL_TWISTED_REFLECTION = 21063,
SPELL_TWISTED_REFLECTION_HEAL = 21064,
SPELL_BERSERK = 32965,
};
enum Events
@@ -219,8 +220,47 @@ public:
}
};
class spell_twisted_reflection : public SpellScriptLoader
{
public:
spell_twisted_reflection() : SpellScriptLoader("spell_twisted_reflection") { }
class spell_twisted_reflection_AuraScript : public AuraScript
{
PrepareAuraScript(spell_twisted_reflection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_TWISTED_REFLECTION_HEAL))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
return;
eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_TWISTED_REFLECTION_HEAL, true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_twisted_reflection_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_twisted_reflection_AuraScript();
}
};
void AddSC_boss_doomlordkazzak()
{
new boss_doomlord_kazzak();
new spell_mark_of_kazzak();
new spell_twisted_reflection();
}

View File

@@ -29,6 +29,7 @@ void AddSC_boss_ambassador_hellmaw();
void AddSC_boss_blackheart_the_inciter();
void AddSC_boss_grandmaster_vorpil();
void AddSC_boss_murmur();
void AddSC_shadow_labyrinth();
void AddSC_boss_illidan(); //Black Temple
void AddSC_boss_shade_of_akama();
void AddSC_boss_supremus();
@@ -122,6 +123,7 @@ void AddOutlandScripts()
AddSC_boss_blackheart_the_inciter();
AddSC_boss_grandmaster_vorpil();
AddSC_boss_murmur();
AddSC_shadow_labyrinth();
AddSC_boss_illidan(); //Black Temple
AddSC_boss_shade_of_akama();
AddSC_boss_supremus();