From b630cf134ef8b04d20c08cbb7061408fa10328ec Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sun, 29 May 2022 21:00:58 -0400 Subject: [PATCH] Misc fixes --- Source/Game/AI/SmartScripts/SmartAIManager.cs | 2 +- Source/Game/Chat/Commands/WPCommands.cs | 2 +- Source/Scripts/Spells/Generic.cs | 16 +++++ Source/Scripts/Spells/Quest.cs | 58 ------------------- 4 files changed, 18 insertions(+), 60 deletions(-) diff --git a/Source/Game/AI/SmartScripts/SmartAIManager.cs b/Source/Game/AI/SmartScripts/SmartAIManager.cs index 39dc6b205..224ff2a7c 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -932,7 +932,7 @@ namespace Game.AI Log.outWarn(LogFilter.Sql, $"SmartAIMgr: {e} has unused target_param{index + 1} with value {value}, it must be 0, skipped."); } - return valid; + return true; } bool IsEventValid(SmartScriptHolder e) diff --git a/Source/Game/Chat/Commands/WPCommands.cs b/Source/Game/Chat/Commands/WPCommands.cs index 2b6be4dfe..76b78890e 100644 --- a/Source/Game/Chat/Commands/WPCommands.cs +++ b/Source/Game/Chat/Commands/WPCommands.cs @@ -693,7 +693,7 @@ namespace Game.Chat.Commands uint delay = result.Read(2); uint flag = result.Read(3); uint ev_id = result.Read(4); - uint ev_chance = result.Read(5); + uint ev_chance = result.Read(5); handler.SendSysMessage("|cff00ff00Show info: for current point: |r|cff00ffff{0}|r|cff00ff00, Path ID: |r|cff00ffff{1}|r", point, pathid); handler.SendSysMessage("|cff00ff00Show info: delay: |r|cff00ffff{0}|r", delay); diff --git a/Source/Scripts/Spells/Generic.cs b/Source/Scripts/Spells/Generic.cs index 87e089a4d..8d59cedbf 100644 --- a/Source/Scripts/Spells/Generic.cs +++ b/Source/Scripts/Spells/Generic.cs @@ -4097,6 +4097,22 @@ namespace Scripts.Spells.Generic } } + [Script] // 37751 - Submerged + class spell_gen_submerged : SpellScript + { + void HandleScript(uint eff) + { + Creature target = GetHitCreature(); + if (target != null) + target.SetStandState(UnitStandStateType.Submerged); + } + + public override void Register() + { + OnEffectHitTarget.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect)); + } + } + [Script] // 169869 - Transformation Sickness class spell_gen_decimatus_transformation_sickness : SpellScript { diff --git a/Source/Scripts/Spells/Quest.cs b/Source/Scripts/Spells/Quest.cs index 72d43f2b5..f5b29146e 100644 --- a/Source/Scripts/Spells/Quest.cs +++ b/Source/Scripts/Spells/Quest.cs @@ -762,39 +762,6 @@ namespace Scripts.Spells.Quest } } - // http://www.wowhead.com/quest=12937 Relief for the Fallen - [Script] // 55804 Healing Finished - class spell_q12937_relief_for_the_fallen : SpellScript - { - public override bool Load() - { - return GetCaster().IsTypeId(TypeId.Player); - } - - public override bool Validate(SpellInfo spellEntry) - { - return ValidateSpellInfo(SpellIds.TriggerAidOfTheEarthen); - } - - void HandleDummy(uint effIndex) - { - Player caster = GetCaster().ToPlayer(); - - Creature target = GetHitCreature(); - if (target) - { - caster.CastSpell(caster, SpellIds.TriggerAidOfTheEarthen, true); - caster.KilledMonsterCredit(CreatureIds.FallenEarthenDefender); - target.DespawnOrUnsummon(); - } - } - - public override void Register() - { - OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); - } - } - [Script] // 48917 - Who Are They: Cast from Questgiver class spell_q10041_q10040_who_are_they : SpellScript { @@ -820,31 +787,6 @@ namespace Scripts.Spells.Quest } } - [Script] // 8593 Symbol of life dummy - class spell_symbol_of_life_dummy : SpellScript - { - void HandleDummy(uint effIndex) - { - Creature target = GetHitCreature(); - if (target) - { - if (target.HasAura(SpellIds.PermanentFeignDeath)) - { - target.RemoveAurasDueToSpell(SpellIds.PermanentFeignDeath); - target.SetDynamicFlags(0); - target.SetUnitFlags2(0); - target.SetHealth(target.GetMaxHealth() / 2); - target.SetPower(PowerType.Mana, (int)(target.GetMaxPower(PowerType.Mana) * 0.75f)); - } - } - } - - public override void Register() - { - OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); - } - } - // http://www.wowhead.com/quest=12659 Scalps! [Script] // 52090 Ahunae's Knife class spell_q12659_ahunaes_knife : SpellScript