Core/Spells: core now builds without scripts project, still not stable
This commit is contained in:
@@ -59,7 +59,7 @@ class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
|
||||
bool Load() override
|
||||
{
|
||||
// Max absorb stored in 1 dummy effect
|
||||
limit = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
limit = GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -207,9 +207,9 @@ class spell_gen_alchemist_stone : public SpellScriptLoader
|
||||
uint32 spellId = 0;
|
||||
int32 bp = int32(eventInfo.GetDamageInfo()->GetDamage() * 0.4f);
|
||||
|
||||
if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(SPELL_EFFECT_HEAL))
|
||||
if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(DIFFICULTY_NONE, SPELL_EFFECT_HEAL))
|
||||
spellId = ALECHEMIST_STONE_HEAL;
|
||||
else if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(SPELL_EFFECT_ENERGIZE))
|
||||
else if (eventInfo.GetDamageInfo()->GetSpellInfo()->HasEffect(DIFFICULTY_NONE, SPELL_EFFECT_ENERGIZE))
|
||||
spellId = ALECHEMIST_STONE_MANA;
|
||||
|
||||
if (!spellId)
|
||||
@@ -1180,13 +1180,14 @@ class spell_gen_defend : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_1))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_2))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_3))
|
||||
return false;
|
||||
return true;
|
||||
// 6.x effects changed
|
||||
//if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_1))
|
||||
// return false;
|
||||
//if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_2))
|
||||
// return false;
|
||||
//if (!sSpellMgr->GetSpellInfo(SPELL_VISUAL_SHIELD_3))
|
||||
// return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
void RefreshVisualShields(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1222,23 +1223,24 @@ class spell_gen_defend : public SpellScriptLoader
|
||||
{
|
||||
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
|
||||
|
||||
// 6.x effects removed
|
||||
|
||||
// Defend spells cast by NPCs (add visuals)
|
||||
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
|
||||
/*if (spell->GetEffect(EFFECT_0)->ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_gen_defend_AuraScript::RefreshVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_gen_defend_AuraScript::RemoveVisualShields, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
|
||||
}
|
||||
|
||||
}*/
|
||||
// Remove Defend spell from player when he dismounts
|
||||
if (spell->Effects[EFFECT_2].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_gen_defend_AuraScript::RemoveDummyFromDriver, EFFECT_2, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
|
||||
//if (spell->GetEffect(EFFECT_2)->ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
|
||||
// OnEffectRemove += AuraEffectRemoveFn(spell_gen_defend_AuraScript::RemoveDummyFromDriver, EFFECT_2, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
|
||||
|
||||
// Defend spells cast by players (add/remove visuals)
|
||||
if (spell->Effects[EFFECT_1].ApplyAuraName == SPELL_AURA_DUMMY)
|
||||
/*if (spell->GetEffect(EFFECT_1)->ApplyAuraName == SPELL_AURA_DUMMY)
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_gen_defend_AuraScript::RefreshVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_gen_defend_AuraScript::RemoveVisualShields, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1264,7 +1266,7 @@ class spell_gen_despawn_self : public SpellScriptLoader
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
{
|
||||
if (GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_DUMMY || GetSpellInfo()->Effects[effIndex].Effect == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
if (GetSpellInfo()->GetEffect(effIndex)->Effect == SPELL_EFFECT_DUMMY || GetSpellInfo()->GetEffect(effIndex)->Effect == SPELL_EFFECT_SCRIPT_EFFECT)
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
@@ -1945,10 +1947,10 @@ class spell_gen_mounted_charge: public SpellScriptLoader
|
||||
{
|
||||
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
|
||||
|
||||
if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
|
||||
if (spell->HasEffect(DIFFICULTY_NONE, SPELL_EFFECT_SCRIPT_EFFECT))
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
|
||||
if (spell->Effects[EFFECT_0].Effect == SPELL_EFFECT_CHARGE)
|
||||
if (spell->GetEffect(EFFECT_0)->Effect == SPELL_EFFECT_CHARGE)
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleChargeEffect, EFFECT_0, SPELL_EFFECT_CHARGE);
|
||||
}
|
||||
};
|
||||
@@ -2426,8 +2428,8 @@ class spell_gen_oracle_wolvar_reputation : public SpellScriptLoader
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
{
|
||||
Player* player = GetCaster()->ToPlayer();
|
||||
uint32 factionId = GetSpellInfo()->Effects[effIndex].CalcValue();
|
||||
int32 repChange = GetSpellInfo()->Effects[EFFECT_1].CalcValue();
|
||||
uint32 factionId = GetSpellInfo()->GetEffect(effIndex)->CalcValue();
|
||||
int32 repChange = GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue();
|
||||
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(factionId);
|
||||
if (!factionEntry)
|
||||
@@ -3845,7 +3847,7 @@ public:
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (GetCaster()->HasAura(SPELL_MIXOLOGY) && GetCaster()->HasSpell(GetSpellInfo()->Effects[EFFECT_0].TriggerSpell))
|
||||
if (GetCaster()->HasAura(SPELL_MIXOLOGY) && GetCaster()->HasSpell(GetSpellInfo()->GetEffect(EFFECT_0)->TriggerSpell))
|
||||
{
|
||||
switch (GetId())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user