Core/Spells: Expose number of targets selected for each spell effect to scripts to allow implementing spells that do something depending on number of targets hit
Port From (https://github.com/TrinityCore/TrinityCore/commit/1a7779a6e6464d9bc5b367e02820213edd60f704)
This commit is contained in:
@@ -153,11 +153,11 @@ namespace Game.Spells
|
||||
// Meteor like spells (divided damage to targets)
|
||||
if (m_spellInfo.HasAttribute(SpellCustomAttributes.ShareDamage))
|
||||
{
|
||||
int count = m_UniqueTargetInfo.Count(targetInfo => Convert.ToBoolean(targetInfo.effectMask & (1 << (int)effIndex)));
|
||||
long count = GetUnitTargetCountForEffect(effIndex);
|
||||
|
||||
// divide to all targets
|
||||
if (count != 0)
|
||||
damage /= count;
|
||||
damage /= (int)count;
|
||||
}
|
||||
|
||||
switch (m_spellInfo.SpellFamilyName)
|
||||
|
||||
Reference in New Issue
Block a user