Core/Creature: rename CREATURE_FLAG_EXTRA_IGNORE_COMBAT into CREATURE_FLAG_EXTRA_CANNOT_ENTER_COMBAT

Port From (https://github.com/TrinityCore/TrinityCore/commit/53d19b09f4de7c092747663ae7e1a01c0df553bf)
This commit is contained in:
hondacrx
2022-05-29 16:18:29 -04:00
parent bf6fec2eb2
commit 4de86618f3
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ namespace Framework.Constants
GhostVisibility = 0x400, // creature will only be visible to dead players GhostVisibility = 0x400, // creature will only be visible to dead players
UseOffhandAttack = 0x800, // creature will use offhand attacks UseOffhandAttack = 0x800, // creature will use offhand attacks
NoSellVendor = 0x1000, // players can't sell items to this vendor NoSellVendor = 0x1000, // players can't sell items to this vendor
IgnoreCombat = 0x2000, // creature is not allowed to enter combat CannotEnterCombat = 0x2000, // creature is not allowed to enter combat
Worldevent = 0x4000, // Custom Flag For World Event Creatures (Left Room For Merging) Worldevent = 0x4000, // Custom Flag For World Event Creatures (Left Room For Merging)
Guard = 0x8000, // Creature Is Guard Guard = 0x8000, // Creature Is Guard
IgnoreFeighDeath = 0x10000, // creature ignores feign death IgnoreFeighDeath = 0x10000, // creature ignores feign death
+2 -2
View File
@@ -57,8 +57,8 @@ namespace Game.Combat
return false; return false;
if (a.HasUnitState(UnitState.InFlight) || b.HasUnitState(UnitState.InFlight)) if (a.HasUnitState(UnitState.InFlight) || b.HasUnitState(UnitState.InFlight))
return false; return false;
// ... both units must not be ignoring combat // ... both units must be allowed to enter combat
if (a.IsIgnoringCombat() || b.IsIgnoringCombat()) if (a.IsCombatDisallowed() || b.IsCombatDisallowed())
return false; return false;
if (a.IsFriendlyTo(b) || b.IsFriendlyTo(a)) if (a.IsFriendlyTo(b) || b.IsFriendlyTo(a))
return false; return false;
+1 -1
View File
@@ -424,7 +424,7 @@ namespace Game.Entities
ApplySpellImmune(0, SpellImmunity.Effect, SpellEffectName.AttackMe, true); ApplySpellImmune(0, SpellImmunity.Effect, SpellEffectName.AttackMe, true);
} }
SetIgnoringCombat(cInfo.FlagsExtra.HasFlag(CreatureFlagsExtra.IgnoreCombat)); SetIsCombatDisallowed(cInfo.FlagsExtra.HasFlag(CreatureFlagsExtra.CannotEnterCombat));
LoadTemplateRoot(); LoadTemplateRoot();
InitializeMovementFlags(); InitializeMovementFlags();
+4 -4
View File
@@ -1530,13 +1530,13 @@ namespace Game.Entities
} }
/// <summary> /// <summary>
/// returns if the unit is ignoring any combat interaction /// returns if the unit can't enter combat
/// </summary> /// </summary>
public bool IsIgnoringCombat() { return _isIgnoringCombat; } public bool IsCombatDisallowed() { return _isCombatDisallowed; }
/// <summary> /// <summary>
/// enables/disables combat interaction of this unit. /// enables / disables combat interaction of this unit
/// </summary> /// </summary>
public void SetIgnoringCombat(bool apply) { _isIgnoringCombat = apply; } public void SetIsCombatDisallowed(bool apply) { _isCombatDisallowed = apply; }
} }
} }
+1 -1
View File
@@ -55,7 +55,7 @@ namespace Game.Entities
uint[] m_baseAttackSpeed = new uint[(int)WeaponAttackType.Max]; uint[] m_baseAttackSpeed = new uint[(int)WeaponAttackType.Max];
internal float[] m_modAttackSpeedPct = new float[(int)WeaponAttackType.Max]; internal float[] m_modAttackSpeedPct = new float[(int)WeaponAttackType.Max];
protected uint[] m_attackTimer = new uint[(int)WeaponAttackType.Max]; protected uint[] m_attackTimer = new uint[(int)WeaponAttackType.Max];
bool _isIgnoringCombat; bool _isCombatDisallowed;
// Threat+combat management // Threat+combat management
CombatManager m_combatManager; CombatManager m_combatManager;