From 655051c3f935b9537f29df45e965b26f29bcd590 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 4 Mar 2021 16:08:51 -0500 Subject: [PATCH] Core/Spells: Implemented SPELL_EFFECT_PLAY_SCENE_SCRIPT_PACKAGE and SPELL_EFFECT_CREATE_PRIVATE_CONVERSATION Port From (https://github.com/TrinityCore/TrinityCore/commit/34768c5b440a03a817a36007e82c0e4859120235) --- Source/Game/Spells/SpellEffects.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 6d1c69068..1e18699c7 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -5573,6 +5573,18 @@ namespace Game.Spells } } + [SpellEffectHandler(SpellEffectName.PlaySceneScriptPackage)] + void EffectPlaySceneScriptPackage(uint effIndex) + { + if (effectHandleMode != SpellEffectHandleMode.Hit) + return; + + if (!m_caster.IsTypeId(TypeId.Player)) + return; + + m_caster.ToPlayer().GetSceneMgr().PlaySceneByPackageId((uint)effectInfo.MiscValue, SceneFlags.Unk1, destTarget); + } + [SpellEffectHandler(SpellEffectName.PlayScene)] void EffectPlayScene(uint effIndex) { @@ -5655,6 +5667,18 @@ namespace Game.Spells azeriteItem.SetEssenceRank((uint)effectInfo.MiscValue, (uint)effectInfo.MiscValueB); azeriteItem.SetState(ItemUpdateState.Changed, playerTarget); } + + [SpellEffectHandler(SpellEffectName.CreatePrivateConversation)] + void EffectCreatePrivateConversation(uint effIndex) + { + if (effectHandleMode != SpellEffectHandleMode.Hit) + return; + + if (!unitTarget || !unitTarget.IsTypeId(TypeId.Player)) + return; + + Conversation.CreateConversation((uint)effectInfo.MiscValue, GetCaster(), unitTarget.GetPosition(), new List() { unitTarget.GetGUID() }, GetSpellInfo()); + } } public class DispelableAura