PHP код:
	
struct unstable_affliction_t : public warlock_spell_t
{
  unstable_affliction_t( player_t* player, const std::string& options_str ) :
      warlock_spell_t( "unstable_affliction", player, SCHOOL_SHADOW, TREE_AFFLICTION )
  {
    warlock_t* p = player -> cast_warlock();
    check_talent( p -> talents.unstable_affliction );
    option_t options[] =
    {
      { NULL, OPT_UNKNOWN, NULL }
    };
    parse_options( options, options_str );
    static rank_t ranks[] =
    {
      { 80, 5,  0, 0, 230, 0.15 },
      { 75, 4,  0, 0, 197, 0.15 },
      { 70, 3,  0, 0, 175, 400  },
      { 60, 2,  0, 0, 155, 315  },
      { 0, 0, 0, 0, 0, 0 }
    };
    init_rank( ranks, 47843 );
    base_execute_time = 1.5;
    base_tick_time    = 3.0;
    num_ticks         = 5;
    tick_power_mod    = base_tick_time / 15.0;
    base_cost        *= 1.0 - p -> talents.suppression * 0.02;
    base_multiplier  *= 1.0 + ( p -> talents.shadow_mastery * 0.03 +
                                p -> set_bonus.tier8_2pc_caster() * 0.20 + // FIXME! assuming additive
                                p -> set_bonus.tier9_4pc_caster() * 0.10 +
                                ( ( p -> talents.siphon_life ) ? 0.05 : 0 ) );
    tick_power_mod   += p -> talents.everlasting_affliction * 0.01;
    dot = p -> get_dot( "immo_ua" );
    if ( p -> talents.pandemic )
    {
      base_crit_bonus_multiplier = 2;
      tick_may_crit = true;
      base_crit += p -> talents.malediction * 0.03;
    }
    if ( p -> glyphs.unstable_affliction )
    {
      base_execute_time = 1.3;
      //trigger_gcd     = 1.3; latest research seems to imply it does not affect the gcd
    }
    observer = &( p -> active_unstable_affliction );
  }
  virtual void tick()
  {
    warlock_t* p = player -> cast_warlock();
    warlock_spell_t::tick();
    if ( p -> set_bonus.tier10_4pc_caster() && tick_dmg > 0 )
    {
      p -> buffs_tier10_4pc_caster -> trigger();
    }
  }
};