Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(builtUnit != NULL) {
- u32 hpGain = getHPGainForRepair(builtUnit);
- bool extraBuild = false;
- if (scbw::get_generic_value(builtUnit, ValueId::CrucibleValue) == 0) {
- auto r = 256;
- auto n = unitRangeCount(NULL, CFlags::NoInvincible | CFlags::Ally, { UnitId::ProtossCrucible });
- scbw::UnitFinder unitsInSplash(builtUnit->position.x - r, builtUnit->position.y - r,
- builtUnit->position.x + r, builtUnit->position.y + r);
- for (int i = 0; i < unitsInSplash.getUnitCount(); i++) {
- auto unit = unitsInSplash.getUnit(i);
- if (n.match(unit)) {
- scbw::set_generic_value(builtUnit, ValueId::CrucibleValue, 5);//6 is ~100/15
- buildingAddon(builtUnit, hpGain, TRUE);
- if (builtUnit->status & UnitStatus::Completed) {
- extraBuild = true;
- }
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement