Skip to content

Commit

Permalink
Remove find_mastery_spell( string, id ), passing specialization_e is …
Browse files Browse the repository at this point in the history
…better future proofing and still allows for a string and id to be passed in.

git-svn-id: https://simulationcraft.googlecode.com/svn/branches/mop@11709 3b4652a1-8050-0410-ac47-3d40261b0f8b
  • Loading branch information
swbusche committed Apr 25, 2012
1 parent 88e86ab commit 84afd3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
6 changes: 3 additions & 3 deletions engine/class_modules/sc_paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2669,9 +2669,9 @@ void paladin_t::init_spells()
spells.guardian_of_ancient_kings_ret = find_class_spell( "Guardian Of Ancient Kings", std::string(), PALADIN_RETRIBUTION );

// Masteries
passives.divine_bulwark = find_mastery_spell( "Divine Bulwark" );
passives.hand_of_light = find_mastery_spell( "Hand of Light" );
passives.illuminated_healing = find_mastery_spell( "Illuminated Healing" );
passives.divine_bulwark = find_mastery_spell( PALADIN_PROTECTION );
passives.hand_of_light = find_mastery_spell( PALADIN_RETRIBUTION );
passives.illuminated_healing = find_mastery_spell( PALADIN_HOLY );
// Passives

// Shared Passives
Expand Down
18 changes: 0 additions & 18 deletions engine/sc_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5514,20 +5514,6 @@ const spell_data_t* player_t::find_specialization_spell( const std::string& name

// player_t::find_mastery_spell =============================================

const spell_data_t* player_t::find_mastery_spell( const std::string& name, const std::string& token )
{
unsigned spell_id = dbc.mastery_ability_id( spec, name.c_str() );

if ( ! spell_id || ! dbc.spell( spell_id ) || ( ( int )dbc.spell( spell_id ) -> level() > level ) )
return ( spell_data_t::not_found() );

dbc_t::add_token( spell_id, token, dbc.ptr );

return ( dbc.spell( spell_id ) );
}

// player_t::find_mastery_spell =============================================

const spell_data_t* player_t::find_mastery_spell( specialization_e s, const std::string& token, uint32_t idx )
{
unsigned spell_id = dbc.mastery_ability_id( s, idx );
Expand Down Expand Up @@ -5559,10 +5545,6 @@ const spell_data_t* player_t::find_spell( const std::string& name, const std::st
if ( sp -> ok() ) return sp;
}

sp = find_mastery_spell( name, token );
assert( sp );
if ( sp -> ok() ) return sp;

sp = find_talent_spell( name, token );
assert( sp );
if ( sp -> ok() ) return sp;
Expand Down
1 change: 0 additions & 1 deletion engine/simulationcraft.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3769,7 +3769,6 @@ struct player_t : public noncopyable
virtual const spell_data_t* find_talent_spell( const std::string& name, const std::string& token = std::string() );
virtual const spell_data_t* find_glyph_spell( const std::string& name, const std::string& token = std::string() );
virtual const spell_data_t* find_specialization_spell( const std::string& name, const std::string& token = std::string(), specialization_e s = SPEC_NONE );
virtual const spell_data_t* find_mastery_spell( const std::string& name, const std::string& token = std::string() );
virtual const spell_data_t* find_mastery_spell( specialization_e s, const std::string& token = std::string(), uint32_t idx = 0 );
virtual const spell_data_t* find_spell( const std::string& name, const std::string& token = std::string(), specialization_e s = SPEC_NONE );
virtual const spell_data_t* find_spell( const unsigned int id, const std::string& token = std::string() );
Expand Down

0 comments on commit 84afd3a

Please sign in to comment.