Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
# Conflicts: # src/server/game/AI/CoreAI/PetAI.cpp # src/server/game/Battlegrounds/Battleground.cpp # src/server/game/Battlegrounds/Zones/BattlegroundTP.cpp # src/server/game/DungeonFinding/LFGMgr.h # src/server/game/DungeonFinding/LFGQueue.h # src/server/game/Entities/Creature/Creature.h # src/server/game/Entities/Pet/Pet.cpp # src/server/game/Entities/Player/Player.cpp # src/server/game/Entities/Player/Player.h # src/server/game/Entities/Unit/Unit.h # src/server/game/Globals/ObjectMgr.h # src/server/game/Groups/Group.cpp # src/server/game/Groups/Group.h # src/server/game/Guilds/Guild.cpp # src/server/game/Guilds/Guild.h # src/server/game/Handlers/GuildHandler.cpp # src/server/game/Handlers/LFGHandler.cpp # src/server/game/Handlers/MiscHandler.cpp # src/server/game/Handlers/NPCHandler.cpp # src/server/game/Instances/InstanceScript.cpp # src/server/game/Maps/Map.cpp # src/server/game/Maps/Map.h # src/server/game/Maps/ZoneScript.cpp # src/server/game/Server/WorldSession.cpp # src/server/game/Spells/SpellEffects.cpp # src/server/game/Weather/Weather.cpp # src/server/game/Weather/WeatherMgr.cpp # src/server/scripts/Commands/cs_reload.cpp # src/server/scripts/EasternKingdoms/Deadmines/boss_mr_smite.cpp # src/server/scripts/EasternKingdoms/Deadmines/deadmines.h # src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp # src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp # src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h # src/server/scripts/EasternKingdoms/eastern_kingdoms_script_loader.cpp # src/server/scripts/Kalimdor/VortexPinnacle/vortex_pinnacle.h # src/server/scripts/Spells/spell_dk.cpp # src/server/scripts/Spells/spell_druid.cpp # src/server/scripts/Spells/spell_generic.cpp # src/server/scripts/Spells/spell_hunter.cpp # src/server/scripts/Spells/spell_mage.cpp # src/server/scripts/Spells/spell_pet.cpp # src/server/scripts/Spells/spell_shaman.cpp # src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
commit
2cfdd3cbe0
1450 files changed
+72503
-36529
No files matched your search
@@ -21,12 +21,13 @@
|
||||
* Scriptnames of files in this file should be prefixed with "spell_dru_".
|
||||
*/
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "Containers.h"
|
||||
#include "Player.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellHistory.h"
|
||||
#include "Containers.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
enum DruidSpells
|
||||
{
|
||||
@@ -115,10 +116,7 @@ class spell_dru_eclipse : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE_TRIGGER))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_NATURES_GRACE, SPELL_DRUID_NATURES_GRACE_TRIGGER });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
@@ -389,12 +387,13 @@ class spell_dru_enrage : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_KING_OF_THE_JUNGLE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGE_MOD_DAMAGE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ENRAGED_DEFENSE)
|
||||
|| !sSpellMgr->GetSpellInfo(SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_DRUID_KING_OF_THE_JUNGLE,
|
||||
SPELL_DRUID_ENRAGE_MOD_DAMAGE,
|
||||
SPELL_DRUID_ENRAGED_DEFENSE,
|
||||
SPELL_DRUID_ITEM_T10_FERAL_4P_BONUS
|
||||
});
|
||||
}
|
||||
|
||||
void RecalculateBaseArmor()
|
||||
@@ -458,9 +457,7 @@ class spell_dru_glyph_of_innervate : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_INNERVATE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_GLYPH_OF_INNERVATE });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -472,7 +469,7 @@ class spell_dru_glyph_of_innervate : public SpellScriptLoader
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_GLYPH_OF_INNERVATE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_GLYPH_OF_INNERVATE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -500,9 +497,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_INCREASED_MOONFIRE_DURATION });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
@@ -550,15 +545,13 @@ class spell_dru_glyph_of_starfire_proc : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_STARFIRE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_GLYPH_OF_STARFIRE });
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -680,11 +673,7 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_FINAL_HEAL))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIFEBLOOM_ENERGIZE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, SPELL_DRUID_LIFEBLOOM_ENERGIZE });
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
@@ -701,15 +690,15 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
healAmount = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), healAmount, HEAL, stack);
|
||||
healAmount = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, stack);
|
||||
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
|
||||
// restore mana
|
||||
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * stack / 2;
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, aurEff, GetCasterGUID());
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* dispelInfo)
|
||||
@@ -724,15 +713,15 @@ class spell_dru_lifebloom : public SpellScriptLoader
|
||||
{
|
||||
healAmount = caster->SpellHealingBonusDone(target, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
|
||||
healAmount = target->SpellHealingBonusTaken(caster, GetSpellInfo(), healAmount, HEAL, dispelInfo->GetRemovedCharges());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
|
||||
// restore mana
|
||||
int32 returnMana = CalculatePct(caster->GetCreateMana(), GetSpellInfo()->ManaCostPercentage) * dispelInfo->GetRemovedCharges() / 2;
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
caster->CastCustomSpell(caster, SPELL_DRUID_LIFEBLOOM_ENERGIZE, &returnMana, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, NULL, NULL, true, NULL, NULL, GetCasterGUID());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_LIFEBLOOM_FINAL_HEAL, &healAmount, nullptr, nullptr, true, nullptr, nullptr, GetCasterGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -762,16 +751,14 @@ class spell_dru_living_seed : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_PROC))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIVING_SEED_PROC });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 amount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount());
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_PROC, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_PROC, SPELLVALUE_BASE_POINT0, amount, eventInfo.GetProcTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -798,15 +785,13 @@ class spell_dru_living_seed_proc : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_LIVING_SEED_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_LIVING_SEED_HEAL });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, NULL, aurEff);
|
||||
GetTarget()->CastCustomSpell(SPELL_DRUID_LIVING_SEED_HEAL, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -979,15 +964,13 @@ class spell_dru_savage_roar : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SAVAGE_ROAR))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_SAVAGE_ROAR });
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, SPELL_DRUID_SAVAGE_ROAR, true, NULL, aurEff, GetCasterGUID());
|
||||
target->CastSpell(target, SPELL_DRUID_SAVAGE_ROAR, true, nullptr, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1071,13 +1054,14 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_BAER_RANK_1) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_CAT_RANK_1) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_STAMPEDE_CAT_STATE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_FERAL_CHARGE_CAT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_DRUID_FERAL_CHARGE_BEAR))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_DRUID_STAMPEDE_BEAR_RANK_1,
|
||||
SPELL_DRUID_STAMPEDE_CAT_RANK_1,
|
||||
SPELL_DRUID_STAMPEDE_CAT_STATE,
|
||||
SPELL_DRUID_FERAL_CHARGE_CAT,
|
||||
SPELL_DRUID_FERAL_CHARGE_BEAR
|
||||
});
|
||||
}
|
||||
|
||||
void HandleEffectCatProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -1086,8 +1070,8 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
if (GetTarget()->GetShapeshiftForm() != FORM_CAT || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_CAT)
|
||||
return;
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_STAMPEDE_CAT_STATE, true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_CAT_RANK_1, GetSpellInfo()->GetRank()), true, nullptr, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_STAMPEDE_CAT_STATE, true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void HandleEffectBearProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
@@ -1096,7 +1080,7 @@ class spell_dru_stampede : public SpellScriptLoader
|
||||
if (GetTarget()->GetShapeshiftForm() != FORM_BEAR || eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_DRUID_FERAL_CHARGE_BEAR)
|
||||
return;
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BAER_RANK_1, GetSpellInfo()->GetRank()), true, NULL, aurEff);
|
||||
GetTarget()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_DRUID_STAMPEDE_BEAR_RANK_1, GetSpellInfo()->GetRank()), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1143,16 +1127,14 @@ class spell_dru_survival_instincts : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_SURVIVAL_INSTINCTS))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_DRUID_SURVIVAL_INSTINCTS });
|
||||
}
|
||||
|
||||
void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
int32 bp0 = target->CountPctFromMaxHealth(aurEff->GetAmount());
|
||||
target->CastCustomSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, &bp0, NULL, NULL, true);
|
||||
target->CastCustomSpell(target, SPELL_DRUID_SURVIVAL_INSTINCTS, &bp0, nullptr, nullptr, true);
|
||||
}
|
||||
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
Reference in new issue
Block a user