Merge 4feddc0e9f8e2853530276945d3f9ba4c02f0f52 into 86ee1a994c6a8e7b0ac6dc8a7e87625407b59b5e
This commit is contained in:
commit
cc52b63004
@ -0,0 +1,24 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (5357, 5358, 5359, 5360, 5361);
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5359) AND (`source_type` = 0) AND (`id` = 1);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5359, 0, 1, 0, 8, 0, 100, 0, 23359, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Shore Strider - On Spellhit \'Transmogrify!\' - Starts an attack');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5360) AND (`source_type` = 0) AND (`id` = 1);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5360, 0, 1, 0, 8, 0, 100, 0, 23359, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Deep Strider - On Spellhit \'Transmogrify!\' - Starts an attack');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5357) AND (`source_type` = 0) AND (`id` = 1);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5357, 0, 1, 0, 8, 0, 100, 0, 23359, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Land Walker - On Spellhit \'Transmogrify!\' - Starts an attack');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5361) AND (`source_type` = 0) AND (`id` = 1);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5361, 0, 1, 0, 8, 0, 100, 0, 23359, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Wave Strider - On Spellhit \'Transmogrify!\' - Starts an attack');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 5358) AND (`source_type` = 0) AND (`id` = 1);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(5358, 0, 1, 0, 8, 0, 100, 0, 23359, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Cliff Giant - On Spellhit \'Transmogrify!\' - Starts an attack');
|
||||
-- Add spell script for Transmogrify!
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=23359 AND `ScriptName`='spell_transmogrify';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(23359, 'spell_transmogrify');
|
||||
@ -52,7 +52,40 @@ class spell_gordunni_trap : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
enum ZAPPED_GIANTS
|
||||
{
|
||||
NPC_SHORE_STRIDER = 5359,
|
||||
NPC_DEEP_STRIDER = 5360,
|
||||
NPC_LAND_WALKER = 5357,
|
||||
NPC_WAVE_STRIDER = 5361,
|
||||
NPC_CLIFF_GIANT = 5358
|
||||
};
|
||||
|
||||
class spell_transmogrify : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_transmogrify);
|
||||
|
||||
SpellCastResult CheckTarget()
|
||||
{
|
||||
Unit* target = GetExplTargetUnit();
|
||||
|
||||
std::unordered_set<uint32> validCreatureIds = { NPC_SHORE_STRIDER, NPC_DEEP_STRIDER, NPC_LAND_WALKER, NPC_WAVE_STRIDER, NPC_CLIFF_GIANT };
|
||||
|
||||
// Validate the target
|
||||
if (!target || !validCreatureIds.contains(target->GetEntry()))
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_transmogrify::CheckTarget);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_feralas()
|
||||
{
|
||||
RegisterSpellScript(spell_gordunni_trap);
|
||||
RegisterSpellScript(spell_transmogrify);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user