mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 06:59:46 -04:00
Core/Spells: Fix Soul Preserver trinket
This commit is contained in:
@@ -17299,7 +17299,8 @@ INSERT INTO `spell_dbc` (`Id`,`Dispel`,`Mechanic`,`Attributes`,`AttributesEx`,`A
|
|||||||
(60937, 0, 0, 562036736, 32, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Seaforium charges damaging wall achievement credit'),
|
(60937, 0, 0, 562036736, 32, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 101, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Seaforium charges damaging wall achievement credit'),
|
||||||
(62791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'XT-002 Heart Overload Trigger Spell'),
|
(62791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'XT-002 Heart Overload Trigger Spell'),
|
||||||
(65037, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerf the Scrapbots Achievement Criteria Marker'),
|
(65037, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Nerf the Scrapbots Achievement Criteria Marker'),
|
||||||
(65074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 30, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Freya Achievement spell - Criteria Marker);
|
(65074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 30, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Freya Achievement spell - Criteria Marker),
|
||||||
|
(18350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Soul Preserver trinket spell');
|
||||||
/*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `spell_dbc` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
|||||||
@@ -2001,6 +2001,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
|||||||
(66666, 'spell_gen_vehicle_scaling'),
|
(66666, 'spell_gen_vehicle_scaling'),
|
||||||
(66667, 'spell_gen_vehicle_scaling'),
|
(66667, 'spell_gen_vehicle_scaling'),
|
||||||
(66668, 'spell_gen_vehicle_scaling'),
|
(66668, 'spell_gen_vehicle_scaling'),
|
||||||
|
(18350, 'spell_gen_soul_preserver'),
|
||||||
-- instances
|
-- instances
|
||||||
-- Black Temple
|
-- Black Temple
|
||||||
( 41475, 'spell_boss_lady_malande_shield'),
|
( 41475, 'spell_boss_lady_malande_shield'),
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
DELETE FROM `spell_dbc` WHERE `id`=18350;
|
||||||
|
INSERT INTO `spell_dbc` (`id`,`Effect1`,`EffectImplicitTargetA1`,`Comment`) VALUES
|
||||||
|
(18350,3,1,'Soul Preserver trinket spell');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id`=18350;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(18350,'spell_gen_soul_preserver');
|
||||||
@@ -1206,6 +1206,62 @@ class spell_gen_launch : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_gen_soul_preserver : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
HEALING_TRANCE_DRUID = 60512,
|
||||||
|
HEALING_TRANCE_PALADIN = 60513,
|
||||||
|
HEALING_TRANCE_PRIEST = 60514,
|
||||||
|
HEALING_TRANCE_SHAMAN = 60515,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
spell_gen_soul_preserver() : SpellScriptLoader("spell_gen_soul_preserver") { }
|
||||||
|
|
||||||
|
class spell_gen_soul_preserver_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_gen_soul_preserver_SpellScript);
|
||||||
|
|
||||||
|
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
uint32 triggeredSpell = 0;
|
||||||
|
Player* caster = GetCaster()->ToPlayer();
|
||||||
|
if (!caster)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (caster->getClass())
|
||||||
|
{
|
||||||
|
case CLASS_DRUID:
|
||||||
|
triggeredSpell = HEALING_TRANCE_DRUID;
|
||||||
|
break;
|
||||||
|
case CLASS_PALADIN:
|
||||||
|
triggeredSpell = HEALING_TRANCE_PALADIN;
|
||||||
|
break;
|
||||||
|
case CLASS_PRIEST:
|
||||||
|
triggeredSpell = HEALING_TRANCE_PRIEST;
|
||||||
|
break;
|
||||||
|
case CLASS_SHAMAN:
|
||||||
|
triggeredSpell = HEALING_TRANCE_SHAMAN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triggeredSpell)
|
||||||
|
caster->CastSpell(caster, triggeredSpell, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnEffect += SpellEffectFn(spell_gen_soul_preserver_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_gen_soul_preserver_SpellScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class spell_gen_vehicle_scaling : public SpellScriptLoader
|
class spell_gen_vehicle_scaling : public SpellScriptLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -1286,5 +1342,6 @@ void AddSC_generic_spell_scripts()
|
|||||||
new spell_gen_magic_rooster();
|
new spell_gen_magic_rooster();
|
||||||
new spell_gen_allow_cast_from_item_only();
|
new spell_gen_allow_cast_from_item_only();
|
||||||
new spell_gen_launch();
|
new spell_gen_launch();
|
||||||
|
new spell_gen_soul_preserver();
|
||||||
new spell_gen_vehicle_scaling();
|
new spell_gen_vehicle_scaling();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user