tjc12821

Untitled

Oct 28th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.47 KB | None | 0 0
  1.   virtual void execute() override
  2.   {
  3.     hunter_melee_attack_t::execute();
  4.  
  5.     timespan_t animal_instincts = -p() -> find_spell( 232646 ) -> effectN( 1 ).time_value() * 1000;
  6.  
  7.     if ( p() -> active.pet )
  8.       p() -> active.pet -> active.flanking_strike -> execute();
  9.  
  10.     if ( p() -> talents.animal_instincts -> ok() )
  11.     {
  12.       p() -> animal_instincts_cds.clear();
  13.  
  14.       if ( !p() -> cooldowns.flanking_strike -> up() )
  15.         p() -> animal_instincts_cds.push_back( std::make_pair( p() -> cooldowns.flanking_strike, p() -> procs.animal_instincts_flanking ) );
  16.       if ( !p() -> cooldowns.mongoose_bite -> up() )
  17.         p() -> animal_instincts_cds.push_back( std::make_pair( p() -> cooldowns.mongoose_bite, p() -> procs.animal_instincts_mongoose ) );
  18.       if ( !p() -> cooldowns.aspect_of_the_eagle -> up() )
  19.         p() -> animal_instincts_cds.push_back( std::make_pair( p() -> cooldowns.aspect_of_the_eagle, p() -> procs.animal_instincts_aspect ) );
  20.       if ( !p() -> cooldowns.harpoon -> up() )
  21.         p() -> animal_instincts_cds.push_back( std::make_pair( p() -> cooldowns.harpoon, p() -> procs.animal_instincts_harpoon ) );
  22.  
  23.       if ( !p() -> animal_instincts_cds.empty() )
  24.       {
  25.         unsigned roll =
  26.           as<unsigned>( p() -> rng().range( 0, p() -> animal_instincts_cds.size() ) );
  27.  
  28.         p() -> animal_instincts_cds[roll].first -> adjust( animal_instincts );
  29.         p() -> animal_instincts_cds[roll].second -> occur();
  30.       }
  31.     }
  32.   }
Add Comment
Please, Sign In to add comment