Advertisement
hitplusone

Shield Block doubles the BV cap

Jun 8th, 2011
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.29 KB | None | 0 0
  1. \src\server\game\Entities\Player\Player.cpp
  2.  
  3. uint32 Player::GetShieldBlockValue(bool ForDamagingSpell) const
  4. {
  5.     float value = (m_auraBaseMod[SHIELD_BLOCK_VALUE][FLAT_MOD] + GetStat(STAT_STRENGTH) * 0.5f - 10)*m_auraBaseMod[SHIELD_BLOCK_VALUE][PCT_MOD];
  6.  
  7.         if (ForDamagingSpell == true)
  8.         {
  9.             uint8 level = getLevel();
  10.             uint16 softCap = level * 30;
  11.             float hardCap = level * 34.5f;
  12.             float hardCapBaseBlockValue = level * 39.5f;
  13.  
  14.             //If value less than softCap then don't have to modify.
  15.  
  16.             //eddig ugye Shield Block nem növelte a cap-et duplájára
  17.             /*if (value >= hardCapBaseBlockValue)
  18.                 value = hardCap;
  19.             else if (value > softCap)
  20.                 value = softCap + 0.95f * (value - softCap) - 0.000625f * pow(value - softCap, 2);*/
  21.  
  22.             //ha Shield Block van, a cap is dupla lesz
  23.             if(HasAura(2565))
  24.             {  
  25.                 if (value >= hardCapBaseBlockValue)
  26.                     value = hardCap * 2;
  27.                 else if (value > softCap)
  28.                     value = (softCap + 0.95f * (value - softCap) - 0.000625f * pow(value - softCap, 2)) *2 ;
  29.             }
  30.             else
  31.             {
  32.                 if (value >= hardCapBaseBlockValue)
  33.                     value = hardCap;
  34.                 else if (value > softCap)
  35.                     value = softCap + 0.95f * (value - softCap) - 0.000625f * pow(value - softCap, 2);
  36.             }
  37.            
  38.         }
  39.  
  40.     value = (value < 0) ? 0 : value;
  41.  
  42.     return uint32(value);
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement