From 0c12348cc07aaf49ca988e918f9da4980e998c10 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 17 Feb 2022 09:57:10 -0500 Subject: [PATCH] Core/Spells: Implemented target 124 TARGET_UNIT_TARGET_TAP_LIST Port From (https://github.com/TrinityCore/TrinityCore/commit/f5631b713401233511c5a50b0914f5ba0051b676) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Spell.cs | 5 +++++ Source/Game/Spells/SpellInfo.cs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index c696e2d4f..74edfcaa1 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -2698,7 +2698,7 @@ namespace Framework.Constants CorpseTargetAlly = 121, UnitAreaThreatList = 122, // any unit on threat list UnitAreaTapList = 123, - Unk124 = 124, + UnitTargetTapList = 124, DestCasterGround2 = 125, Unk126 = 126, Unk127 = 127, diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 51960095b..41dbb67ed 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -1152,6 +1152,11 @@ namespace Game.Spells if (vehicleBase != null && vehicleBase.IsVehicle()) target = vehicleBase.GetVehicleKit().GetPassenger((sbyte)(targetType.GetTarget() - Targets.UnitPassenger0)); break; + case Targets.UnitTargetTapList: + Creature creatureCaster = m_caster.ToCreature(); + if (creatureCaster != null) + target = creatureCaster.GetLootRecipient(); + break; case Targets.UnitOwnCritter: { Unit unitCaster = m_caster.ToUnit(); diff --git a/Source/Game/Spells/SpellInfo.cs b/Source/Game/Spells/SpellInfo.cs index f39d15b6e..e37832fd6 100644 --- a/Source/Game/Spells/SpellInfo.cs +++ b/Source/Game/Spells/SpellInfo.cs @@ -5047,7 +5047,7 @@ namespace Game.Spells new StaticData(SpellTargetObjectTypes.Corpse, SpellTargetReferenceTypes.Target, SpellTargetSelectionCategories.Default, SpellTargetCheckTypes.Ally, SpellTargetDirectionTypes.None), // 121 TARGET_CORPSE_TARGET_ALLY new StaticData(SpellTargetObjectTypes.Unit, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Area, SpellTargetCheckTypes.Threat, SpellTargetDirectionTypes.None), // 122 TARGET_UNIT_AREA_THREAT_LIST new StaticData(SpellTargetObjectTypes.Unit, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Area, SpellTargetCheckTypes.Tap, SpellTargetDirectionTypes.None), // 123 TARGET_UNIT_AREA_TAP_LIST - new StaticData(SpellTargetObjectTypes.None, SpellTargetReferenceTypes.None, SpellTargetSelectionCategories.Nyi, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 124 + new StaticData(SpellTargetObjectTypes.Unit, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Default, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 124 TARGET_UNIT_TARGET_TAP_LIST new StaticData(SpellTargetObjectTypes.Dest, SpellTargetReferenceTypes.Caster, SpellTargetSelectionCategories.Default, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 125 TARGET_DEST_CASTER_GROUND_2 new StaticData(SpellTargetObjectTypes.None, SpellTargetReferenceTypes.None, SpellTargetSelectionCategories.Nyi, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 126 new StaticData(SpellTargetObjectTypes.None, SpellTargetReferenceTypes.None, SpellTargetSelectionCategories.Nyi, SpellTargetCheckTypes.Default, SpellTargetDirectionTypes.None), // 127