Skip to content
Permalink
Browse files

fix some warnings.

  • Loading branch information...
scamille committed Nov 6, 2019
1 parent c7c665c commit d8ee6b8aca27fef9d51a4e786997c3ca7cd57900
@@ -602,9 +602,9 @@ priest_t::priest_t( sim_t* sim, const std::string& name, race_e r )
active_items(),
pets(),
options(),
insanity( *this ),
azerite(),
azerite_essence()
azerite_essence(),
insanity(*this)
{
create_cooldowns();
create_gains();
@@ -5099,7 +5099,7 @@ void demon_hunter_t::apl_default()

// demon_hunter_t::apl_havoc ================================================

void add_havoc_use_items( demon_hunter_t* p, action_priority_list_t* apl )
void add_havoc_use_items( demon_hunter_t*, action_priority_list_t* apl )
{
apl->add_action( "use_item,name=galecallers_boon,if=!talent.fel_barrage.enabled|cooldown.fel_barrage.ready" );
apl->add_action( "use_item,effect_name=cyclotronic_blast,if=buff.metamorphosis.up&buff.memory_of_lucid_dreams.down&(!variable.blade_dance|!cooldown.blade_dance.ready)" );
@@ -6878,7 +6878,7 @@ struct starsurge_t : public druid_spell_t

// emulate performing check_form_restriction()
auto it =
range::find_if( apl, [this]( action_t* a ) { return util::str_compare_ci( a->name(), "moonkin_form" ); } );
range::find_if( apl, []( action_t* a ) { return util::str_compare_ci( a->name(), "moonkin_form" ); } );
if ( it == apl.end() )
return false;

@@ -2612,7 +2612,7 @@ struct monk_action_t : public Base
// The set bonus checks for last 3 unique combo strike triggering abilities
void t19_4pc_bonus_trigger()
{
int n = p()->combo_strike_actions.size();
auto n = p()->combo_strike_actions.size();

// Note that this must be called after the current action has been appended
if ( n < 3 )
@@ -600,7 +600,7 @@ struct rogue_t : public player_t
action_t* create_action( const std::string& name, const std::string& options ) override;
expr_t* create_expression( const std::string& name_str ) override;
void regen( timespan_t periodicity ) override;
double resource_gain( resource_e, double, gain_t* g = nullptr, action_t* a = nullptr );
double resource_gain( resource_e, double, gain_t* g = nullptr, action_t* a = nullptr ) override;
resource_e primary_resource() const override { return RESOURCE_ENERGY; }
role_e primary_role() const override { return ROLE_ATTACK; }
stat_e convert_hybrid_stat( stat_e s ) const override;
@@ -7116,6 +7116,8 @@ void rogue_t::init_special_effects()
case ROGUE_SUBTLETY:
options.memory_of_lucid_dreams_proc_chance = 0.15;
break;
default:
break;
}
}
}
@@ -7485,6 +7487,8 @@ void rogue_t::vision_of_perfection_proc()
}
break;
}
default:
break;
}
}

@@ -1332,6 +1332,8 @@ struct warlock_module_t : public module_t
warlock::warlock_t::pets_t::pets_t( warlock_t* w ) :
active( nullptr ),
last( nullptr ),
vop_infernals("vop_infernal", w),
vop_darkglares("vop_darkglare", w),
dreadstalkers( "dreadstalker", w ),
vilefiends( "vilefiend", w ),
demonic_tyrants( "demonic_tyrant", w ),
@@ -1345,9 +1347,7 @@ warlock::warlock_t::pets_t::pets_t( warlock_t* w ) :
vicious_hellhounds( "vicious_hellhound", w ),
illidari_satyrs( "illidari_satyr", w ),
eyes_of_guldan( "eye_of_guldan", w ),
prince_malchezaar( "prince_malchezaar", w ),
vop_darkglares( "vop_darkglare", w ),
vop_infernals( "vop_infernal", w )
prince_malchezaar( "prince_malchezaar", w )
{ }
}

@@ -867,16 +867,16 @@ int item_database::scaled_stat( const item_t& item, const dbc_t& dbc, size_t idx
double v_socket_penalty = item.parsed.data.stat_socket_mul[ idx ] *
dbc.item_socket_cost( item.base_item_level() );

int v_raw = item.parsed.data.stat_alloc[ idx ] * item_budget * 0.0001 - v_socket_penalty + 0.5;
int v_raw = static_cast<int>(item.parsed.data.stat_alloc[ idx ] * item_budget * 0.0001 - v_socket_penalty + 0.5);
auto stat_type = static_cast<item_mod_type>( item.parsed.data.stat_type_e[ idx ] );

if ( util::is_combat_rating( stat_type ) )
{
v_raw = apply_combat_rating_multiplier( item, as<double>( v_raw ) );
v_raw = static_cast<int>(apply_combat_rating_multiplier( item, as<double>( v_raw ) ));
}
else if ( stat_type == ITEM_MOD_STAMINA )
{
v_raw = apply_stamina_multiplier( item, as<double>( v_raw ) );
v_raw = static_cast<int>(apply_stamina_multiplier( item, as<double>( v_raw ) ));
}

return v_raw;
@@ -3746,7 +3746,7 @@ void the_crucible_of_flame( special_effect_t& effect )
"ancient_flame", essence );
// Add rank 3 upgrade that increases stack count of the dot by some value
action->dot_max_stack +=
essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).base_value();
as<int>(essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).base_value());

effect.proc_flags_ = PF_MELEE_ABILITY | PF_RANGED_ABILITY | PF_NONE_SPELL | PF_MAGIC_SPELL | PF_PERIODIC;
effect.type = SPECIAL_EFFECT_EQUIP;
@@ -3814,7 +3814,7 @@ struct concentrated_flame_t : public azerite_essence_major_t
missile = new missile_t( p, essence );
add_child( missile );

cooldown->charges += essence.spell_ref( 3u, essence_spell::UPGRADE ).effectN( 1 ).base_value();
cooldown->charges += as<int>(essence.spell_ref( 3u, essence_spell::UPGRADE ).effectN( 1 ).base_value());

if ( essence.rank() >= 2 )
{
@@ -3895,10 +3895,10 @@ void blood_of_the_enemy( special_effect_t& effect )
{
buff_t* haste_buff;
double chance;
int dec;
int decrement_stacks;

bloodsoaked_callback_t( player_t* p, special_effect_t& e, buff_t* b, double c, int d ) :
dbc_proc_callback_t( p, e ), haste_buff( b ), chance( c ), dec( d )
bloodsoaked_callback_t( player_t* p, special_effect_t& e, buff_t* b, double c, int decrement_stacks) :
dbc_proc_callback_t( p, e ), haste_buff( b ), chance( c ), decrement_stacks(decrement_stacks)
{}

void execute( action_t*, action_state_t* ) override
@@ -3911,7 +3911,7 @@ void blood_of_the_enemy( special_effect_t& effect )
{
haste_buff->trigger();
if ( rng().roll( chance ) )
proc_buff->decrement( dec );
proc_buff->decrement(decrement_stacks);
else
proc_buff->expire();
}
@@ -3943,16 +3943,16 @@ void blood_of_the_enemy( special_effect_t& effect )
}

double chance = 0;
int dec = 0;
int decrement_stacks = 0;
if ( essence.rank() >= 3 )
{
// 25% chance to...
chance = essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).percent();
// only lose 30 stacks
dec = essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 2 ).base_value();
decrement_stacks = as<int>(essence.spell_ref(3u, essence_spell::UPGRADE, essence_type::MINOR).effectN(2).base_value());
}

new bloodsoaked_callback_t( effect.player, effect, haste_buff, chance, dec );
new bloodsoaked_callback_t( effect.player, effect, haste_buff, chance, decrement_stacks );
}

// Major Power: Blood of the Enemy
@@ -4022,10 +4022,10 @@ void essence_of_the_focusing_iris( special_effect_t& effect )
player_t* trigger_target;
int init_stacks;

focused_energy_driver_t( const special_effect_t& effect, int is ) :
focused_energy_driver_t( const special_effect_t& effect, int init_stacks ) :
dbc_proc_callback_t( effect.player, effect ),
trigger_target(),
init_stacks( is )
init_stacks( init_stacks )
{ }

void execute( action_t*, action_state_t* s ) override
@@ -4054,9 +4054,9 @@ void essence_of_the_focusing_iris( special_effect_t& effect )

effect.proc_flags2_ = PF2_ALL_HIT;

int is = 1;
int init_stacks = 1;
if ( essence.rank() >= 3 )
is = essence.spell_ref( 3u, essence_type::MINOR ).effectN( 1 ).base_value();
init_stacks = as<int>(essence.spell_ref( 3u, essence_type::MINOR ).effectN( 1 ).base_value());

