Core/Creatures: Various fixes for creatures, regarding combat conditions, despawning, and few others (#18998)
* Made some changes to kiting mechanics, simplified code and made taunt auras prolong combat no matter the distance from the spawn Unified some creature despawning code, removed some brutal direct calls in scripts Don't play death anim on forced despawn Removed some redundant visibility changes on creature despawn Fixed possible problem with pet initializing template info from difficulty greater than normal Properly keep UNIT_FLAG_IN_COMBAT on UpdateEntry call Moved RegenerateMana function to general Regenerate(Power) function Fixed increased health regeneration from polymorph for pets Implemented CREATURE_TYPE_FLAG_GHOST_VISIBLE, those creatures will be properly seen when player is dead also Removed hackfix from Gaeriyan and Franclorn Forgewright, fixed properly Simplified ForcedRespawnTime code in ForcedDespawn Do not allow to assist unit while evading or when enemy is evading Do not allow to attack other units when evading or when the unit is evading Corrected distance checking code before creature is allowed to evade, should fix some common problems Properly return summon position for summoned creatures as their respawn position Properly stop all moving units on gossip hello, no matter their npc flags (cherry picked from commit e1f14215d86fc9f0cd041f0e87bf0a689c086329)
This commit is contained in:
1 parent
5a2cdf2d68
commit
f431459063
28 files changed
+150
-115
No files matched your search
@@ -4265,6 +4265,40 @@ class spell_gen_pony_mount_check : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_shroud_of_death : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_shroud_of_death() : SpellScriptLoader("spell_gen_shroud_of_death") { }
|
||||
|
||||
class spell_gen_shroud_of_death_AuraScript : public AuraScript
|
||||
{
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetUnitOwner()->m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||
GetUnitOwner()->m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_GHOST);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetUnitOwner()->m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
|
||||
GetUnitOwner()->m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply.Register(&spell_gen_shroud_of_death_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove.Register(&spell_gen_shroud_of_death_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_gen_shroud_of_death_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum ArmorSpecializationSpells
|
||||
{
|
||||
// Warrior
|
||||
@@ -5524,6 +5558,7 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_landmine_knockback_achievement();
|
||||
new spell_gen_clear_debuffs();
|
||||
new spell_gen_pony_mount_check();
|
||||
new spell_gen_shroud_of_death();
|
||||
new spell_gen_armor_specialization();
|
||||
new spell_gen_pvp_trinket();
|
||||
new spell_gen_blink();
|
||||
|
||||
Reference in new issue
Block a user