Scripts/Gilneas: fixed By the Skin of his Teeth quest
*added more sniffed database stuff and removed some duplicate spawns
This commit is contained in:
1 parent
a016a260a5
commit
9e3c5d5137
5 files changed
+983
-25
No files matched your search
@@ -4502,6 +4502,7 @@ class spell_gen_projectile_goods : public SpellScriptLoader
|
||||
SPELL_PROJECTILE_GOODS_4,
|
||||
});
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
uint32 spellId = 0;
|
||||
@@ -4587,6 +4588,92 @@ class spell_gen_vengeance : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum GilneasPrison
|
||||
{
|
||||
SPELL_SUMMON_RAVENOUS_WORGEN_1 = 66836,
|
||||
SPELL_SUMMON_RAVENOUS_WORGEN_2 = 66925,
|
||||
|
||||
NPC_WORGEN_RUNT = 35456,
|
||||
};
|
||||
|
||||
Position const WorgenRuntHousePos[] =
|
||||
{
|
||||
// House Roof
|
||||
{ -1729.345f, 1526.495f, 55.47962f, 6.188943f },
|
||||
{ -1709.63f, 1527.464f, 56.86086f, 3.258752f },
|
||||
{ -1717.75f, 1513.727f, 55.47941f, 4.704845f },
|
||||
{ -1724.719f, 1526.731f, 55.66177f, 6.138319f },
|
||||
{ -1713.974f, 1526.625f, 56.21981f, 3.306195f },
|
||||
{ -1718.104f, 1524.071f, 55.81641f, 4.709816f },
|
||||
{ -1718.262f, 1518.557f, 55.55954f, 4.726997f },
|
||||
// Cathdral Roof
|
||||
{ -1618.054f, 1489.644f, 68.45153f, 3.593639f },
|
||||
{ -1625.62f, 1487.033f, 71.27762f, 3.531424f },
|
||||
{ -1638.569f, 1489.736f, 68.55273f, 4.548815f },
|
||||
{ -1630.399f, 1481.66f, 71.41516f, 3.484555f },
|
||||
{ -1622.424f, 1483.882f, 67.67381f, 3.404875f },
|
||||
{ -1634.344f, 1491.3f, 70.10101f, 4.6248f },
|
||||
{ -1631.979f, 1491.585f, 71.11481f, 4.032866f },
|
||||
{ -1627.273f, 1499.689f, 68.89395f, 4.251452f },
|
||||
{ -1622.665f, 1489.818f, 71.03797f, 3.776179f },
|
||||
};
|
||||
|
||||
class spell_gen_gilneas_prison_periodic_dummy : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_gilneas_prison_periodic_dummy() : SpellScriptLoader("spell_gen_gilneas_prison_periodic_dummy") { }
|
||||
|
||||
class spell_gen_gilneas_prison_periodic_dummy_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_gilneas_prison_periodic_dummy_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_SUMMON_RAVENOUS_WORGEN_1, // House roof
|
||||
SPELL_SUMMON_RAVENOUS_WORGEN_2, // Cathedral roof
|
||||
});
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
switch (RAND(0, 1))
|
||||
{
|
||||
case 0:
|
||||
caster->CastSpell(caster, SPELL_SUMMON_RAVENOUS_WORGEN_1, true);
|
||||
for (uint8 i = 0; i < 7; i++)
|
||||
if (Creature* runt = caster->SummonCreature(NPC_WORGEN_RUNT, WorgenRuntHousePos[i]))
|
||||
runt->AI()->DoAction(i);
|
||||
break;
|
||||
case 1:
|
||||
caster->CastSpell(caster, SPELL_SUMMON_RAVENOUS_WORGEN_2, true);
|
||||
for (uint8 i = 7; i < 16; i++)
|
||||
if (Creature* runt = caster->SummonCreature(NPC_WORGEN_RUNT, WorgenRuntHousePos[i]))
|
||||
runt->AI()->DoAction(i);
|
||||
if (RAND(0, 1) == 1)
|
||||
for (uint8 i = 0; i < RAND(1, 3); i++)
|
||||
if (Creature* runt = caster->SummonCreature(NPC_WORGEN_RUNT, WorgenRuntHousePos[i]))
|
||||
runt->AI()->DoAction(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_gilneas_prison_periodic_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gen_gilneas_prison_periodic_dummy_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -4692,4 +4779,5 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_toxic_blow_dart();
|
||||
new spell_gen_projectile_goods();
|
||||
new spell_gen_vengeance();
|
||||
new spell_gen_gilneas_prison_periodic_dummy();
|
||||
}
|
||||
Reference in new issue
Block a user