Core/Spells: Implemented spell target type 142
Port From (https://github.com/TrinityCore/TrinityCore/commit/3790c1e3dad36727279b22a33eea8e27418c4283)
This commit is contained in:
@@ -1043,7 +1043,13 @@ namespace Game.Entities
|
||||
else
|
||||
st.target_Orientation = spellInfo.GetEffect(effIndex).PositionFacing;
|
||||
|
||||
if (spellInfo.GetEffect(effIndex).TargetA.GetTarget() == Targets.DestDb || spellInfo.GetEffect(effIndex).TargetB.GetTarget() == Targets.DestDb)
|
||||
bool hasTarget(Targets target)
|
||||
{
|
||||
SpellEffectInfo spellEffectInfo = spellInfo.GetEffect(effIndex);
|
||||
return spellEffectInfo.TargetA.GetTarget() == target || spellEffectInfo.TargetB.GetTarget() == target;
|
||||
}
|
||||
|
||||
if (hasTarget(Targets.DestDb) || hasTarget(Targets.DestNearbyEntryOrDB))
|
||||
{
|
||||
var key = new KeyValuePair<uint, uint>(spellId, effIndex);
|
||||
mSpellTargetPositions[key] = st;
|
||||
|
||||
Reference in New Issue
Block a user