Core/Scripts: Implemented new aura script hook OnEnterLeaveCombat

Port From (https://github.com/TrinityCore/TrinityCore/commit/2420f4e7a10c430ea28b2d71a17f54da0c244a54)
This commit is contained in:
hondacrx
2021-03-29 12:29:41 -04:00
parent 6977599b1b
commit e8959b884e
6 changed files with 55 additions and 5 deletions
+1 -1
View File
@@ -2210,7 +2210,7 @@ namespace Game.Entities
stmt.AddValue(index++, GetStat((Stats)i));
for (int i = 0; i < (int)SpellSchools.Max; ++i)
stmt.AddValue(index++, GetResistance((SpellSchools)i)));
stmt.AddValue(index++, GetResistance((SpellSchools)i));
stmt.AddValue(index++, (float)m_activePlayerData.BlockPercentage);
stmt.AddValue(index++, (float)m_activePlayerData.DodgePercentage);
+3 -1
View File
@@ -3912,8 +3912,10 @@ namespace Game.Entities
public static bool IsValidClass(Class _class) { return Convert.ToBoolean((1 << ((int)_class - 1)) & (int)Class.ClassMaskAllPlayable); }
public static bool IsValidRace(Race _race) { return Convert.ToBoolean((ulong)SharedConst.GetMaskForRace(_race) & SharedConst.RaceMaskAllPlayable); }
public void OnCombatExit()
public override void OnCombatExit()
{
base.OnCombatExit();
UpdatePotionCooldown();
m_combatExitTime = Time.GetMSTime();
}