Core/Spells: Fixed spell channel object selection

Port From (https://github.com/TrinityCore/TrinityCore/commit/9619f7c2832c550d4606410a8cdbde5ee54c761d)
This commit is contained in:
hondacrx
2021-04-14 10:30:02 -04:00
parent 8631aebaf5
commit 7ef7bb1728
2 changed files with 34 additions and 3 deletions
+7
View File
@@ -2428,6 +2428,13 @@ namespace Game.Entities
public void SetChannelObject(int slot, ObjectGuid guid) { SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.ChannelObjects, slot), guid); }
public void ClearChannelObjects() { ClearDynamicUpdateFieldValues(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.ChannelObjects)); }
public void RemoveChannelObject(ObjectGuid guid)
{
int index = m_unitData.ChannelObjects.FindIndex(guid);
if (index >= 0)
RemoveDynamicUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.ChannelObjects), index);
}
public bool IsDamageReducedByArmor(SpellSchoolMask schoolMask, SpellInfo spellInfo = null, sbyte effIndex = -1)
{
// only physical spells damage gets reduced by armor