Guest User

Untitled

a guest
Jul 17th, 2011
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. DWORD __thiscall sub_5B2BD0(CGUnit_C *this, int powertype)
  2. {
  3. CGUnit_C *v2; // esi@1
  4. int ind; // eax@2
  5. int ind2; // eax@6
  6.  
  7. v2 = this;
  8. if ( *(_DWORD *)(dword_E96454 + 48) ) // if predicted power == true
  9. {
  10. ind = CGUnit_C__GetPowerIndex(this, powertype);
  11. if ( ind != -1 )
  12. return v2->unitclass[ind + 577];
  13. }
  14. else
  15. {
  16. if ( powertype == 4294967294 ) // health
  17. return this->UnitData->UNIT_FIELD_HEALTH;
  18. ind2 = CGUnit_C__GetPowerIndex(this, powertype);
  19. if ( ind2 != -1 )
  20. return *(&v2->UnitData->UNIT_FIELD_POWER1 + ind2);
  21. }
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment