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)]
+1 -1
View File
@@ -4783,7 +4783,7 @@ namespace Game.Spells
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 264 SPELL_EFFECT_REMOVE_GEM
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 265 SPELL_EFFECT_LEARN_AZERITE_ESSENCE_POWER
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 266 SPELL_EFFECT_SET_ITEM_BONUS_LIST_GROUP_ENTRY
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 267 SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION
new StaticData(SpellEffectImplicitTargetTypes.Caster, SpellTargetObjectTypes.Unit), // 267 SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 268 SPELL_EFFECT_APPLY_MOUNT_EQUIPMENT
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 269 SPELL_EFFECT_INCREASE_ITEM_BONUS_LIST_GROUP_STEP
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 270 SPELL_EFFECT_270