AIEventCompanyAskMerger Class Reference

Event Company Ask Merger, indicating a company can be bought (cheaply) by you. More...

Inheritance diagram for AIEventCompanyAskMerger:

AIEvent

Public Member Functions

 AIEventCompanyAskMerger (Owner owner, int32 value)
AICompany::CompanyID GetCompanyID ()
 Get the CompanyID of the company that can be bought.
int32 GetValue ()
 Get the value of the new company.
bool AcceptMerger ()
 Take over the company for this merger.

Static Public Member Functions

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

Detailed Description

Event Company Ask Merger, indicating a company can be bought (cheaply) by you.

Constructor & Destructor Documentation

AIEventCompanyAskMerger::AIEventCompanyAskMerger ( Owner  owner,
int32  value 
)

Parameters:
owner The company that can be bough.
value The value/costs of buying the company.


Member Function Documentation

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

Convert an AIEvent to the real instance.

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

AICompany::CompanyID AIEventCompanyAskMerger::GetCompanyID (  )  [inline]

Get the CompanyID of the company that can be bought.

Returns:
The CompanyID of the company that can be bought.
Note:
If the company is bought this will become invalid.

int32 AIEventCompanyAskMerger::GetValue (  )  [inline]

Get the value of the new company.

Returns:
The value of the new company.

bool AIEventCompanyAskMerger::AcceptMerger (  ) 

Take over the company for this merger.

Returns:
true if the merger was a success.


Generated on Thu Jun 30 21:53:52 2016 for OpenTTD NoAI API by  doxygen 1.5.6