double haste = essence.spell_ref( 1u, essence_type::MINOR ).effectN( 2 ).average( essence.item() );
if ( essence.rank() >= 2 )
@@ -4066,7 +4066,7 @@ void essence_of_the_focusing_iris( special_effect_t& effect )
effect.player->find_spell( 295248 ) )
->add_stat( STAT_HASTE_RATING, haste );

new focused_energy_driver_t( effect, is );
new focused_energy_driver_t( effect, init_stacks );
}

struct focused_azerite_beam_tick_t : public spell_t
@@ -4333,7 +4333,7 @@ void conflict_and_strife( special_effect_t& effect )
buff = make_buff<stat_buff_t>( effect.player, "strife", strife )
->add_stat( STAT_VERSATILITY_RATING, strife->effectN( 1 ).average( essence.item() ) )
->set_max_stack( strife->max_stacks()
+ essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).base_value() )
+ as<int>(essence.spell_ref( 3u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).base_value()) )
->set_duration( strife->duration()
+ essence.spell_ref( 2u, essence_spell::UPGRADE, essence_type::MINOR ).effectN( 1 ).time_value() );
}
@@ -4465,7 +4465,7 @@ struct purifying_blast_t : public azerite_essence_major_t
{
azerite_essence_major_t::execute();

int pulse_count = essence.spell_ref( 1u, essence_type::MAJOR ).effectN( 2 ).base_value();
int pulse_count = as<int>(essence.spell_ref( 1u, essence_type::MAJOR ).effectN( 2 ).base_value());
timespan_t pulse_interval = essence.spell_ref( 1u, essence_type::MAJOR ).duration() / (pulse_count - 1);

make_event<ground_aoe_event_t>( *sim, player, ground_aoe_params_t()
@@ -2722,7 +2722,7 @@ struct felmouth_frenzy_driver_t : public spell_t
felmouth_frenzy_driver_t( const special_effect_t& effect ) :
spell_t( "felmouth_frenzy", effect.player, effect.player -> find_spell( 188512 ) ),
bolt_avg( as<int>( effect.player -> find_spell( 188534 ) -> effectN( 1 ).trigger() -> effectN( 1 ).base_value() ) ),
bolt_magnitude( bolt_avg * effect.player -> find_spell( 188534 ) -> effectN( 1 ).trigger() -> effectN( 1 ).m_delta() / 2.0 ),
bolt_magnitude( as<int>(bolt_avg * effect.player -> find_spell( 188534 ) -> effectN( 1 ).trigger() -> effectN( 1 ).m_delta() / 2.0) ),
p( effect.player )
{
background = true;
@@ -2510,7 +2510,7 @@ struct vigor_engaged_t : public special_effect_t
oscillation::ASCENDING, oscillation::MAX_STATES ) ) );
double used_time = player->rng().range( 0, max_ticks[ phase ] *
driver()->effectN( 1 ).period().total_seconds() );
int ticks = used_time / driver()->effectN( 1 ).period().total_seconds();
int ticks = static_cast<int>(used_time / driver()->effectN( 1 ).period().total_seconds());
double elapsed_tick_time = used_time - ticks * driver()->effectN( 1 ).period().total_seconds();
double time_to_next_tick = driver()->effectN( 1 ).period().total_seconds() - elapsed_tick_time;

@@ -3738,7 +3738,7 @@ void items::vision_of_demise( special_effect_t& effect )

vision_of_demise_t( const special_effect_t& effect, stat_buff_t* b ) :
proc_spell_t( "vision_of_demise", effect.player, effect.driver() ),
divisor( effect.driver()->effectN( 1 ).base_value() ), buff( b ),
divisor( as<int>(effect.driver()->effectN( 1 ).base_value()) ), buff( b ),
bonus( effect.player->find_spell( 303455 )->effectN( 2 ).average( effect.item ) )
{ }

@@ -3806,14 +3806,14 @@ void items::azsharas_font_of_power( special_effect_t& effect )
{
timespan_t time = sim->bfa_opts.font_of_power_precombat_channel;

if ( time == 0_ms ) // No options override, first apply any spec-based hardcoded timings
{
switch ( player->specialization() )
{
// case DRUID_BALANCE: time = 7.5_s; break;
default: break;
}
}
//if ( time == 0_ms ) // No options override, first apply any spec-based hardcoded timings
//{
// switch ( player->specialization() )
// {
// // case DRUID_BALANCE: time = 7.5_s; break;
// default: break;
// }
//}

// shared cd (other trinkets & on-use items)
auto cdgrp = player->get_cooldown( effect->cooldown_group_name() );

0 comments on commit d8ee6b8

Please sign in to comment.
You can’t perform that action at this time.