Core/Units: Replace UNIT_DYNFLAG_DEAD with UNIT_FLAG3_FAKE_DEAD

Port From (https://github.com/TrinityCore/TrinityCore/commit/ed93a9706842ff5419279d4b2c473943e6ef2549)
This commit is contained in:
hondacrx
2022-07-16 19:35:19 -04:00
parent edb8765f3f
commit 8258d517cf
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -578,7 +578,7 @@ namespace Framework.Constants
TrackUnit = 0x08,
Tapped = 0x10, // Lua_UnitIsTapped
SpecialInfo = 0x20,
Dead = 0x40,
Unused = 0x40, // previously UNIT_DYNFLAG_DEAD
ReferAFriend = 0x80
}
}
+2 -2
View File
@@ -1706,7 +1706,7 @@ namespace Game.Spells
target.SetUnitFlag(UnitFlags.PreventEmotesFromChatText);
target.SetUnitFlag2(UnitFlags2.FeignDeath);
target.SetDynamicFlag(UnitDynFlags.Dead);
target.SetUnitFlag3(UnitFlags3.FakeDead);
target.AddUnitState(UnitState.Died);
Creature creature = target.ToCreature();
@@ -1717,7 +1717,7 @@ namespace Game.Spells
{
target.RemoveUnitFlag(UnitFlags.PreventEmotesFromChatText);
target.RemoveUnitFlag2(UnitFlags2.FeignDeath);
target.RemoveDynamicFlag(UnitDynFlags.Dead);
target.RemoveUnitFlag3(UnitFlags3.FakeDead);
target.ClearUnitState(UnitState.Died);
Creature creature = target.ToCreature();
+4 -4
View File
@@ -1848,7 +1848,7 @@ namespace Scripts.Spells.Generic
void HandleEffectApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.SetDynamicFlag(UnitDynFlags.Dead);
target.SetUnitFlag3(UnitFlags3.FakeDead);
target.SetUnitFlag2(UnitFlags2.FeignDeath);
target.SetUnitFlag(UnitFlags.PreventEmotesFromChatText);
@@ -1860,7 +1860,7 @@ namespace Scripts.Spells.Generic
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.RemoveDynamicFlag(UnitDynFlags.Dead);
target.RemoveUnitFlag3(UnitFlags3.FakeDead);
target.RemoveUnitFlag2(UnitFlags2.FeignDeath);
target.RemoveUnitFlag(UnitFlags.PreventEmotesFromChatText);
@@ -1915,7 +1915,7 @@ namespace Scripts.Spells.Generic
void HandleEffectApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.SetDynamicFlag(UnitDynFlags.Dead);
target.SetUnitFlag3(UnitFlags3.FakeDead);
target.SetUnitFlag2(UnitFlags2.FeignDeath);
Creature creature = target.ToCreature();
@@ -1926,7 +1926,7 @@ namespace Scripts.Spells.Generic
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.RemoveDynamicFlag(UnitDynFlags.Dead);
target.RemoveUnitFlag3(UnitFlags3.FakeDead);
target.RemoveUnitFlag2(UnitFlags2.FeignDeath);
Creature creature = target.ToCreature();
+1 -1
View File
@@ -1151,7 +1151,7 @@ namespace Scripts.Spells.Quest
void HandleApply(AuraEffect aurEff, AuraEffectHandleModes mode)
{
Unit target = GetTarget();
target.SetDynamicFlag(UnitDynFlags.Dead);
target.SetUnitFlag3(UnitFlags3.FakeDead);
target.SetUnitFlag2(UnitFlags2.FeignDeath);
Creature creature = target.ToCreature();
+1 -1
View File
@@ -1059,7 +1059,7 @@ namespace Scripts.World.NpcSpecial
me.RemoveUnitFlag(UnitFlags.InCombat);
me.SetUnitFlag(UnitFlags.Uninteractible);
me.SetDeathState(DeathState.JustDied);
me.SetDynamicFlag(UnitDynFlags.Dead);
me.SetUnitFlag3(UnitFlags3.FakeDead);
if (!DoctorGUID.IsEmpty())
{