DB/Creature: Get rid of more Feign Death flags

Ref #25764
This commit is contained in:
offl
2021-08-22 19:18:54 +03:00
parent a0aa9730e2
commit 354a45b09d
2 changed files with 44 additions and 37 deletions

View File

@@ -816,7 +816,6 @@ class npc_wild_wyrm : public CreatureScript
me->RemoveAurasDueToSpell(SPELL_JAWS_OF_DEATH_PERIODIC);
me->RemoveAurasDueToSpell(SPELL_PRY_JAWS_OPEN);
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
me->GetMotionMaster()->MoveFall(POINT_FALL);
@@ -1344,41 +1343,6 @@ class spell_fatal_strike : public SpellScriptLoader
}
};
// 55795 - Falling Dragon Feign Death
class spell_falling_dragon_feign_death : public SpellScriptLoader
{
public:
spell_falling_dragon_feign_death() : SpellScriptLoader("spell_falling_dragon_feign_death") { }
class spell_falling_dragon_feign_death_AuraScript : public AuraScript
{
PrepareAuraScript(spell_falling_dragon_feign_death_AuraScript);
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
GetTarget()->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
GetTarget()->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_falling_dragon_feign_death_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectApplyFn(spell_falling_dragon_feign_death_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_falling_dragon_feign_death_AuraScript();
}
};
// 56672 - Player Mount Wyrm
class spell_player_mount_wyrm : public SpellScriptLoader
{
@@ -1459,7 +1423,6 @@ void AddSC_storm_peaks()
new spell_jaws_of_death_claw_swipe_pct_damage();
new spell_claw_swipe_check();
new spell_fatal_strike();
new spell_falling_dragon_feign_death();
new spell_player_mount_wyrm();
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
}