Core/Misc: fixed startup errors introduced by recent cherry picks
This commit is contained in:
1 parent
3e3212c9fe
commit
ae707fa9e1
2 files changed
+63
No files matched your search
@@ -1748,6 +1748,7 @@ and UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT. Some auras can apply only 2 flags
|
||||
|
||||
spell_gen_feign_death_all_flags applies all 3 flags
|
||||
spell_gen_feign_death_all_flags_uninteractible applies all 3 flags and additionally sets UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_UNINTERACTIBLE
|
||||
spell_gen_feign_death_all_flags_no_uninteractible applies all 3 flags and additionally sets UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC
|
||||
spell_gen_feign_death_no_dyn_flag applies no UNIT_DYNFLAG_DEAD (does not make the creature appear dead)
|
||||
spell_gen_feign_death_no_prevent_emotes applies no UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
|
||||
|
||||
@@ -1818,6 +1819,38 @@ class spell_gen_feign_death_all_flags_uninteractible : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 96733 - Permanent Feign Death (Stun)
|
||||
class spell_gen_feign_death_all_flags_no_uninteractible : public AuraScript
|
||||
{
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG2_FEIGN_DEATH);
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
target->SetImmuneToAll(true);
|
||||
|
||||
if (Creature* creature = target->ToCreature())
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG2_FEIGN_DEATH);
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
target->SetImmuneToAll(false);
|
||||
|
||||
if (Creature* creature = target->ToCreature())
|
||||
creature->InitializeReactState();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply.Register(&spell_gen_feign_death_all_flags_no_uninteractible::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove.Register(&spell_gen_feign_death_all_flags_no_uninteractible::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 35357 - Spawn Feign Death
|
||||
// 51329 - Feign Death
|
||||
class spell_gen_feign_death_no_dyn_flag : public AuraScript
|
||||
@@ -2601,6 +2634,27 @@ class spell_gen_paralytic_poison : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_prevent_emotes : public AuraScript
|
||||
{
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply.Register(&spell_gen_prevent_emotes::HandleEffectApply, SpellEffIndex(EFFECT_FIRST_FOUND), SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove.Register(&spell_gen_prevent_emotes::OnRemove, SpellEffIndex(EFFECT_FIRST_FOUND), SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_proc_below_pct_damaged : public AuraScript
|
||||
{
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
@@ -5336,6 +5390,7 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_flurry_of_claws);
|
||||
RegisterSpellScript(spell_gen_feign_death_all_flags);
|
||||
RegisterSpellScript(spell_gen_feign_death_all_flags_uninteractible);
|
||||
RegisterSpellScript(spell_gen_feign_death_all_flags_no_uninteractible);
|
||||
RegisterSpellScript(spell_gen_feign_death_no_dyn_flag);
|
||||
RegisterSpellScript(spell_gen_feign_death_no_prevent_emotes);
|
||||
new spell_gen_gadgetzan_transporter_backfire();
|
||||
@@ -5438,4 +5493,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_shadowmeld);
|
||||
RegisterSpellScript(spell_gen_vehicle_control_link);
|
||||
RegisterSpellScript(spell_gen_polymorph_cast_visual);
|
||||
RegisterSpellScript(spell_gen_prevent_emotes);
|
||||
}
|
||||
Reference in new issue
Block a user