Core/Spells: Corrected effect type implicit targeting for SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION

Port From (https://github.com/TrinityCore/TrinityCore/commit/d419fe5ff4ce9d3227ddcc47cc21ed67732e3d52)
This commit is contained in:
hondacrx
2023-06-13 08:53:51 -04:00
parent e6432f8c97
commit 5b7b6c5494
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -5628,14 +5628,13 @@ namespace Game.Spells
[SpellEffectHandler(SpellEffectName.CreatePrivateConversation)]
void EffectCreatePrivateConversation()
{
if (effectHandleMode != SpellEffectHandleMode.Hit)
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
Unit unitCaster = GetUnitCasterForEffectHandlers();
if (unitCaster == null || !unitCaster.IsPlayer())
if (unitTarget.GetTypeId() != TypeId.Player)
return;
Conversation.CreateConversation((uint)effectInfo.MiscValue, unitCaster, destTarget.GetPosition(), unitCaster.GetGUID(), GetSpellInfo());
Conversation.CreateConversation((uint)effectInfo.MiscValue, unitTarget, destTarget.GetPosition(), unitTarget.GetGUID(), GetSpellInfo());
}
[SpellEffectHandler(SpellEffectName.SendChatMessage)]