Guest User

AssignRandomPerks

a guest
Dec 17th, 2015
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AssignRandomPerks()
  2. {
  3.     local XComGame.XGTacticalGameCoreNativeBase.EPerkType ePerk[2];
  4.     local XComPerkManager kPerkMan;
  5.     local int I, J;
  6.  
  7.     ePerk[1] = GetClass();
  8.     kPerkMan = PERKS();
  9.     m_arrRandomPerks.Length = 0;
  10.     I = 1;
  11.     J0x42:
  12.     // End:0x209 [Loop If]
  13.     if(I < 8)
  14.     {
  15.         J = 0;
  16.         J0x5D:
  17.         // End:0x1FB [Loop If]
  18.         if(J < 3)
  19.         {
  20.             // End:0x98
  21.             if(true)
  22.             {
  23.                 // End:0x98
  24.                 if(I > 1)
  25.                 {
  26.                     ePerk[1] = byte(m_iEnergy);
  27.                 }
  28.             }
  29.             ePerk[0] = kPerkMan.GetPerkInTree(ePerk[1], I, J);
  30.             // End:0x111
  31.             if(kPerkMan.IsFixedPerk(ePerk[0]))
  32.             {
  33.             }
  34.             // End:0x1D5
  35.             else
  36.             {
  37.                 // End:0x16A
  38.                 if(!IsOptionEnabled(4))
  39.                 {
  40.                     // End:0x167
  41.                     if(HasPerk(ePerk[0]))
  42.                     {
  43.                         ePerk[0] = kPerkMan.GetPerk(71);
  44.                     }
  45.                 }
  46.                 // End:0x1D5
  47.                 else
  48.                 {
  49.                     // End:0x1D5
  50.                     if(false || m_iEnergy < 30)
  51.                     {
  52.                         ePerk[0] = 0;
  53.                         J0x18D:
  54.                         // End:0x1D5 [Loop If]
  55.                         if(!IsRandomPerkValidToAdd(ePerk[0]))
  56.                         {
  57.                             ePerk[0] = kPerkMan.GetRandomPerk();
  58.                             // [Loop Continue]
  59.                             goto J0x18D;
  60.                         }
  61.                     }
  62.                 }
  63.             }
  64.             m_arrRandomPerks.AddItem(ePerk[0]);
  65.             ++ J;
  66.             // [Loop Continue]
  67.             goto J0x5D;
  68.         }
  69.         ++ I;
  70.         // [Loop Continue]
  71.         goto J0x42;
  72.     }
  73.     //return;    
  74. }
Advertisement
Add Comment
Please, Sign In to add comment