//--------- Begin of function FirmCamp::assign_unit ---------// // void FirmCamp::assign_unit(int unitRecno) { Unit* unitPtr = unit_array[unitRecno]; //------- if this is a construction worker -------// if( unitPtr->skill.skill_id == SKILL_CONSTRUCTION ) { set_builder(unitRecno); return; } //-------- assign the unit ----------// int rankId = unit_array[unitRecno]->rank_id; if( rankId == RANK_GENERAL || rankId==RANK_KING ) { assign_overseer(unitRecno); } else { assign_worker(unitRecno); } }
//--------- Begin of function FirmBase::assign_unit ---------// // void FirmBase::assign_unit(int unitRecno) { Unit* unitPtr = unit_array[unitRecno]; //### begin alex 18/9 ###// /*//------ only assign units of the right race ------// if( unitPtr->race_id != race_id ) return;*/ //#### end alex 18/9 ####// //------- if this is a construction worker -------// if( unitPtr->skill.skill_id == SKILL_CONSTRUCTION ) { set_builder(unitRecno); return; } //### begin alex 18/9 ###// //------ only assign units of the right race ------// if( unitPtr->race_id != race_id ) return; //#### end alex 18/9 ####// //-------- assign the unit ----------// int rankId = unit_array[unitRecno]->rank_id; if( rankId == RANK_GENERAL || rankId==RANK_KING ) { assign_overseer(unitRecno); } else { assign_worker(unitRecno); } }