Skip to content

Commit

Permalink
Merge branch 'master' into wod
Browse files Browse the repository at this point in the history
Conflicts:
	engine/class_modules/sc_warrior.cpp
	engine/sim/sc_core_sim.cpp
	engine/simulationcraft.hpp
	profiles/PreRaid/Rogue_Combat_PreRaid.simc
	profiles/Tier15H/Rogue_Combat_T15H.simc
	profiles/Tier15H/Warrior_Fury_2h_T15H.simc
	profiles/Tier15N/Rogue_Combat_T15N.simc
	profiles/Tier15N/Warrior_Fury_2h_T15N.simc
	profiles/Tier16H/Rogue_Combat_T16H.simc
	profiles/Tier16H/Warrior_Fury_2h_T16H.simc
	profiles/Tier16N/Rogue_Combat_T16N.simc
	profiles/Tier16N/Warrior_Fury_2h_T16N.simc
	qt/SC_OptionsTab.hpp
	qt/sc_options_tab.cpp
	simc11.sln
  • Loading branch information
Collisionc committed Apr 19, 2014
2 parents 7b25f3f + 8e30473 commit 0536333
Show file tree
Hide file tree
Showing 16 changed files with 331 additions and 169 deletions.
30 changes: 24 additions & 6 deletions engine/class_modules/sc_death_knight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2367,8 +2367,10 @@ bool death_knight_spell_t::ready()
struct melee_t : public death_knight_melee_attack_t
{
int sync_weapons;
bool first;

melee_t( const char* name, death_knight_t* p, int sw ) :
death_knight_melee_attack_t( name, p ), sync_weapons( sw )
death_knight_melee_attack_t( name, p ), sync_weapons( sw ), first ( true )
{
school = SCHOOL_PHYSICAL;
may_glance = true;
Expand All @@ -2380,16 +2382,32 @@ struct melee_t : public death_knight_melee_attack_t
base_hit -= 0.19;
}

void reset()
{
death_knight_melee_attack_t::reset();

first = true;
}

virtual timespan_t execute_time() const
{
timespan_t t = death_knight_melee_attack_t::execute_time();
if ( ! player -> in_combat )
{
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::from_seconds( 0.2 ) ) : t / 2 ) : timespan_t::from_seconds( 0.01 );
}
return t;

if ( first )
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::zero() ) : t / 2 ) : timespan_t::zero();
else
return t;
}

virtual void execute()
{
if ( first )
first = false;

death_knight_melee_attack_t::execute();
}


virtual void impact( action_state_t* s )
{
death_knight_melee_attack_t::impact( s );
Expand Down
31 changes: 19 additions & 12 deletions engine/class_modules/sc_mage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct mage_t : public player_t
// Benefits
struct benefits_t
{
benefit_t* arcane_charge[ 7 ];
benefit_t* arcane_charge[ 4 ]; // CHANGED 2014/4/15 - Arcane Charges max stack is 4 now, not 7.
benefit_t* dps_rotation;
benefit_t* dpm_rotation;
benefit_t* water_elemental;
Expand Down Expand Up @@ -123,14 +123,14 @@ struct mage_t : public player_t
const spell_data_t* icy_veins;
const spell_data_t* inferno_blast;
const spell_data_t* living_bomb;
const spell_data_t* loose_mana;
const spell_data_t* mana_gem;
const spell_data_t* mirror_image;
const spell_data_t* splitting_ice;


// Minor
const spell_data_t* arcane_brilliance;
const spell_data_t* loose_mana; // CHANGED 2014/4/15 - Loose mana is a minor glyph, not major.
const spell_data_t* mirror_image; // CHANGED 2014/4/15 - Mirror image is a minor glyph, not major.
} glyphs;


Expand Down Expand Up @@ -1021,7 +1021,6 @@ struct mage_spell_t : public spell_t

return c;
}

virtual timespan_t execute_time() const
{
timespan_t t = spell_t::execute_time();
Expand All @@ -1031,7 +1030,18 @@ struct mage_spell_t : public spell_t

return t;
}

// Ensures mastery for Arcane is only added to spells which call mage_spell_t, so things like the Legendary Cloak do not get modified. Added 4/15/2014
virtual double action_multiplier() const
{
double am=spell_t::action_multiplier();
if ( p() -> specialization() == MAGE_ARCANE )
{
double mana_pct= p() -> resources.pct( RESOURCE_MANA );
am *= 1.0 + mana_pct * p() -> composite_mastery_value();
}
return am;
}
//
virtual void schedule_execute( action_state_t* state = 0 )
{
spell_t::schedule_execute( state );
Expand Down Expand Up @@ -4591,18 +4601,13 @@ double mage_t::composite_player_multiplier( school_e school ) const
m *= 1.0 + buffs.incanters_absorption -> value() * buffs.incanters_absorption -> data().effectN( 1 ).percent();
}

