コード例 #1
0
ファイル: OF_CAMP.cpp プロジェクト: spippolatore/7kaa
//--------- Begin of function FirmCamp::deinit ---------//
//
void FirmCamp::deinit()
{
	int firmRecno = firm_recno;		// save the firm_recno first for reset_unit_home_camp()

	Firm::deinit();

	//-------------------------------------------//

	int saveOverseerRecno = overseer_recno;

	overseer_recno = 0;     // set overseer_recno to 0 when calling update_influence(), so this base is disregarded.

	update_influence();

	overseer_recno = saveOverseerRecno;

	clear_defense_mode();

	//---- reset all units whose home_camp_firm_recno is this firm ----//

	reset_unit_home_camp(firmRecno);		// this must be called at last as Firm::deinit() will create new units.

	//--- if this camp is in the Nation::attack_camp_array[], remove it now ---//

	reset_attack_camp(firmRecno);
}
コード例 #2
0
ファイル: of_camp.cpp プロジェクト: mecirt/7k2
//--------- Begin of function FirmCamp::deinit ---------//
//
void FirmCamp::deinit()
{
	int firmRecno = firm_recno;		// save the firm_recno first for reset_unit_home_camp()

	Firm::deinit();

	//-------------------------------------------//

	update_influence();

	//---- reset all units whose home_camp_firm_recno is this firm ----//

	reset_unit_home_camp(firmRecno);		// this must be called at last as Firm::deinit() will create new units.

	//--- if this camp is in the Nation::attack_camp_array[], remove it now ---//

	reset_attack_camp(firmRecno);
}
コード例 #3
0
ファイル: OF_CAMP.cpp プロジェクト: spippolatore/7kaa
//--------- Begin of function FirmCamp::assign_overseer ---------//
//
void FirmCamp::assign_overseer(int overseerRecno)
{
	//---- reset the team member count of the general ----//

	if( overseerRecno )
	{
		Unit* unitPtr = unit_array[overseerRecno];

		err_when( !unitPtr->race_id );
		err_when( unitPtr->rank_id != RANK_GENERAL && unitPtr->rank_id != RANK_KING );
		err_when( !unitPtr->team_info );

		unitPtr->team_info->member_count = 0;
		unitPtr->home_camp_firm_recno 	= 0;
	}

	//----- assign the overseer now -------//

	Firm::assign_overseer(overseerRecno);

	//------------- update influence -----------//

	update_influence();
}