private static bool SoulPrisonUsed(GameObject go, Character user) { var nearest = go.GetNearbyNPC(NPCId.UnworthyInitiateAnchor, 2); if (nearest == null) return false; var shackled = nearest.ChannelObject as NPC; if (shackled == null) return false; var transformSpellId = GetTransformSpellIdFor(shackled.DisplayId); //just clear all auras! uh oh...not shackled.Auras.Clear(); shackled.IsInvulnerable = false; go.Flags = GameObjectFlags.None; shackled.StandState = StandState.Stand; shackled.Emote(EmoteType.SimpleTalk); shackled.Say("They brand me unworthy? I will show them unworthy!"); shackled.Spells.Clear(); shackled.Spells.AddSpell( SpellId.ClassSkillPlagueStrikeRank1_2, SpellId.ClassSkillIcyTouchRank1_2, SpellId.ClassSkillBloodStrikeRank1_2, SpellId.ClassSkillDeathCoil, SpellId.ClassSkillDeathCoilRank1_3); shackled.CallDelayed(3000, wObj => ((NPC)wObj).MoveInFrontThenExecute(go, npc => { npc.Emote(EmoteType.SimpleLoot); npc.CallDelayed(4000, obj => { obj.SpellCast.TriggerSelf(SpellId.DeathKnightInitiateVisual); obj.SpellCast.TriggerSelf(transformSpellId); ((NPC) obj).VirtualItem1 = ItemId.RunedSoulblade; obj.FactionId = FactionId.ActorEvil; }); npc.CallDelayed(7000, obj => { ((NPC)obj).Emote(EmoteType.SimplePointNosheathe); obj.Say("To battle!"); }); npc.CallDelayed(9000, obj => { ((NPC)obj).ThreatCollection[user] += 10000; ((NPC)obj).UnitFlags &= ~UnitFlags.SelectableNotAttackable; ((NPC)obj).UnitFlags &= ~UnitFlags.NotAttackable; ((NPC) obj).Target = user; ((NPC)obj).Brain.State = BrainState.Combat; }); })); return true; }