{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19518","repository_url":"https://api.github.com/repos/TrinityCore/TrinityCore","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19518/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19518/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19518/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/19518","id":225061659,"number":19518,"title":"[3.3.5/Spells] Devour Magic skipping duel check","user":{"login":"Keader","id":7120913,"avatar_url":"https://avatars1.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"labels":[{"id":36087725,"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Branch-3.3.5a","name":"Branch-3.3.5a","color":"188846","default":false},{"id":26232644,"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Core","name":"Comp-Core","color":"FF6600","default":false},{"id":401614571,"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Sub-Exploit","name":"Sub-Exploit","color":"d93f0b","default":false},{"id":6562250,"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Sub-PetMinion","name":"Sub-PetMinion","color":"e10c02","default":false},{"id":104767,"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Sub-Spells","name":"Sub-Spells","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-28T12:07:11Z","updated_at":"2017-04-28T13:53:47Z","closed_at":null,"body":"**Description:** Spell of Warlock Pet (Felhunter) Devour Magic is skipping duel check.\r\n\r\n**Current behaviour:** You can dispel a target with Devour Magic, even if target is in duel with other player.\r\n\r\n**Expected behaviour:** Spell should fail\r\n\r\n**Steps to reproduce the problem:**\r\n\r\n1. Put 2 characters in Duel\r\n2. Use Corruption in a target .add aura  47813\r\n3. With a warlock out of duel, use Devour Magic to dispel Corruption.\r\n\r\n**Branch(es):** 3.3.5\r\n\r\n**TC rev. hash/commit:** 4431a1149da7bc48ad1047fc8c6135ed02b2e77b"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/298003852","html_url":"https://github.com/TrinityCore/TrinityCore/issues/19518#issuecomment-298003852","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/19518","id":298003852,"user":{"login":"Keader","id":7120913,"avatar_url":"https://avatars1.githubusercontent.com/u/7120913?v=3","gravatar_id":"","url":"https://api.github.com/users/Keader","html_url":"https://github.com/Keader","followers_url":"https://api.github.com/users/Keader/followers","following_url":"https://api.github.com/users/Keader/following{/other_user}","gists_url":"https://api.github.com/users/Keader/gists{/gist_id}","starred_url":"https://api.github.com/users/Keader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keader/subscriptions","organizations_url":"https://api.github.com/users/Keader/orgs","repos_url":"https://api.github.com/users/Keader/repos","events_url":"https://api.github.com/users/Keader/events{/privacy}","received_events_url":"https://api.github.com/users/Keader/received_events","type":"User","site_admin":false},"created_at":"2017-04-28T13:53:47Z","updated_at":"2017-04-28T13:53:47Z","body":"Ok i have a hack for it :)\r\n\r\n```diff\r\n\r\ndiff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp\r\nindex b1c897b..b631dec 100644\r\n--- a/src/server/scripts/Spells/spell_warlock.cpp\r\n+++ b/src/server/scripts/Spells/spell_warlock.cpp\r\n@@ -1484,6 +1484,43 @@ class spell_warl_unstable_affliction : public SpellScriptLoader\r\n         }\r\n };\r\n \r\n+// -19505 - Devour Magic\r\n+class spell_warl_devour_magic : public SpellScriptLoader\r\n+{\r\n+public:\r\n+    spell_warl_devour_magic() : SpellScriptLoader(\"spell_warl_devour_magic\") { }\r\n+\r\n+    class spell_warl_devour_magic_SpellScript : public SpellScript\r\n+    {\r\n+        PrepareSpellScript(spell_warl_devour_magic_SpellScript);\r\n+\r\n+        SpellCastResult CheckExplicitTarget()\r\n+        {\r\n+            Unit* caster = GetCaster();\r\n+            if (Unit* target = GetExplTargetUnit())\r\n+            {\r\n+                if (caster->IsFriendlyTo(target) && caster->IsValidAssistTarget(target))\r\n+                    return SPELL_CAST_OK;\r\n+\r\n+                else if (caster->IsValidAttackTarget(target))\r\n+                    return SPELL_CAST_OK;\r\n+            }\r\n+\r\n+            return SPELL_FAILED_BAD_TARGETS;\r\n+        }\r\n+\r\n+        void Register() override\r\n+        {\r\n+            OnCheckCast += SpellCheckCastFn(spell_warl_devour_magic_SpellScript::CheckExplicitTarget);\r\n+        }\r\n+    };\r\n+\r\n+    SpellScript* GetSpellScript() const override\r\n+    {\r\n+        return new spell_warl_devour_magic_SpellScript();\r\n+    }\r\n+};\r\n+\r\n void AddSC_warlock_spell_scripts()\r\n {\r\n     new spell_warl_banish();\r\n@@ -1516,4 +1553,5 @@ void AddSC_warlock_spell_scripts()\r\n     new spell_warl_t4_2p_bonus<SPELL_WARLOCK_FLAMESHADOW>(\"spell_warl_t4_2p_bonus_shadow\");\r\n     new spell_warl_t4_2p_bonus<SPELL_WARLOCK_SHADOWFLAME>(\"spell_warl_t4_2p_bonus_fire\");\r\n     new spell_warl_unstable_affliction();\r\n+    new spell_warl_devour_magic();\r\n }\r\n```\r\n\r\n```sql\r\n\r\nDELETE FROM `spell_script_names` WHERE `ScriptName`='spell_warl_devour_magic';\r\nINSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES\r\n(-19505,'spell_warl_devour_magic');\r\n\r\n```\r\n\r\ni will try build TC in debug tonight, to try find the cause xd"}}
{"actor":{"display_login":"Keader"}}