if ( spec.mana_adept -> ok() )
{
double mana_pct = resources.pct( RESOURCE_MANA );
m *= 1.0 + mana_pct * cache.mastery_value();
}

if ( specialization() == MAGE_ARCANE )
cache.player_mult_valid[ school ] = false;

return m;
}


void mage_t::invalidate_cache( cache_e c )
{
player_t::invalidate_cache( c );
Expand Down Expand Up @@ -4663,6 +4668,8 @@ double mage_t::matching_gear_multiplier( attribute_e attr ) const
return 0.0;
}


}
// mage_t::reset ============================================================

void mage_t::reset()
Expand Down Expand Up @@ -4945,7 +4952,7 @@ struct mage_module_t : public module_t
virtual void combat_end ( sim_t* ) const {}
};

} // UNNAMED NAMESPACE
// UNNAMED NAMESPACE

const module_t* module_t::mage()
{
Expand Down
23 changes: 17 additions & 6 deletions engine/class_modules/sc_monk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,11 +1425,12 @@ struct melee_t : public monk_melee_attack_t


int sync_weapons;
bool first;
tiger_strikes_melee_attack_t* tsproc;

melee_t( const std::string& name, monk_t* player, int sw ) :
monk_melee_attack_t( name, player, spell_data_t::nil() ),
sync_weapons( sw ), tsproc( nullptr )
sync_weapons( sw ), tsproc( nullptr ), first( true )
{
background = true;
repeating = true;
Expand All @@ -1445,14 +1446,21 @@ struct melee_t : public monk_melee_attack_t
}
}

void reset()
{
monk_melee_attack_t::reset();

first = true;
}

virtual timespan_t execute_time() const
{
timespan_t t = monk_melee_attack_t::execute_time();
if ( ! player -> in_combat )
{
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::from_seconds( 0.2 ) ) : t / 2 ) : timespan_t::from_seconds( 0.01 );
}
return t;

if ( first )
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::zero() ) : t / 2 ) : timespan_t::zero();
else
return t;
}

void execute()
Expand All @@ -1462,6 +1470,9 @@ struct melee_t : public monk_melee_attack_t
if ( p() -> buff.channeling_soothing_mist -> check() )
return;

if ( first )
first = false;

if ( time_to_execute > timespan_t::zero() && player -> executing )
{
if ( sim -> debug ) sim -> out_debug.printf( "Executing '%s' during melee (%s).", player -> executing -> name(), util::slot_type_string( weapon -> slot ) );
Expand Down
4 changes: 2 additions & 2 deletions engine/class_modules/sc_rogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,7 @@ struct melee_t : public rogue_attack_t
timespan_t t = rogue_attack_t::execute_time();
if ( first )
{
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::from_seconds( 0.01 ) ) : t / 2 ) : timespan_t::from_seconds( 0.01 );
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::zero() ) : t / 2 ) : timespan_t::zero();
}
return t;
}
Expand Down Expand Up @@ -3198,7 +3198,7 @@ void rogue_t::init_action_list()
// Rotation
def -> add_action( this, "Slice and Dice", "if=buff.slice_and_dice.remains<2|(buff.slice_and_dice.remains<15&buff.bandits_guile.stack=11&combo_points>=4)" );

def -> add_talent( this, "Marked for Death", "if=combo_points=0&dot.revealing_strike.ticking" );
def -> add_talent( this, "Marked for Death", "if=combo_points<=1&dot.revealing_strike.ticking" );

// Generate combo points, or use combo points
def -> add_action( "run_action_list,name=generator,if=combo_points<5|(talent.anticipation.enabled&anticipation_charges<=4&!dot.revealing_strike.ticking)" );
Expand Down
2 changes: 1 addition & 1 deletion engine/class_modules/sc_shaman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2420,7 +2420,7 @@ struct melee_t : public shaman_melee_attack_t
timespan_t t = shaman_melee_attack_t::execute_time();
if ( first )
{
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::from_seconds( 0.01 ) ) : t / 2 ) : timespan_t::from_seconds( 0.01 );
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::zero() ) : t / 2 ) : timespan_t::zero();
}

