Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DWORD __thiscall sub_5B2BD0(CGUnit_C *this, int powertype)
- {
- CGUnit_C *v2; // esi@1
- int ind; // eax@2
- int ind2; // eax@6
- v2 = this;
- if ( *(_DWORD *)(dword_E96454 + 48) ) // if predicted power == true
- {
- ind = CGUnit_C__GetPowerIndex(this, powertype);
- if ( ind != -1 )
- return v2->unitclass[ind + 577];
- }
- else
- {
- if ( powertype == 4294967294 ) // health
- return this->UnitData->UNIT_FIELD_HEALTH;
- ind2 = CGUnit_C__GetPowerIndex(this, powertype);
- if ( ind2 != -1 )
- return *(&v2->UnitData->UNIT_FIELD_POWER1 + ind2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment