mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Scripts/Item): Multiphase Goggles not showing disturbances on minimap (#20446)
* fix(Scripts/Item): Multiphase Goggles not showing disturbances on mimimap * Apply suggestions from code review
This commit is contained in:
@@ -4162,6 +4162,30 @@ class spell_item_spell_reflectors: public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 46273 - Multiphase Goggles
|
||||
class spell_item_multiphase_goggles : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_multiphase_goggles);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
player->SetFlag(PLAYER_TRACK_CREATURES, uint32(1) << (CREATURE_TYPE_GAS_CLOUD - 1));
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
player->RemoveFlag(PLAYER_TRACK_CREATURES, uint32(1) << (CREATURE_TYPE_GAS_CLOUD - 1));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_item_multiphase_goggles::OnApply, EFFECT_0, SPELL_AURA_MOD_INVISIBILITY_DETECT , AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_item_multiphase_goggles::OnRemove, EFFECT_0, SPELL_AURA_MOD_INVISIBILITY_DETECT , AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_item_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_item_massive_seaforium_charge);
|
||||
@@ -4289,4 +4313,5 @@ void AddSC_item_spell_scripts()
|
||||
RegisterSpellScript(spell_item_skyguard_blasting_charges);
|
||||
RegisterSpellScript(spell_item_luffa);
|
||||
RegisterSpellScript(spell_item_spell_reflectors);
|
||||
RegisterSpellScript(spell_item_multiphase_goggles);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user