if ( swing_timer_variance > 0 )
Expand Down
34 changes: 18 additions & 16 deletions engine/class_modules/sc_warrior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,11 @@ void warrior_attack_t::impact( action_state_t* s )
struct melee_t : public warrior_attack_t
{
int sync_weapons;
bool first;

melee_t( const std::string& name, warrior_t* p, int sw ) :
warrior_attack_t( name, p, spell_data_t::nil() ),
sync_weapons( sw )
sync_weapons( sw ), first( true )
{
school = SCHOOL_PHYSICAL;
may_glance = true;
Expand All @@ -900,20 +901,20 @@ struct melee_t : public warrior_attack_t
if ( p -> dual_wield() ) base_hit -= 0.19;
}

void reset()
{
warrior_attack_t::reset();

first = true;
}

virtual timespan_t execute_time() const
{
timespan_t t = warrior_attack_t::execute_time();

if ( player -> in_combat )
if ( first )
return ( weapon -> slot == SLOT_OFF_HAND ) ? ( sync_weapons ? std::min( t / 2, timespan_t::zero() ) : t / 2 ) : timespan_t::zero();
else
return t;

if ( weapon -> slot == SLOT_MAIN_HAND || sync_weapons )
return timespan_t::from_seconds( 0.02 );

// Before combat begins, unless we are under sync_weapons the OH is
// delayed by half its swing time.

return timespan_t::from_seconds( 0.02 ) + t / 2;
}

virtual void execute()
Expand All @@ -922,6 +923,8 @@ struct melee_t : public warrior_attack_t
// must be applied before the (repeating) event schedule, and the decrement
// here must be done before it.
trigger_flurry( this, -1 );
if ( first )
first = false;

warrior_t*p = cast();

Expand All @@ -946,9 +949,8 @@ struct melee_t : public warrior_attack_t
}
// Any attack that hits or is dodged/blocked/parried generates rage
if ( s -> result != RESULT_MISS )
{
trigger_rage_gain();
}

}

virtual double action_multiplier() const
Expand Down Expand Up @@ -3600,11 +3602,11 @@ void warrior_t::apl_tg_fury()
single_target -> add_action( this, "Heroic Leap", "if=debuff.colossus_smash.up" );
single_target -> add_action( this, "Bloodthirst", "if=!buff.enrage.up" );
single_target -> add_action( "storm_bolt,if=enabled&debuff.colossus_smash.up" );
single_target -> add_action( this, "Raging Blow", "if=buff.raging_blow.stack=2&debuff.colossus_smash.up&target.health.pct>=20",
single_target -> add_action( this, "Raging Blow", "if=buff.raging_blow.stack=2&debuff.colossus_smash.up",
"Delay Bloodthirst if 2 stacks of raging blow are available inside Colossus Smash." );
single_target -> add_action( "dragon_roar,if=enabled&(!debuff.colossus_smash.up&(buff.bloodbath.up|!talent.bloodbath.enabled))" );
single_target -> add_action( this, "Bloodthirst" );
single_target -> add_action( this, "Wild Strike", "if=buff.bloodsurge.react&target.health.pct>=20&cooldown.bloodthirst.remains<=1",
single_target -> add_action( this, "Wild Strike", "if=buff.bloodsurge.react&cooldown.bloodthirst.remains<=1&cooldown.bloodthirst.remains>0.3",
"The GCD reduction of the Bloodsurge buff allows 3 Wild Strikes in-between Bloodthirst." );
single_target -> add_action( this, "Colossus Smash", "" ,
"The debuff from Colossus Smash lasts 6.5 seconds and also has 0.25~ seconds of travel time. This allows 4 1.5 second globals to be used inside of it every time now." );
Expand All @@ -3613,8 +3615,8 @@ void warrior_t::apl_tg_fury()
single_target -> add_action( this, "Raging Blow", "if=target.health.pct<20|buff.raging_blow.stack=2|debuff.colossus_smash.up|buff.raging_blow.remains<=3" );
single_target -> add_action( "#ravager" );
single_target -> add_action( "bladestorm,if=enabled,interrupt_if=cooldown.bloodthirst.remains<1" );
single_target -> add_action( this, "Wild Strike", "if=buff.bloodsurge.up" );
single_target -> add_action( this, "Raging Blow", "if=cooldown.colossus_smash.remains>=1" );
single_target -> add_action( this, "Wild Strike", "if=buff.bloodsurge.up" );
single_target -> add_action( "shockwave,if=enabled" );
single_target -> add_action( this, "Wild Strike", "if=(debuff.colossus_smash.up|(cooldown.colossus_smash.remains>=2&rage>=70))&target.health.pct>=20" );
single_target -> add_action( "impending_victory,if=enabled&target.health.pct>=20&cooldown.colossus_smash.remains>=1.5" );
Expand Down
Loading

0 comments on commit 0536333

Please sign in to comment.