Skip to content

Instantly share code, notes, and snippets.

@cgdangelo
Created March 28, 2017 14:07
Show Gist options
  • Save cgdangelo/382ccb04ecbab74642cc6a490a099fa6 to your computer and use it in GitHub Desktop.
Save cgdangelo/382ccb04ecbab74642cc6a490a099fa6 to your computer and use it in GitHub Desktop.
From 70e6a30dda00c34854912934728b87104e534fbc Mon Sep 17 00:00:00 2001
From: Charles D'Angelo <[email protected]>
Date: Tue, 28 Mar 2017 09:48:47 -0400
Subject: [PATCH] Implement Fel-Oiled Infernal Machine trinket
---
engine/player/sc_unique_gear_x7.cpp | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/engine/player/sc_unique_gear_x7.cpp b/engine/player/sc_unique_gear_x7.cpp
index 3cd5736..5596f9f 100644
--- a/engine/player/sc_unique_gear_x7.cpp
+++ b/engine/player/sc_unique_gear_x7.cpp
@@ -67,6 +67,9 @@ namespace item
void bloodstained_hankerchief( special_effect_t& );
void majordomos_dinner_bell( special_effect_t& );
+ // 7.2 Dungeon
+ void feloiled_infernal_machine( special_effect_t& );
+
// 7.0 Misc
void darkmoon_deck( special_effect_t& );
void infernal_alchemist_stone( special_effect_t& ); // WIP
@@ -325,6 +328,21 @@ void enchants::mark_of_the_hidden_satyr( special_effect_t& effect )
new dbc_proc_callback_t( effect.item, effect );
}
+
+// Fel-Oiled Infernal Machine ==============================================
+
+void item::feloiled_infernal_machine( special_effect_t& effect )
+{
+ const spell_data_t* grease_the_gears = effect.player -> find_spell( 238534 );
+
+ const double buff_amount = item_database::apply_combat_rating_multiplier(
+ *effect.item, grease_the_gears -> effectN( 1 ).average( effect.item )
+ );
+
+ effect.custom_buff = stat_buff_creator_t( effect.player, "grease_the_gears", grease_the_gears, effect.item )
+ .add_stat( STAT_HASTE_RATING, buff_amount );
+}
+
// Aran's Relaxing Ruby ============================================================
struct flame_wreath_t : public spell_t
@@ -4456,6 +4474,9 @@ void unique_gear::register_special_effects_x7()
register_special_effect( 230011, item::bloodstained_hankerchief );
register_special_effect( 230101, item::majordomos_dinner_bell );
+ /* Legion 7.2 Dungeon */
+ register_special_effect( 238534, item::feloiled_infernal_machine );
+
/* Legion 7.0 Raid */
// register_special_effect( 221786, item::bloodthirsty_instinct );
register_special_effect( 222512, item::natures_call );
--
2.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment