PlayerUnknowns

[C++] Restrict skill squandering magic

Oct 22nd, 2017
767
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.08 KB | None | 0 0
  1. //@Source/Game/char_skill.cpp
  2. //1.)   [RO] Cauta:
  3. //      [EN] Search:
  4. if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_REMOVE_GOOD_AFFECT))
  5. //2.)   [RO] Inlocuieste cu:
  6. //      [EN] Replaces with:
  7.             if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_REMOVE_GOOD_AFFECT))
  8.             {
  9.                 int level_atacator = m_pkChr->GetLevel();
  10.                 int level_tinta = pkChrVictim->GetLevel();
  11.                 int diferenta_level = 10;
  12.                 if ((level_atacator-diferenta_level <= level_tinta))
  13.                 {
  14.                     int iAmount2 = (int) m_pkSk->kPointPoly2.Eval();
  15.                     int iDur2 = (int) m_pkSk->kDurationPoly2.Eval();
  16.                     iDur2 += m_pkChr->GetPoint(POINT_PARTY_BUFFER_BONUS);
  17.  
  18.                     if (number(1, 100) <= iAmount2)
  19.                     {
  20.                         pkChrVictim->RemoveGoodAffect();
  21.                         pkChrVictim->AddAffect(m_pkSk->dwVnum, POINT_NONE, 0, AFF_PABEOP, iDur2, 0, true);
  22.                     }
  23.                 }
  24.             }
  25. //[RO] Diferenta de level se aplicata doar atacatorilor mai mici decat tinta aleasa.
  26.        Acest codat a fost creat de Martysama si edita de către mine.
  27. //[EN] The level difference applies only to smaller attackers than the victim chosen.
  28.        This coded was created by Martysama and edited by me.
Add Comment
Please, Sign In to add comment