tjc12821

Untitled

Jul 25th, 2015
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.16 KB | None | 0 0
  1.   virtual void tick( dot_t* d )
  2.   {
  3.     warlock_spell_t::tick( d );
  4.  
  5.     if ( p() -> spec.nightfall -> ok() && d -> state -> target == p() -> latest_corruption_target && ! periodic_hit ) //5.4 only the latest corruption procs it
  6.     {
  7.  
  8.       double nightfall_chance = p() -> spec.nightfall -> effectN( 1 ).percent() / 10;
  9.  
  10.       if ( p() -> sets.has_set_bonus( WARLOCK_AFFLICTION, T17, B2 ) && td( d -> state -> target ) -> dots_drain_soul -> is_ticking() && td( d -> state -> target ) -> dots_agony -> is_ticking() && td( d -> state -> target ) -> dots_unstable_affliction -> is_ticking() ) //Caster Has T17 2pc and UA/Agony are ticking as well on the target
  11.       {
  12.         nightfall_chance += p() -> sets.set( WARLOCK_AFFLICTION, T17, B2 ) -> effectN( 1 ).percent();
  13.       }
  14.  
  15.       if ( rng().roll( nightfall_chance ) )
  16.       {
  17.         if ( p() -> double_nightfall == 3 )
  18.         {
  19.           p() -> resource_gain( RESOURCE_SOUL_SHARD, 2, p() -> gains.nightfall );
  20.           p() -> double_nightfall = 0;
  21.         }
  22.         else
  23.         {
  24.           p() -> resource_gain( RESOURCE_SOUL_SHARD, 1, p() -> gains.nightfall );
  25.           ++p() -> double_nightfall;
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment