Core/Misc: fixed startup errors introduced by recent cherry picks

This commit is contained in:
Ovahlord committed 2025-03-15 09:51:21 +01:00
1 parent 3e3212c9fe
commit ae707fa9e1
2 files changed
+63

No files matched your search

@@ -0,0 +1,7 @@
UPDATE `creature` SET `unit_flags`= `unit_flags` & ~0x8000 WHERE `guid` IN (110369, 110370, 110371, 110378, 110379, 110380, 110381, 110382, 110383, 110384, 110386, 110389, 110390, 110540, 110541, 110544, 110545, 110546, 110547, 110551, 110552, 110553, 110554);
UPDATE `creature_template` SET `flags_extra`= `flags_extra` & ~65536 WHERE `entry` IN (58862, 58863, 58864, 49975, 49981, 49987, 48940, 54056, 54057, 41841);
DELETE FROM `spell_script_names` WHERE `spell_id` IN (29266, 80636) AND `ScriptName`= 'spell_gen_feign_death_all_flags_uninteractible';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(29266, 'spell_gen_feign_death_all_flags_uninteractible'),
(80636, 'spell_gen_feign_death_all_flags_uninteractible');
@@ -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);
}