Core/Spells: Removed old combo point code leftovers
Port From (https://github.com/TrinityCore/TrinityCore/commit/197d4369c894e9b088f862c7189f4fe20b4836ca)
This commit is contained in:
@@ -518,8 +518,8 @@ namespace Game.Entities
|
||||
opponent.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags2.DuelEnd);
|
||||
|
||||
// cleanup combo points
|
||||
ClearComboPoints();
|
||||
opponent.ClearComboPoints();
|
||||
SetPower(PowerType.ComboPoints, 0);
|
||||
opponent.SetPower(PowerType.ComboPoints, 0);
|
||||
|
||||
//cleanups
|
||||
SetDuelArbiter(ObjectGuid.Empty);
|
||||
|
||||
@@ -645,8 +645,8 @@ namespace Game.Entities
|
||||
|
||||
// drunken state is cleared on death
|
||||
SetDrunkValue(0);
|
||||
// lost combo points at any target (targeted combo points clear in Unit::setDeathState)
|
||||
ClearComboPoints();
|
||||
|
||||
SetPower(PowerType.ComboPoints, 0);
|
||||
|
||||
ClearResurrectRequestData();
|
||||
|
||||
@@ -723,7 +723,7 @@ namespace Game.Entities
|
||||
StopCastingCharm();
|
||||
StopCastingBindSight();
|
||||
UnsummonPetTemporaryIfAny();
|
||||
ClearComboPoints();
|
||||
SetPower(PowerType.ComboPoints, 0);
|
||||
GetSession().DoLootReleaseAll();
|
||||
m_lootRolls.Clear();
|
||||
OutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
|
||||
@@ -3343,47 +3343,6 @@ namespace Game.Entities
|
||||
return nearMembers[randTarget];
|
||||
}
|
||||
|
||||
public uint GetComboPoints() { return (uint)GetPower(PowerType.ComboPoints); }
|
||||
|
||||
public void AddComboPoints(sbyte count, Spell spell = null)
|
||||
{
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
sbyte comboPoints = (sbyte)(spell != null ? spell.m_comboPointGain : GetPower(PowerType.ComboPoints));
|
||||
|
||||
comboPoints += count;
|
||||
|
||||
if (comboPoints > 5)
|
||||
comboPoints = 5;
|
||||
else if (comboPoints < 0)
|
||||
comboPoints = 0;
|
||||
|
||||
if (!spell)
|
||||
SetPower(PowerType.ComboPoints, comboPoints);
|
||||
else
|
||||
spell.m_comboPointGain = comboPoints;
|
||||
}
|
||||
|
||||
void GainSpellComboPoints(sbyte count)
|
||||
{
|
||||
if (count == 0)
|
||||
return;
|
||||
|
||||
sbyte cp = (sbyte)GetPower(PowerType.ComboPoints);
|
||||
|
||||
cp += count;
|
||||
if (cp > 5) cp = 5;
|
||||
else if (cp < 0) cp = 0;
|
||||
|
||||
SetPower(PowerType.ComboPoints, cp);
|
||||
}
|
||||
|
||||
public void ClearComboPoints()
|
||||
{
|
||||
SetPower(PowerType.ComboPoints, 0);
|
||||
}
|
||||
|
||||
public void ClearAllReactives()
|
||||
{
|
||||
for (ReactiveType i = 0; i < ReactiveType.Max; ++i)
|
||||
|
||||
Reference in New Issue
Block a user