mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core/Pets:
* corrected level 85 stats for Death Knight's Risen Ghoul * removed an old leftover that was causing Blood Worms to have way too much health * enabled and use Avoidance for Death Knight Ghouls used in Raise Dead and Army of the Dead
This commit is contained in:
5
sql/updates/world/custom/custom_2019_02_10_01_world.sql
Normal file
5
sql/updates/world/custom/custom_2019_02_10_01_world.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
UPDATE `pet_levelstats` SET `str`= 476, `agi`= 3343, `sta`= 546, `inte`= 69, `spi`= 116 WHERE `creature_entry`= 26125 AND `level`= 85;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_dk_avoidance_passive';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(62137, 'spell_dk_avoidance_passive');
|
||||
@@ -1080,20 +1080,24 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
break;
|
||||
}
|
||||
case ENTRY_EBON_IMP:
|
||||
{
|
||||
SetBonusDamage(int32(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE)));
|
||||
SetBonusDamage(m_owner->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_FIRE));
|
||||
break;
|
||||
}
|
||||
case ENTRY_ARMY_OF_THE_DEAD_GHOUL:
|
||||
{
|
||||
SetCreateHealth(m_owner->CountPctFromMaxHealth(50));
|
||||
SetCreateHealth(m_owner->CountPctFromMaxHealth(45));
|
||||
SetBonusDamage(int32(GetOwner()->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f));
|
||||
float minDamage = m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.05f;
|
||||
float maxDamage = m_owner->GetTotalAttackPowerValue(BASE_ATTACK) * 0.05f;
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, minDamage);
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, maxDamage);
|
||||
if (!HasAura(62137)) // Avoidance
|
||||
CastSpell(this, 62137, true);
|
||||
break;
|
||||
}
|
||||
case ENTRY_GHOUL:
|
||||
if (!HasAura(62137)) // Avoidance
|
||||
CastSpell(this, 62137, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1029,15 +1029,6 @@ void Guardian::UpdateMaxHealth()
|
||||
float stamina = GetStat(STAT_STAMINA) - GetCreateStat(STAT_STAMINA);
|
||||
float multiplicator = 10.0f;
|
||||
|
||||
switch (GetEntry())
|
||||
{
|
||||
case ENTRY_BLOODWORM:
|
||||
multiplicator = 1.0f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreateHealth();
|
||||
value *= GetModifierValue(unitMod, BASE_PCT);
|
||||
value += GetModifierValue(unitMod, TOTAL_VALUE) + stamina * multiplicator;
|
||||
|
||||
@@ -775,48 +775,37 @@ class spell_hun_pet_passive_crit : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_dk_avoidance_passive : public SpellScriptLoader
|
||||
class spell_dk_avoidance_passive : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_dk_avoidance_passive() : SpellScriptLoader("spell_dk_avoidance_passive") { }
|
||||
PrepareAuraScript(spell_dk_avoidance_passive);
|
||||
|
||||
class spell_dk_avoidance_passive_AuraScript : public AuraScript
|
||||
bool Load() override
|
||||
{
|
||||
PrepareAuraScript(spell_dk_avoidance_passive_AuraScript);
|
||||
if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
void CalculateAvoidanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
canBeRecalculated = true;
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CalculateAvoidanceAmount(AuraEffect const* /* aurEff */, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
canBeRecalculated = true;
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
if (Unit* owner = pet->GetOwner())
|
||||
{
|
||||
if (Unit* owner = pet->GetOwner())
|
||||
{
|
||||
// Army of the dead ghoul
|
||||
if (pet->GetEntry() == ENTRY_ARMY_OF_THE_DEAD_GHOUL)
|
||||
amount = -90;
|
||||
// Night of the dead
|
||||
else if (Aura* aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD))
|
||||
amount = aur->GetSpellInfo()->Effects[EFFECT_2].CalcValue();
|
||||
}
|
||||
// Army of the dead ghoul
|
||||
if (pet->GetEntry() == ENTRY_ARMY_OF_THE_DEAD_GHOUL)
|
||||
amount = -90;
|
||||
// Night of the dead
|
||||
else if (Aura* aur = owner->GetAuraOfRankedSpell(SPELL_NIGHT_OF_THE_DEAD))
|
||||
amount = aur->GetSpellInfo()->Effects[EFFECT_2].CalcValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_avoidance_passive_AuraScript::CalculateAvoidanceAmount, EFFECT_0, SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_dk_avoidance_passive_AuraScript();
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_avoidance_passive::CalculateAvoidanceAmount, EFFECT_0, SPELL_AURA_MOD_CREATURE_AOE_DAMAGE_AVOIDANCE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1174,6 +1163,7 @@ void AddSC_pet_spell_scripts()
|
||||
RegisterAuraScript(spell_hun_pet_scaling_05);
|
||||
RegisterAuraScript(spell_hun_pet_passive_crit);
|
||||
|
||||
RegisterAuraScript(spell_dk_avoidance_passive);
|
||||
RegisterAuraScript(spell_dk_pet_scaling_01);
|
||||
RegisterAuraScript(spell_dk_pet_scaling_02);
|
||||
RegisterAuraScript(spell_dk_pet_scaling_03);
|
||||
|
||||
Reference in New Issue
Block a user