{"action":"created","comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/69765045","id":69765045,"diff_hunk":"@@ -0,0 +1,1250 @@\n+/*\n+ * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>\n+ *\n+ * This program is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU General Public License as published by the\n+ * Free Software Foundation; either version 2 of the License, or (at your\n+ * option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n+ * more details.\n+ *\n+ * You should have received a copy of the GNU General Public License along\n+ * with this program. If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+#include \"ScriptMgr.h\"\n+#include \"ScriptedCreature.h\"\n+#include \"PassiveAI.h\"\n+#include \"SpellScript.h\"\n+#include \"SpellAuraEffects.h\"\n+#include \"firelands.h\"\n+\n+enum Spells\n+{\n+    // Baleroc Trash\n+    SPELL_FLAME_TORRENT             = 100795,\n+    SPELL_FIERY_TORMENT             = 100797,\n+    SPELL_FIERY_TORMENT_DAMAGE      = 100802,\n+    SPELL_EARTHQUAKE                = 100724,\n+    SPELL_MAGMA_CONDUIT             = 100728,\n+    SPELL_ERUPTION                  = 100755,\n+    SPELL_SUMMON_MAGMAKIN           = 100746,\n+\n+    // Baleroc\n+    //SPELL_LEASH                   = 101514, // Server-side, used to keep him in his encounter area? TrinityCore does not need a spell to handle this\n+    SPELL_BLADES_OF_BALEROC         = 99342,\n+    SPELL_INFERNO_BLADE             = 99350,\n+    SPELL_INFERNO_STRIKE            = 99351,\n+    SPELL_DECIMATION_BLADE          = 99352,\n+    SPELL_DECIMATION_BLADE_2        = 99405,\n+    SPELL_DECIMATING_STRIKE         = 99353,\n+    SPELL_BLAZE_OF_GLORY            = 99252,\n+    SPELL_INCENDIARY_SOUL           = 99369,\n+    SPELL_SHARDS_OF_TORMENT         = 99259,\n+    SPELL_SHARDS_OF_TORMENT_SUMMON  = 99260,\n+    SPELL_TORMENT_PRE_VISUAL        = 99258,\n+    SPELL_TORMENT_ACTIVE            = 99254,\n+    SPELL_TORMENT_PERIODIC          = 99255,\n+    SPELL_WAVE_OF_TORMENT           = 99261,\n+    SPELL_TORMENTED                 = 99257,\n+    SPELL_TORMENT                   = 99256,\n+    SPELL_COUNTDOWN                 = 99515,\n+    SPELL_COUNTDOWN_AURA            = 99516,\n+    SPELL_COUNTDOWN_3               = 99517,\n+    SPELL_COUNTDOWN_AOE_EXPLOSION   = 99518,\n+    SPELL_COUNTDOWN_VISUAL_LINK     = 99519,\n+    SPELL_VITAL_SPARK               = 99262,\n+    SPELL_VITAL_FLAME               = 99263,\n+    SPELL_BERSERK                   = 26662,\n+};\n+\n+enum Emotes\n+{\n+    SAY_AGGRO                       = 0,\n+    SAY_SHARDS_OF_TORMENT           = 1,\n+    SAY_INFERNO_BLADE               = 2,\n+    SAY_DECIMATION_BLADE            = 3,\n+    SAY_KILL                        = 4,\n+    SAY_DEATH                       = 5,\n+    SAY_ENRAGE                      = 6,\n+    EMOTE_ENRAGE                    = 7,\n+    EMOTE_DECIMATION_BLADE          = 8,\n+    EMOTE_INFERNO_BLADE             = 9,\n+};\n+\n+enum Guids\n+{\n+    GUID_TORMENTED                  = 1,\n+};\n+\n+enum Misc\n+{\n+    EQUIP_DEFAULT                   = 1,\n+    EQUIP_INFERNO_BLADE             = 2,\n+    EQUIP_DECIMATION_BLADE          = 3,\n+};\n+\n+enum Phases\n+{\n+    PHASE_NONE,\n+    PHASE_ONE\n+};\n+\n+// http://www.wowhead.com/npc=54161/flame-archon\n+class npc_firelands_flame_archon : public CreatureScript\n+{\n+    public:\n+        npc_firelands_flame_archon() : CreatureScript(\"npc_firelands_flame_archon\") { }\n+\n+        struct npc_firelands_flame_archonAI : public ScriptedAI\n+        {\n+            npc_firelands_flame_archonAI(Creature* creature) : ScriptedAI(creature)\n+            {\n+                scheduler.SetValidator([this]\n+                {\n+                    return !me->HasUnitState(UNIT_STATE_CASTING);\n+                });\n+            }\n+\n+            void EnterCombat(Unit* attacker) override\n+            {\n+                scheduler.Schedule(Seconds(10), Seconds(12), [this](TaskContext context)\n+                {\n+                    DoCastAOE(SPELL_FLAME_TORRENT);\n+                    context.Repeat(Seconds(15), Seconds(17));\n+                });\n+                scheduler.Schedule(Seconds(25), [this](TaskContext context)\n+                {\n+                    DoCastAOE(SPELL_FIERY_TORMENT);\n+                    context.Repeat(Seconds(45));\n+                });\n+            }\n+\n+            void JustDied(Unit* killer) override\n+            {\n+                scheduler.CancelAll();\n+                ScriptedAI::JustDied(killer);\n+            }\n+\n+            void EnterEvadeMode(EvadeReason why) override\n+            {\n+                scheduler.CancelAll();\n+                ScriptedAI::EnterEvadeMode(why);\n+            }\n+\n+            void UpdateAI(uint32 diff) override\n+            {\n+                if (!UpdateVictim())\n+                    return;\n+\n+                scheduler.Update(diff);\n+\n+                if (!me->HasUnitState(UNIT_STATE_CASTING))\n+                    DoMeleeAttackIfReady();\n+            }\n+\n+        private:\n+            TaskScheduler scheduler;\n+        };\n+\n+        CreatureAI* GetAI(Creature* creature) const override\n+        {\n+            return GetFirelandsAI<npc_firelands_flame_archonAI>(creature);\n+        }\n+};\n+\n+// http://www.wowhead.com/npc=54143/molten-flamefather\n+class npc_firelands_molten_flamefather : public CreatureScript\n+{\n+    public:\n+        npc_firelands_molten_flamefather() : CreatureScript(\"npc_firelands_molten_flamefather\") { }\n+\n+        struct npc_firelands_molten_flamefatherAI : public ScriptedAI\n+        {\n+            npc_firelands_molten_flamefatherAI(Creature* creature) : ScriptedAI(creature)\n+            {\n+                scheduler.SetValidator([this]\n+                {\n+                    return !me->HasUnitState(UNIT_STATE_CASTING);\n+                });\n+            }\n+\n+            void JustSummoned(Creature* summon) override\n+            {\n+                if (summon->GetEntry() != NPC_MAGMA_CONDUIT)\n+                    return;\n+\n+                summon->CastSpell(summon, SPELL_SUMMON_MAGMAKIN);\n+            }\n+\n+            void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override\n+            {\n+                if (summon->GetEntry() != NPC_MAGMA_CONDUIT)\n+                    return;\n+\n+                summon->DespawnOrUnsummon();\n+            }\n+\n+            void EnterCombat(Unit* attacker) override\n+            {\n+                scheduler.Schedule(Seconds(5), [this](TaskContext context)\n+                {\n+                    DoCastAOE(SPELL_MAGMA_CONDUIT);\n+                    if (me->GetMap()->Is25ManRaid())\n+                        DoCastAOE(SPELL_MAGMA_CONDUIT);\n+                    context.Repeat(Seconds(25));\n+                });\n+                scheduler.Schedule(Milliseconds(12800), [this](TaskContext context)\n+                {\n+                    DoCastAOE(SPELL_EARTHQUAKE);\n+                    context.Repeat(Milliseconds(32500));\n+                });\n+            }\n+\n+            void JustDied(Unit* killer) override\n+            {\n+                scheduler.CancelAll();\n+                ScriptedAI::JustDied(killer);\n+            }\n+\n+            void EnterEvadeMode(EvadeReason why) override\n+            {\n+                scheduler.CancelAll();\n+                ScriptedAI::EnterEvadeMode(why);\n+            }\n+\n+            void UpdateAI(uint32 diff) override\n+            {\n+                if (!UpdateVictim())\n+                    return;\n+\n+                scheduler.Update(diff);\n+\n+                if (!me->HasUnitState(UNIT_STATE_CASTING))\n+                    DoMeleeAttackIfReady();\n+            }\n+\n+        private:\n+            TaskScheduler scheduler;\n+        };\n+\n+        CreatureAI* GetAI(Creature* creature) const override\n+        {\n+            return GetFirelandsAI<npc_firelands_molten_flamefatherAI>(creature);\n+        }\n+};\n+\n+// http://www.wowhead.com/npc=54144/magmakin\n+class npc_firelands_magmakin : public CreatureScript\n+{\n+    public:\n+        npc_firelands_magmakin() : CreatureScript(\"npc_firelands_magmakin\") { }\n+\n+        struct npc_firelands_magmakinAI : public ScriptedAI\n+        {\n+            npc_firelands_magmakinAI(Creature* creature) : ScriptedAI(creature)\n+            {\n+            }\n+\n+            void IsSummonedBy(Unit* /*summoner*/) override\n+            {\n+                //Not actually sniffed behavior\n+                Unit* target = me->SelectNearestTarget(50.0f, true);\n+                if (!target)\n+                    return;\n+\n+                me->AddThreat(target, 50000000.0f);\n+                me->TauntApply(target);\n+            }\n+\n+            void UpdateAI(uint32 diff) override\n+            {\n+                if (!UpdateVictim())\n+                    return;\n+\n+                // Not good enough, they usually just walk up to your face and look at you. Before writing a workaround maybe we can look if there's some disparity between the distance logic for DoSpellAttackIfReady and UpdateVictim\n+                DoSpellAttackIfReady(SPELL_ERUPTION);\n+            }\n+        };\n+\n+        CreatureAI* GetAI(Creature* creature) const\n+        {\n+            return GetFirelandsAI<npc_firelands_magmakinAI>(creature);\n+        }\n+};\n+\n+// http://www.wowhead.com/npc=53494/baleroc\n+class boss_baleroc : public CreatureScript\n+{\n+    public:\n+        boss_baleroc() : CreatureScript(\"boss_baleroc\") { }\n+\n+        struct boss_balerocAI : public firelands_bossAI\n+        {\n+            boss_balerocAI(Creature* creature) : firelands_bossAI(creature, DATA_BALEROC), _canYellKilledPlayer(true)\n+            {\n+                scheduler.SetValidator([this]\n+                {\n+                    return !me->HasUnitState(UNIT_STATE_CASTING);\n+                });\n+            }\n+\n+            void Reset() override\n+            {\n+                firelands_bossAI::Reset();\n+                _canYellKilledPlayer = true;\n+                EquipWeapon(EQUIP_DEFAULT);\n+            }\n+\n+            void EnterCombat(Unit* target) override\n+            {\n+                firelands_bossAI::EnterCombat(target);\n+\n+                Talk(SAY_AGGRO);\n+                PreparePhase(PHASE_ONE);\n+\n+                //Reset our achievement list. We do this here and not in Reset(), as the debuff may have been spread after the boss has reset.\n+                for (int i = 0; i < 25; i++)\n+                {\n+                    _sharedThePain[i].player = ObjectGuid::Empty;\n+                    _sharedThePain[i].tormented = 0;\n+                }\n+            }\n+\n+            void PreparePhase(Phases phase)\n+            {\n+                //events.SetPhase(phase);\n+\n+                switch (phase)\n+                {\n+                    case PHASE_ONE:\n+                        scheduler.Schedule(Milliseconds(8500), [this](TaskContext context)\n+                        {\n+                            me->AddAura(SPELL_INCENDIARY_SOUL, me); // No cast\n+                            DoCastVictim(SPELL_BLAZE_OF_GLORY);\n+                            context.Repeat(Milliseconds(11500));\n+                        });\n+                        scheduler.Schedule(Seconds(5), [this](TaskContext context)\n+                        {\n+                            DoCastAOE(SPELL_SHARDS_OF_TORMENT);\n+                            context.Repeat(Seconds(34));\n+                        });\n+                        if (me->GetMap()->IsHeroic())\n+                        {\n+                            scheduler.Schedule(Seconds(26), [this](TaskContext context)\n+                            {\n+                                DoCastAOE(SPELL_COUNTDOWN);\n+                                context.Repeat(Seconds(48));\n+                            });\n+                        }\n+                        scheduler.Schedule(Milliseconds(30500), [this](TaskContext context)\n+                        {\n+                            DoCast(SPELL_BLADES_OF_BALEROC);\n+                            context.Repeat(Seconds(47));\n+                        });\n+                        scheduler.Schedule(Minutes(6), [this](TaskContext)\n+                        {\n+                            Talk(SAY_ENRAGE);\n+                            Talk(EMOTE_ENRAGE);\n+                            DoCast(me, SPELL_BERSERK);\n+                        });\n+                        break;\n+                    default:\n+                        break;\n+                }\n+            }\n+\n+            void KilledUnit(Unit* who) override\n+            {\n+                if (who->GetTypeId() == TYPEID_PLAYER && _canYellKilledPlayer)\n+                {\n+                    _canYellKilledPlayer = false;\n+                    Talk(SAY_KILL);\n+\n+                    separateScheduler.Schedule(Seconds(8), [this](TaskContext)\n+                    {\n+                        _canYellKilledPlayer = true;\n+                    });\n+                }\n+            }\n+\n+            void JustDied(Unit* killer) override\n+            {\n+                Talk(SAY_DEATH);\n+                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLAZE_OF_GLORY);\n+                firelands_bossAI::JustDied(killer);\n+            }\n+\n+            void EnterEvadeMode(EvadeReason reason) override\n+            {\n+                instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLAZE_OF_GLORY);\n+                firelands_bossAI::EnterEvadeMode(reason);\n+            }\n+\n+            void UpdateAI(uint32 diff) override\n+            {\n+                scheduler.Update(diff);\n+                separateScheduler.Update(diff);\n+                firelands_bossAI::UpdateAI(diff);\n+            }\n+\n+            void SetGUID(ObjectGuid guid, int32 type = 0) override\n+            {\n+                switch (type)\n+                {\n+                    case GUID_TORMENTED:\n+                        for (int i = 0; i < 25; i++)\n+                        {\n+                            if (_sharedThePain[i].player == guid)\n+                            {\n+                                _sharedThePain[i].tormented += 1;\n+                                break;\n+                            }\n+                            if (_sharedThePain[i].player.IsEmpty())\n+                            {\n+                                _sharedThePain[i].player = guid;\n+                                _sharedThePain[i].tormented += 1;\n+                                break;\n+                            }\n+                        }\n+                        break;\n+                    default:\n+                        break;\n+                }\n+            }\n+\n+            bool SharedThePain() const\n+            {\n+                for (int i = 0; i < 25; i++)\n+                    if (_sharedThePain[i].tormented > 3)\n+                        return false;\n+\n+                return true;\n+            }\n+\n+            void EquipWeapon(uint8 equipment) const\n+            {\n+                switch (equipment)\n+                {\n+                    case EQUIP_DEFAULT:\n+                        me->LoadEquipment(equipment);\n+                        me->SetCanDualWield(true);\n+                        break;\n+                    case EQUIP_INFERNO_BLADE:\n+                    case EQUIP_DECIMATION_BLADE:\n+                        me->LoadEquipment(equipment);\n+                        me->SetCanDualWield(false);\n+                        break;\n+                    default:\n+                        break;\n+                }\n+            }\n+\n+            private:\n+                // Our default TaskScheduler has a UNIT_STATE_CASTING validator that would get in the way of certain tasks, run them on a separate track.\n+                TaskScheduler separateScheduler;\n+                bool _canYellKilledPlayer;\n+                struct _sharedThePain\n+                {\n+                    ObjectGuid player;\n+                    uint32 tormented;\n+                }\n+                _sharedThePain[25];\n+        };\n+\n+        CreatureAI* GetAI(Creature* creature) const override\n+        {\n+            return GetFirelandsAI<boss_balerocAI>(creature);\n+        }\n+};\n+\n+// http://www.wowhead.com/npc=53495/shard-of-torment\n+class npc_shard_of_torment : public CreatureScript\n+{\n+    public:\n+        npc_shard_of_torment() : CreatureScript(\"npc_shard_of_torment\") { }\n+\n+        struct npc_shard_of_tormentAI : public NullCreatureAI\n+        {\n+            npc_shard_of_tormentAI(Creature* creature) : NullCreatureAI(creature)\n+            {\n+            }\n+\n+            void IsSummonedBy(Unit* summoner) override\n+            {\n+                DoCastAOE(SPELL_TORMENT_PRE_VISUAL);\n+                scheduler.Schedule(Milliseconds(4400), [this](TaskContext)\n+                {\n+                    me->RemoveAurasDueToSpell(SPELL_TORMENT_PRE_VISUAL);\n+                    DoCastAOE(SPELL_TORMENT_ACTIVE);\n+                });\n+            }\n+\n+            void SpellHitTarget(Unit* target, const SpellInfo* spell) override\n+            {\n+                if (spell->Id != SPELL_TORMENT)\n+                    return;\n+\n+                scheduler.CancelAll();\n+                scheduler.Schedule(Milliseconds(1100), [this](TaskContext context)\n+                {\n+                    DoCastAOE(SPELL_WAVE_OF_TORMENT);\n+                    context.Repeat(Seconds(1));\n+                });\n+            }\n+\n+            void UpdateAI(uint32 diff) override\n+            {\n+                scheduler.Update(diff);\n+            }\n+\n+        private:\n+            TaskScheduler scheduler;\n+        };\n+\n+        CreatureAI* GetAI(Creature* creature) const override\n+        {\n+            return GetFirelandsAI<npc_shard_of_tormentAI>(creature);\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=100799/fiery-torment\n+class spell_firelands_fiery_torment : public SpellScriptLoader\n+{\n+    public:\n+        spell_firelands_fiery_torment() : SpellScriptLoader(\"spell_firelands_fiery_torment\") { }\n+\n+        class spell_firelands_fiery_torment_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_firelands_fiery_torment_SpellScript);\n+\n+            void HandleScript(SpellEffIndex /*effIndex*/)\n+            {\n+                if (GetHitUnit())\n+                    GetCaster()->CastSpell(GetHitUnit(), SPELL_FIERY_TORMENT_DAMAGE, true);\n+            }\n+\n+            void FilterTargets(std::list<WorldObject*>& targets)\n+            {\n+                if (targets.empty())\n+                    return;\n+\n+                targets.sort(Trinity::ObjectDistanceOrderPred(GetCaster(), true));\n+                targets.resize(1);\n+            }\n+\n+            void Register() override\n+            {\n+                OnEffectHitTarget += SpellEffectFn(spell_firelands_fiery_torment_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);\n+                OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_firelands_fiery_torment_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);\n+            }\n+        };\n+\n+        SpellScript* GetSpellScript() const override\n+        {\n+            return new spell_firelands_fiery_torment_SpellScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99342/blades-of-baloroc\n+class spell_baleroc_blades_of_baleroc : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_blades_of_baleroc() : SpellScriptLoader(\"spell_baleroc_blades_of_baleroc\") { }\n+\n+        class spell_baleroc_blades_of_baleroc_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_baleroc_blades_of_baleroc_SpellScript);\n+\n+            void ChooseBlade(SpellEffIndex /*effIndex*/)\n+            {\n+                Creature* caster = GetCaster()->ToCreature();\n+                if (!caster || !caster->IsAIEnabled)\n+                    return;\n+\n+                switch (urand(1, 2))\n+                {\n+                    case 1:\n+                        caster->AI()->DoCast(SPELL_INFERNO_BLADE);\n+                        caster->AI()->Talk(SAY_INFERNO_BLADE);\n+                        caster->AI()->Talk(EMOTE_INFERNO_BLADE);\n+                        break;\n+                    case 2:\n+                        caster->AI()->DoCast(SPELL_DECIMATION_BLADE);\n+                        caster->AI()->Talk(SAY_DECIMATION_BLADE);\n+                        caster->AI()->Talk(EMOTE_DECIMATION_BLADE);\n+                        break;\n+                    default:\n+                        break;\n+                }\n+            }\n+\n+            void Register() override\n+            {\n+                OnEffectHit += SpellEffectFn(spell_baleroc_blades_of_baleroc_SpellScript::ChooseBlade, EFFECT_0, SPELL_EFFECT_DUMMY);\n+            }\n+        };\n+\n+        SpellScript* GetSpellScript() const override\n+        {\n+            return new spell_baleroc_blades_of_baleroc_SpellScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99350/inferno-blade\n+class spell_baleroc_inferno_blade : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_inferno_blade() : SpellScriptLoader(\"spell_baleroc_inferno_blade\") { }\n+\n+        class spell_baleroc_inferno_blade_AuraScript : public AuraScript\n+        {\n+            PrepareAuraScript(spell_baleroc_inferno_blade_AuraScript);\n+\n+            bool Load() override\n+            {\n+                return GetCaster()->GetTypeId() == TYPEID_UNIT;\n+            }\n+\n+            void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)\n+            {\n+                ENSURE_AI(boss_baleroc::boss_balerocAI, GetTarget()->GetAI())->EquipWeapon(EQUIP_INFERNO_BLADE);\n+            }\n+\n+            void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)\n+            {\n+                ENSURE_AI(boss_baleroc::boss_balerocAI, GetTarget()->GetAI())->EquipWeapon(EQUIP_DEFAULT);\n+            }\n+\n+            void Register() override\n+            {\n+                OnEffectApply += AuraEffectApplyFn(spell_baleroc_inferno_blade_AuraScript::OnApply, EFFECT_0, SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL, AURA_EFFECT_HANDLE_REAL);\n+                OnEffectRemove += AuraEffectRemoveFn(spell_baleroc_inferno_blade_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL, AURA_EFFECT_HANDLE_REAL);\n+            }\n+        };\n+\n+        AuraScript* GetAuraScript() const override\n+        {\n+            return new spell_baleroc_inferno_blade_AuraScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99352/decimation-blade\n+class spell_baleroc_decimation_blade : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_decimation_blade() : SpellScriptLoader(\"spell_baleroc_decimation_blade\") { }\n+\n+        class spell_baleroc_decimation_blade_AuraScript : public AuraScript\n+        {\n+            PrepareAuraScript(spell_baleroc_decimation_blade_AuraScript);\n+\n+            bool Load() override\n+            {\n+                return GetCaster()->GetTypeId() == TYPEID_UNIT;\n+            }\n+\n+            void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)\n+            {\n+                ENSURE_AI(boss_baleroc::boss_balerocAI, GetTarget()->GetAI())->EquipWeapon(EQUIP_DECIMATION_BLADE);\n+            }\n+\n+            void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)\n+            {\n+                ENSURE_AI(boss_baleroc::boss_balerocAI, GetTarget()->GetAI())->EquipWeapon(EQUIP_DEFAULT);\n+            }\n+\n+            void Register() override\n+            {\n+                OnEffectApply += AuraEffectApplyFn(spell_baleroc_decimation_blade_AuraScript::OnApply, EFFECT_1, SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL, AURA_EFFECT_HANDLE_REAL);\n+                OnEffectRemove += AuraEffectRemoveFn(spell_baleroc_decimation_blade_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL, AURA_EFFECT_HANDLE_REAL);\n+            }\n+        };\n+\n+        AuraScript* GetAuraScript() const override\n+        {\n+            return new spell_baleroc_decimation_blade_AuraScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99353/decimating-strike\n+class spell_baleroc_decimating_strike : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_decimating_strike() : SpellScriptLoader(\"spell_baleroc_decimating_strike\") { }\n+\n+        class spell_baleroc_decimating_strike_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_baleroc_decimating_strike_SpellScript);\n+\n+            bool Validate(SpellInfo const* /*spellInfo*/)\n+            {\n+                if (!sSpellMgr->GetSpellInfo(SPELL_DECIMATING_STRIKE))\n+                    return false;\n+                return true;\n+            }\n+\n+            void ChangeDamage()\n+            {\n+                int32 healthPctDmg = GetHitUnit()->CountPctFromMaxHealth(GetSpellInfo()->GetEffect(EFFECT_0)->BasePoints);\n+                int32 flatDmg = GetSpellInfo()->GetEffect(EFFECT_2)->BasePoints;\n+\n+                SetHitDamage(healthPctDmg < flatDmg ? flatDmg : healthPctDmg);\n+            }\n+\n+            void Register()\n+            {\n+                OnHit += SpellHitFn(spell_baleroc_decimating_strike_SpellScript::ChangeDamage);\n+            }\n+        };\n+\n+        SpellScript* GetSpellScript() const\n+        {\n+            return new spell_baleroc_decimating_strike_SpellScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99515/countdown\n+class spell_baleroc_countdown_aoe_dummy : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_countdown_aoe_dummy() : SpellScriptLoader(\"spell_baleroc_countdown_aoe_dummy\") { }\n+\n+        class spell_baleroc_countdown_aoe_dummy_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_baleroc_countdown_aoe_dummy_SpellScript);\n+\n+            void CastSpellLink()\n+            {\n+                Unit* firstTarget = _target1->ToUnit();\n+                Unit* secondTarget = _target2->ToUnit();\n+                if (!firstTarget || !secondTarget)\n+                    return;\n+\n+                firstTarget->CastSpell(secondTarget, SPELL_COUNTDOWN_VISUAL_LINK, true);\n+            }\n+\n+            void HandleScript(SpellEffIndex /*effIndex*/)\n+            {\n+                GetCaster()->CastSpell(GetHitUnit(), SPELL_COUNTDOWN_AURA);\n+            }\n+\n+            void FilterTargets(std::list<WorldObject*>& targets)\n+            {\n+                Creature* caster = GetCaster()->ToCreature();\n+                if (!caster)\n+                    return;\n+\n+                if (WorldObject* tank = caster->AI()->SelectTarget(SELECT_TARGET_TOPAGGRO))\n+                    targets.remove(tank);\n+\n+                if (targets.size() < 2)\n+                {\n+                    FinishCast(SPELL_FAILED_NO_VALID_TARGETS);\n+                    return;\n+                }\n+\n+                Trinity::Containers::RandomResizeList(targets, 2);\n+\n+                _target1 = targets.front();\n+                _target2 = targets.back();\n+            }\n+\n+            void Register() override\n+            {\n+                AfterCast += SpellCastFn(spell_baleroc_countdown_aoe_dummy_SpellScript::CastSpellLink);\n+                OnEffectHitTarget += SpellEffectFn(spell_baleroc_countdown_aoe_dummy_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);\n+                OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_baleroc_countdown_aoe_dummy_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);\n+            }\n+            \n+            WorldObject* _target1;\n+            WorldObject* _target2;\n+        };\n+\n+        SpellScript* GetSpellScript() const override\n+        {\n+            return new spell_baleroc_countdown_aoe_dummy_SpellScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99516/countdown\n+class spell_baleroc_countdown : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_countdown() : SpellScriptLoader(\"spell_baleroc_countdown\") { }\n+\n+        class spell_baleroc_countdown_AuraScript : public AuraScript\n+        {\n+            PrepareAuraScript(spell_baleroc_countdown_AuraScript);\n+\n+            void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)\n+            {\n+                GetTarget()->ToPlayer()->RemoveAurasDueToSpell(SPELL_COUNTDOWN_VISUAL_LINK);\n+                if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)\n+                    GetTarget()->CastSpell(static_cast<Unit*>(nullptr), SPELL_COUNTDOWN_AOE_EXPLOSION, true);\n+            }\n+\n+            void Register() override\n+            {\n+                AfterEffectRemove += AuraEffectRemoveFn(spell_baleroc_countdown_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);\n+            }\n+        };\n+\n+        AuraScript* GetAuraScript() const override\n+        {\n+            return new spell_baleroc_countdown_AuraScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99517/countdown\n+class spell_baleroc_countdown_proximity_check : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_countdown_proximity_check() : SpellScriptLoader(\"spell_baleroc_countdown_proximity_check\") { }\n+\n+        class spell_baleroc_countdown_proximity_check_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_baleroc_countdown_proximity_check_SpellScript);\n+\n+            void HandleScript(SpellEffIndex effIndex)\n+            {\n+                PreventHitDefaultEffect(effIndex);\n+                GetCaster()->RemoveAurasDueToSpell(SPELL_COUNTDOWN_AURA);\n+                GetHitUnit()->RemoveAurasDueToSpell(SPELL_COUNTDOWN_AURA);\n+            }\n+\n+            void FilterTargets(std::list<WorldObject*>& targets)\n+            {\n+                targets.remove(GetCaster());\n+                targets.remove_if(Trinity::UnitAuraCheck(false, SPELL_COUNTDOWN_AURA));\n+            }\n+\n+            void Register() override\n+            {\n+                OnEffectHitTarget += SpellEffectFn(spell_baleroc_countdown_proximity_check_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);\n+                OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_baleroc_countdown_proximity_check_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);\n+            }\n+        };\n+\n+        SpellScript* GetSpellScript() const override\n+        {\n+            return new spell_baleroc_countdown_proximity_check_SpellScript();\n+        }\n+};\n+\n+// http://www.wowhead.com/spell=99259/shards-of-torment\n+class spell_baleroc_shards_of_torment_target_search : public SpellScriptLoader\n+{\n+    public:\n+        spell_baleroc_shards_of_torment_target_search() : SpellScriptLoader(\"spell_baleroc_shards_of_torment_target_search\") { }\n+\n+        class spell_baleroc_shards_of_torment_target_search_SpellScript : public SpellScript\n+        {\n+            PrepareSpellScript(spell_baleroc_shards_of_torment_target_search_SpellScript);\n+\n+            bool Load() override\n+            {\n+                _hasTarget = false;\n+                return GetCaster()->GetTypeId() == TYPEID_UNIT;\n+            }\n+\n+            void OnSpellCast()\n+            {\n+                if (_hasTarget)\n+                    ENSURE_AI(boss_baleroc::boss_balerocAI, GetCaster()->GetAI())->Talk(SAY_SHARDS_OF_TORMENT);\n+            }\n+\n+            void HandleScript(SpellEffIndex effIndex)\n+            {\n+                PreventHitDefaultEffect(effIndex);\n+                GetCaster()->CastSpell(GetHitUnit(), SPELL_SHARDS_OF_TORMENT_SUMMON);\n+            }\n+\n+            void FilterTargets(std::list<WorldObject*>& targets)\n+            {\n+                // Shards of torment seems to target tanks if no other targets are available as of Warlords of Draenor\n+                if (targets.size() <= 1)\n+                    return;\n+\n+                Creature* caster = GetCaster()->ToCreature();\n+                if (!caster || !caster->IsAIEnabled)\n+                    return;\n+\n+                if (WorldObject* tank = caster->AI()->SelectTarget(SELECT_TARGET_TOPAGGRO))\n+                    targets.remove(tank);\n+\n+                std::list<WorldObject*> melee, ranged;\n+                for (auto target : targets)\n+                {\n+                    if (caster->IsWithinMeleeRange(target->ToUnit()))\n+                    {\n+                        melee.push_back(target);\n+                    }\n+                    else\n+                    {\n+                        ranged.push_back(target);\n+                    }\n+                }\n+\n+                targets.clear();\n+\n+                if (caster->GetMap()->Is25ManRaid())\n+                    if (WorldObject* target = GetRandomContainerElement(ranged, melee))\n+                        targets.push_back(target);\n+\n+                if (WorldObject* target = GetRandomContainerElement(melee, ranged))\n+                    targets.push_back(target);\n+\n+                _hasTarget = !targets.empty();\n+            }\n+\n+            void Register() override\n+            {\n+                OnCast += SpellCastFn(spell_baleroc_shards_of_torment_target_search_SpellScript::OnSpellCast);\n+                OnEffectHitTarget += SpellEffectFn(spell_baleroc_shards_of_torment_target_search_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);\n+                OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_baleroc_shards_of_torment_target_search_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);\n+            }\n+\n+            bool _hasTarget;\n+            WorldObject* GetRandomContainerElement(std::list<WorldObject*>& priority1, std::list<WorldObject*>& priority2) const\n+            {\n+                WorldObject* target = static_cast<WorldObject*>(nullptr);\n+                target = GetRandomContainerElement(priority1);\n+                if (target)\n+                    priority1.remove(target);\n+                else\n+                {\n+                    target = GetRandomContainerElement(priority2);\n+                    priority2.remove(target);\n+                }\n+\n+                return target;\n+            }\n+\n+            static WorldObject* GetRandomContainerElement(std::list<WorldObject*> list)\n+            {\n+                if (!list.empty())\n+                    return Trinity::Containers::SelectRandomContainerElement(list);\n+\n+                return static_cast<WorldObject*>(nullptr);","path":"src/server/scripts/Kalimdor/Firelands/boss_baleroc.cpp","position":932,"original_position":932,"commit_id":"9e3ea775e77351e57936d047a0b445526eb98cd5","original_commit_id":"9e3ea775e77351e57936d047a0b445526eb98cd5","user":{"login":"DDuarte","id":530940,"avatar_url":"https://avatars.githubusercontent.com/u/530940?v=3","gravatar_id":"","url":"https://api.github.com/users/DDuarte","html_url":"https://github.com/DDuarte","followers_url":"https://api.github.com/users/DDuarte/followers","following_url":"https://api.github.com/users/DDuarte/following{/other_user}","gists_url":"https://api.github.com/users/DDuarte/gists{/gist_id}","starred_url":"https://api.github.com/users/DDuarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDuarte/subscriptions","organizations_url":"https://api.github.com/users/DDuarte/orgs","repos_url":"https://api.github.com/users/DDuarte/repos","events_url":"https://api.github.com/users/DDuarte/events{/privacy}","received_events_url":"https://api.github.com/users/DDuarte/received_events","type":"User","site_admin":false},"body":"static_cast not required","created_at":"2016-07-06T16:32:25Z","updated_at":"2016-07-06T16:32:25Z","html_url":"https://github.com/TrinityCore/TrinityCore/pull/17527#discussion_r69765045","pull_request_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527","_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments/69765045"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17527#discussion_r69765045"},"pull_request":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527"}}},"pull_request":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527","id":76461895,"html_url":"https://github.com/TrinityCore/TrinityCore/pull/17527","diff_url":"https://github.com/TrinityCore/TrinityCore/pull/17527.diff","patch_url":"https://github.com/TrinityCore/TrinityCore/pull/17527.patch","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17527","number":17527,"state":"open","locked":false,"title":"[6.x] Core/Scripts: Baleroc Encounter Implementation","user":{"login":"Krudor","id":4248245,"avatar_url":"https://avatars.githubusercontent.com/u/4248245?v=3","gravatar_id":"","url":"https://api.github.com/users/Krudor","html_url":"https://github.com/Krudor","followers_url":"https://api.github.com/users/Krudor/followers","following_url":"https://api.github.com/users/Krudor/following{/other_user}","gists_url":"https://api.github.com/users/Krudor/gists{/gist_id}","starred_url":"https://api.github.com/users/Krudor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krudor/subscriptions","organizations_url":"https://api.github.com/users/Krudor/orgs","repos_url":"https://api.github.com/users/Krudor/repos","events_url":"https://api.github.com/users/Krudor/events{/privacy}","received_events_url":"https://api.github.com/users/Krudor/received_events","type":"User","site_admin":false},"body":"**Changes proposed**:\r\n\r\n- Implement Baleroc Encounter\r\n\r\n**Target branch(es)**: 6x\r\n\r\n**Issues addressed**: Closes  #11558\r\n\r\n**Tests performed**: Build & vigorous in-game testing\r\n\r\n**Known issues and TODO list**:\r\n\r\n- (Trash) Magmakin doesn't explode when reaching the player (Not addressed because of suspected core issue with two similiar distance calculation functions returning different results)\r\n- (Trash) Flame Archon's cancel their own spellcasts if they are simply being kited (Core?)\r\n- (Trash) Flame Archon's Fiery Torment applies a debuff that increases fire damage taken. This does not increase damage taken from fire. (Fire %damage taken vs fire school generic handler?)\r\n- When Baleroc is dual wielding his normal weapons, he swings with both weapons simultaneously. (Creature dual wielding not implemented properly?)\r\n- Inferno Strike and Decimating Strike are not cast on the tank. (Requires implementation of SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL)\r\n- Players do not gain Vital Flame when healing targets with Indendiary Soul. (Unknown cause, proc triggering Vital Flame is no longer functioning after porting from a cataclysm rev (UNK), assuming it is core related)\r\n- Vital Flame will, even if applied not increase healing done (Requires implementation of SPELL_AURA_359?)\r\n- Shards of Torment has on one occasion been seen to cast Torment on dead players (Possibly just when the player had been killed, problems in the core?)\r\n- Shards of Torment turn to face the player it is casting Torment on (Creature does not have NPC_FLAG2_DISABLE_TURN or any other flag that could intervene with this, can only blame it on the core)\r\n- Shards of Torment's Torment channel tether snaps at the channel spells cast range of 15 yards, when it should break at 30 yards (trigger spell range, fix core?)\r\n- No loot tables.\r\n\r\nCreature immunities are not verified.\r\n\r\nLet's give it another shot.","created_at":"2016-07-06T16:29:56Z","updated_at":"2016-07-06T16:32:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b32fcf168d11f3e0c65c367d31d9638417c669b5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527/commits","review_comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527/comments","review_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17527/comments","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/9e3ea775e77351e57936d047a0b445526eb98cd5","head":{"label":"Krudor:baleroc_revisited","ref":"baleroc_revisited","sha":"9e3ea775e77351e57936d047a0b445526eb98cd5","user":{"login":"Krudor","id":4248245,"avatar_url":"https://avatars.githubusercontent.com/u/4248245?v=3","gravatar_id":"","url":"https://api.github.com/users/Krudor","html_url":"https://github.com/Krudor","followers_url":"https://api.github.com/users/Krudor/followers","following_url":"https://api.github.com/users/Krudor/following{/other_user}","gists_url":"https://api.github.com/users/Krudor/gists{/gist_id}","starred_url":"https://api.github.com/users/Krudor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krudor/subscriptions","organizations_url":"https://api.github.com/users/Krudor/orgs","repos_url":"https://api.github.com/users/Krudor/repos","events_url":"https://api.github.com/users/Krudor/events{/privacy}","received_events_url":"https://api.github.com/users/Krudor/received_events","type":"User","site_admin":false},"repo":{"id":59395449,"name":"TrinityCore","full_name":"Krudor/TrinityCore","owner":{"login":"Krudor","id":4248245,"avatar_url":"https://avatars.githubusercontent.com/u/4248245?v=3","gravatar_id":"","url":"https://api.github.com/users/Krudor","html_url":"https://github.com/Krudor","followers_url":"https://api.github.com/users/Krudor/followers","following_url":"https://api.github.com/users/Krudor/following{/other_user}","gists_url":"https://api.github.com/users/Krudor/gists{/gist_id}","starred_url":"https://api.github.com/users/Krudor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krudor/subscriptions","organizations_url":"https://api.github.com/users/Krudor/orgs","repos_url":"https://api.github.com/users/Krudor/repos","events_url":"https://api.github.com/users/Krudor/events{/privacy}","received_events_url":"https://api.github.com/users/Krudor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Krudor/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":true,"url":"https://api.github.com/repos/Krudor/TrinityCore","forks_url":"https://api.github.com/repos/Krudor/TrinityCore/forks","keys_url":"https://api.github.com/repos/Krudor/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Krudor/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Krudor/TrinityCore/teams","hooks_url":"https://api.github.com/repos/Krudor/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/Krudor/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/Krudor/TrinityCore/events","assignees_url":"https://api.github.com/repos/Krudor/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/Krudor/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/Krudor/TrinityCore/tags","blobs_url":"https://api.github.com/repos/Krudor/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Krudor/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Krudor/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/Krudor/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Krudor/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/Krudor/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/Krudor/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/Krudor/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/Krudor/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/Krudor/TrinityCore/subscription","commits_url":"https://api.github.com/repos/Krudor/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/Krudor/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/Krudor/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/Krudor/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/Krudor/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/Krudor/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Krudor/TrinityCore/merges","archive_url":"https://api.github.com/repos/Krudor/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Krudor/TrinityCore/downloads","issues_url":"https://api.github.com/repos/Krudor/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/Krudor/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/Krudor/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/Krudor/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Krudor/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/Krudor/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/Krudor/TrinityCore/deployments","created_at":"2016-05-22T04:51:40Z","updated_at":"2016-05-22T04:51:57Z","pushed_at":"2016-07-06T16:28:12Z","git_url":"git://github.com/Krudor/TrinityCore.git","ssh_url":"git@github.com:Krudor/TrinityCore.git","clone_url":"https://github.com/Krudor/TrinityCore.git","svn_url":"https://github.com/Krudor/TrinityCore","homepage":"http://www.trinitycore.org","size":352064,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"6.x"}},"base":{"label":"TrinityCore:6.x","ref":"6.x","sha":"be461280d2e919df3dbf7990cbf9684a03bcfbad","user":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"repo":{"id":1204412,"name":"TrinityCore","full_name":"TrinityCore/TrinityCore","owner":{"login":"TrinityCore","id":539602,"avatar_url":"https://avatars.githubusercontent.com/u/539602?v=3","gravatar_id":"","url":"https://api.github.com/users/TrinityCore","html_url":"https://github.com/TrinityCore","followers_url":"https://api.github.com/users/TrinityCore/followers","following_url":"https://api.github.com/users/TrinityCore/following{/other_user}","gists_url":"https://api.github.com/users/TrinityCore/gists{/gist_id}","starred_url":"https://api.github.com/users/TrinityCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrinityCore/subscriptions","organizations_url":"https://api.github.com/users/TrinityCore/orgs","repos_url":"https://api.github.com/users/TrinityCore/repos","events_url":"https://api.github.com/users/TrinityCore/events{/privacy}","received_events_url":"https://api.github.com/users/TrinityCore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TrinityCore/TrinityCore","description":"TrinityCore Open Source MMO Framework","fork":false,"url":"https://api.github.com/repos/TrinityCore/TrinityCore","forks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/forks","keys_url":"https://api.github.com/repos/TrinityCore/TrinityCore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrinityCore/TrinityCore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrinityCore/TrinityCore/teams","hooks_url":"https://api.github.com/repos/TrinityCore/TrinityCore/hooks","issue_events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/events{/number}","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/events","assignees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/assignees{/user}","branches_url":"https://api.github.com/repos/TrinityCore/TrinityCore/branches{/branch}","tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/tags","blobs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/{sha}","languages_url":"https://api.github.com/repos/TrinityCore/TrinityCore/languages","stargazers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/stargazers","contributors_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contributors","subscribers_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscribers","subscription_url":"https://api.github.com/repos/TrinityCore/TrinityCore/subscription","commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrinityCore/TrinityCore/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrinityCore/TrinityCore/contents/{+path}","compare_url":"https://api.github.com/repos/TrinityCore/TrinityCore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrinityCore/TrinityCore/merges","archive_url":"https://api.github.com/repos/TrinityCore/TrinityCore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrinityCore/TrinityCore/downloads","issues_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues{/number}","pulls_url":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls{/number}","milestones_url":"https://api.github.com/repos/TrinityCore/TrinityCore/milestones{/number}","notifications_url":"https://api.github.com/repos/TrinityCore/TrinityCore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels{/name}","releases_url":"https://api.github.com/repos/TrinityCore/TrinityCore/releases{/id}","deployments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/deployments","created_at":"2010-12-28T23:40:07Z","updated_at":"2016-07-06T13:34:23Z","pushed_at":"2016-07-06T16:31:27Z","git_url":"git://github.com/TrinityCore/TrinityCore.git","ssh_url":"git@github.com:TrinityCore/TrinityCore.git","clone_url":"https://github.com/TrinityCore/TrinityCore.git","svn_url":"https://github.com/TrinityCore/TrinityCore","homepage":"http://www.trinitycore.org","size":772078,"stargazers_count":3396,"watchers_count":3396,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3472,"mirror_url":null,"open_issues_count":1281,"forks":3472,"open_issues":1281,"watchers":3396,"default_branch":"6.x"}},"_links":{"self":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527"},"html":{"href":"https://github.com/TrinityCore/TrinityCore/pull/17527"},"issue":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17527"},"comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/17527/comments"},"review_comments":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527/comments"},"review_comment":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/pulls/17527/commits"},"statuses":{"href":"https://api.github.com/repos/TrinityCore/TrinityCore/statuses/9e3ea775e77351e57936d047a0b445526eb98cd5"}}}}
{"actor":{"display_login":"DDuarte"}}