mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Items): Bloodsail Admiral's hat should despawn parrot on … (#22327)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=60244 AND `ScriptName`='spell_item_bloodsail_admiral_hat';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (60244, 'spell_item_bloodsail_admiral_hat');
|
||||
@@ -4187,6 +4187,28 @@ class spell_item_multiphase_goggles : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 60244 - Blood Parrot Despawn Aura (Item: 12185 - Bloodsail Admiral's Hat)
|
||||
enum BloodsailAdmiralHat
|
||||
{
|
||||
NPC_ADMIRAL_HAT_PARROT = 11236, // Blood Parrot
|
||||
};
|
||||
|
||||
class spell_item_bloodsail_admiral_hat : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_bloodsail_admiral_hat);
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetCaster()->ToPlayer())
|
||||
player->RemoveAllMinionsByEntry(NPC_ADMIRAL_HAT_PARROT);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_item_bloodsail_admiral_hat::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -4315,4 +4337,5 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_luffa);
|
||||
RegisterSpellScript(spell_item_spell_reflectors);
|
||||
RegisterSpellScript(spell_item_multiphase_goggles);
|
||||
RegisterSpellScript(spell_item_bloodsail_admiral_hat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user