Skip to content

Commit

Permalink
Add Battle for Azeroth feasts
Browse files Browse the repository at this point in the history
  • Loading branch information
nuoHep committed Jul 2, 2018
1 parent 842ec96 commit 0d28caf
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 1 deletion.
3 changes: 3 additions & 0 deletions engine/player/sc_unique_gear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4445,6 +4445,9 @@ void unique_gear::register_special_effects()
// Register azerite special effects
azerite::register_azerite_powers();

// Register bfa special effects
register_special_effects_bfa();

/* Legacy Effects, pre-5.0 */
register_special_effect( 45481, "ProcOn/hit_45479Trigger" ); /* Shattered Sun Pendant of Acumen */
register_special_effect( 45482, "ProcOn/hit_45480Trigger" ); /* Shattered Sun Pendant of Might */
Expand Down
76 changes: 76 additions & 0 deletions engine/player/sc_unique_gear_x7.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// ==========================================================================
// Dedmonwakeen's Raid DPS/TPS Simulator.
// Send questions to natehieter@gmail.com
// ==========================================================================

#include "simulationcraft.hpp"

using namespace unique_gear;

namespace {
namespace bfa { // YaN - Yet another namespace - to resolve conflicts with global namespaces.
/**
* Forward declarations so we can reorganize the file a bit more sanely.
*/

namespace consumables
{
void galley_banquet( special_effect_t& );
void bountiful_captains_feast( special_effect_t& );
}

namespace util
{
// feasts initialization helper
void init_feast( special_effect_t& effect, arv::array_view<std::pair<stat_e, int>> stat_map )
{
effect.stat = effect.player -> convert_hybrid_stat( STAT_STR_AGI_INT );
// TODO: Is this actually spec specific?
if ( effect.player -> role == ROLE_TANK )
effect.stat = STAT_STAMINA;

for ( auto&& stat : stat_map )
{
if ( stat.first == effect.stat )
{
effect.trigger_spell_id = stat.second;
break;
}
}
effect.stat_amount = effect.player -> find_spell( effect.trigger_spell_id ) -> effectN( 1 ).average( effect.player );
}
} // namespace util

// Galley Banquet ===========================================================

void consumables::galley_banquet( special_effect_t& effect )
{
util::init_feast( effect,
{ { STAT_STRENGTH, 259452 },
{ STAT_AGILITY, 259448 },
{ STAT_INTELLECT, 259449 },
{ STAT_STAMINA, 259453 } } );
}

// Bountiful Captain's Feast ================================================

void consumables::bountiful_captains_feast( special_effect_t& effect )
{
util::init_feast( effect,
{ { STAT_STRENGTH, 259456 },
{ STAT_AGILITY, 259454 },
{ STAT_INTELLECT, 259455 },
{ STAT_STAMINA, 259457 } } );
}

} // namespace bfa
} // anon namespace

void unique_gear::register_special_effects_bfa()
{
using namespace bfa;

// Consumables
register_special_effect( 259409, consumables::galley_banquet );
register_special_effect( 259410, consumables::bountiful_captains_feast );
}
1 change: 1 addition & 0 deletions engine/simulationcraft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6941,6 +6941,7 @@ void register_hotfixes();
void register_hotfixes_legion();
void register_special_effects();
void register_special_effects_legion(); // Legion special effects
void register_special_effects_bfa(); // Battle for Azeroth special effects
void sort_special_effects();
void unregister_special_effects();

Expand Down
1 change: 1 addition & 0 deletions source_files/QT_engine.pri
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
SOURCES += engine/report/sc_color.cpp
SOURCES += engine/report/sc_chart.cpp
SOURCES += engine/player/sc_unique_gear_x6.cpp
SOURCES += engine/player/sc_unique_gear_x7.cpp
SOURCES += engine/player/sc_unique_gear.cpp
SOURCES += engine/player/sc_set_bonus.cpp
SOURCES += engine/player/sc_proc.cpp
Expand Down
3 changes: 3 additions & 0 deletions source_files/VS_engine.props
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ To change the list of source files, update the QT_ files and run synchronize.py
</ClCompile>
<ClCompile Include="..\engine\player\sc_unique_gear_x6.cpp">

</ClCompile>
<ClCompile Include="..\engine\player\sc_unique_gear_x7.cpp">

</ClCompile>
<ClCompile Include="..\engine\player\sc_unique_gear.cpp">

Expand Down
3 changes: 2 additions & 1 deletion source_files/engine_make
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ SRC += \
report$(PATHSEP)sc_color.cpp \
report$(PATHSEP)sc_chart.cpp \
player$(PATHSEP)sc_unique_gear_x6.cpp \
player$(PATHSEP)sc_unique_gear_x7.cpp \
player$(PATHSEP)sc_unique_gear.cpp \
player$(PATHSEP)sc_set_bonus.cpp \
player$(PATHSEP)sc_proc.cpp \
Expand All @@ -60,7 +61,7 @@ SRC += \
class_modules$(PATHSEP)warlock$(PATHSEP)sc_warlock_affliction.cpp \
class_modules$(PATHSEP)warlock$(PATHSEP)sc_warlock_demonology.cpp \
class_modules$(PATHSEP)warlock$(PATHSEP)sc_warlock_destruction.cpp \
class_modules$(PATHSEP)warlock$(PATHSEP)sc_warlock_pets.cpp \
class_modules$(PATHSEP)warlock$(PATHSEP)sc_warlock_pets.cpp \
class_modules$(PATHSEP)sc_shaman.cpp \
class_modules$(PATHSEP)sc_rogue.cpp \
class_modules$(PATHSEP)priest$(PATHSEP)sc_priest.cpp \
Expand Down

0 comments on commit 0d28caf

Please sign in to comment.