AIEventCompanyMerger Class Reference

Event Company Merger, indicating a company has been bought by another company. More...

Inheritance diagram for AIEventCompanyMerger:

AIEvent AIObject

Public Member Functions

 AIEventCompanyMerger (Owner old_owner, Owner new_owner)
AICompany::CompanyID GetOldCompanyID ()
 Get the CompanyID of the company that has been bought.
AICompany::CompanyID GetNewCompanyID ()
 Get the CompanyID of the new owner.

Static Public Member Functions

static AIEventCompanyMergerConvert (AIEvent *instance)
 Convert an AIEvent to the real instance.

Detailed Description

Event Company Merger, indicating a company has been bought by another company.

Constructor & Destructor Documentation

AIEventCompanyMerger::AIEventCompanyMerger ( Owner  old_owner,
Owner  new_owner 
) [inline]

Parameters:
old_owner The company bought off.
new_owner The company that bougth owner.


Member Function Documentation

static AIEventCompanyMerger* AIEventCompanyMerger::Convert ( AIEvent instance  )  [inline, static]

Convert an AIEvent to the real instance.

Parameters:
instance The instance to convert.
Returns:
The converted instance.

AICompany::CompanyID AIEventCompanyMerger::GetOldCompanyID (  )  [inline]

Get the CompanyID of the company that has been bought.

Returns:
The CompanyID of the company that has been bought.
Note:
: The value below is not valid anymore as CompanyID, and AICompany::ResolveCompanyID will return COMPANY_COMPANY. It's only usefull if you're keeping track of company's yourself.

AICompany::CompanyID AIEventCompanyMerger::GetNewCompanyID (  )  [inline]

Get the CompanyID of the new owner.

Returns:
The CompanyID of the new owner.


Generated on Wed Sep 15 14:11:49 2010 for OpenTTD NoAI API by  doxygen 1.5.6