Scripts/Deadmines: corrected firewall damage and damage radius. Todo: fix vehicle position offsets.

This commit is contained in:
Ovalord
2018-02-22 22:17:05 +01:00
parent 73cc25877c
commit 4540969ac8
4 changed files with 49 additions and 4 deletions

View File

@@ -1 +1,4 @@
UPDATE `creature_template` SET `InhabitType`= 4 WHERE `entry` IN (48975, 49039, 49040, 48976, 49041, 49042);
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_glubtok_fire_wall';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(91398 ,'spell_glubtok_fire_wall');

View File

@@ -4170,6 +4170,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(2); // Combat Range
});
// Fire Wall
ApplySpellFix({ 91397 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_1_YARD);
});
// Helix Gearbreaker
// Charge
ApplySpellFix({ 88295 }, [](SpellInfo* spellInfo)

View File

@@ -408,7 +408,8 @@ enum EffectRadiusIndex
EFFECT_RADIUS_47_YARDS = 62,
EFFECT_RADIUS_23_YARDS = 63,
EFFECT_RADIUS_3_5_YARDS = 64, // 3.5 yards
EFFECT_RADIUS_80_YARDS_2 = 65
EFFECT_RADIUS_80_YARDS_2 = 65,
EFFECT_RADIUS_1_5_YARDS = 73 // 1.5 yards
};
// Spell pet auras

View File

@@ -98,7 +98,7 @@ enum Data
Position const firewallPlatterPos = { -193.4054f, -441.5011f, 54.57029f, 1.833041f };
Position const firewallPlatterSplineEndpoint = { -193.4514f, -441.0169f, 55.70924f };
Position const leftSideDistanceCheck = { -214.413f, -441.664f, 54.547f };
Position const leftSideDistanceCheck = { -210.840f, -443.449f, 61.179f };
class boss_glubtok : public CreatureScript
{
@@ -206,7 +206,7 @@ public:
{
for (auto itr = units.begin(); itr != units.end(); ++itr)
{
if ((*itr)->GetHomePosition().GetExactDist2d(leftSideDistanceCheck) <= 20.0f)
if ((*itr)->GetHomePosition().GetExactDist(leftSideDistanceCheck) <= 20.0f)
(*itr)->CastSpell((*itr), SPELL_ARCANE_FROST_BEAM);
else
(*itr)->CastSpell((*itr), SPELL_ARCANE_FIRE_BEAM);
@@ -300,7 +300,7 @@ public:
{
for (auto itr = units.begin(); itr != units.end(); ++itr)
{
if ((*itr)->GetHomePosition().GetExactDist2d(leftSideDistanceCheck) <= 20.0f)
if ((*itr)->GetHomePosition().GetExactDist(leftSideDistanceCheck) <= 20.0f)
(*itr)->CastSpell((*itr), SPELL_ARCANE_FROST_BEAM);
else
(*itr)->CastSpell((*itr), SPELL_ARCANE_FIRE_BEAM);
@@ -412,8 +412,43 @@ class spell_glubtok_blossom_targeting : public SpellScriptLoader
}
};
class spell_glubtok_fire_wall : public SpellScriptLoader
{
public:
spell_glubtok_fire_wall() : SpellScriptLoader("spell_glubtok_fire_wall") { }
class spell_glubtok_fire_wall_AuraScript : public AuraScript
{
PrepareAuraScript(spell_glubtok_fire_wall_AuraScript);
void HandlePeriodic(AuraEffect const* aurEff)
{
PreventDefaultAction();
if (Unit* caster = GetOwner()->ToUnit())
{
if (caster->GetEntry() != NPC_FIREWALL_PLATTER_1A
&& caster->GetEntry() != NPC_FIREWALL_PLATTER_1B
&& caster->GetEntry() != NPC_FIREWALL_PLATTER_1C)
caster->CastSpell(caster, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell);
}
}
void Register()
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_glubtok_fire_wall_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const
{
return new spell_glubtok_fire_wall_AuraScript();
}
};
void AddSC_boss_glubtok()
{
new boss_glubtok();
new spell_glubtok_blossom_targeting();
new spell_glubtok_fire_wall();
}