tjc12821

Untitled

May 24th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1.   void consume_resource() override
  2.   {
  3.     spell_t::consume_resource();
  4.  
  5.     if ( resource_current == RESOURCE_SOUL_SHARD )
  6.     {
  7.       if ( p() -> legendary.the_master_harvester )
  8.       {
  9.         timespan_t sh_duration = p() -> find_spell( 248113 ) -> effectN( 4 ).time_value() * 1000;
  10.         double sh_proc_chance;
  11.         switch ( p() -> specialization() )
  12.         {
  13.         case WARLOCK_AFFLICTION:
  14.           sh_proc_chance = p() -> find_spell( 248113 ) -> effectN( 1 ).percent();
  15.           break;
  16.         case WARLOCK_DEMONOLOGY:
  17.           sh_proc_chance = p() -> find_spell( 248113 ) -> effectN( 2 ).percent();
  18.           break;
  19.         case WARLOCK_DESTRUCTION:
  20.           sh_proc_chance = p() -> find_spell( 248113 ) -> effectN( 3 ).percent();
  21.           break;
  22.         }
  23.        
  24.         for ( int i = 0; i < last_resource_cost; i++ )
  25.         {
  26.           if ( p() -> rng().roll( sh_proc_chance ) )
  27.           {
  28.             p() -> buffs.soul_harvest -> trigger( 1, buff_t::DEFAULT_VALUE(), -1.0, sh_duration );
  29.             p() -> procs.the_master_harvester -> occur();
  30.           }
  31.         }
  32.  
  33.       }
Advertisement
Add Comment
Please, Sign In to add comment