Public Member Functions | Static Public Member Functions | Private Attributes

ScriptEventCompanyAskMerger Class Reference

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

#include <script_event_types.hpp>

Inheritance diagram for ScriptEventCompanyAskMerger:
ScriptEvent ScriptObject SimpleCountedObject

Public Member Functions

 ScriptEventCompanyAskMerger (Owner owner, int32 value)
ScriptCompany::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
ScriptEventCompanyAskMerger
Convert (ScriptEvent *instance)
 Convert an ScriptEvent to the real instance.

Private Attributes

ScriptCompany::CompanyID owner
 The company that is in trouble.
int32 value
 The value of the company, i.e. the amount you would pay.

Detailed Description

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

ai

Definition at line 363 of file script_event_types.hpp.


Constructor & Destructor Documentation

ScriptEventCompanyAskMerger::ScriptEventCompanyAskMerger ( Owner  owner,
int32  value 
) [inline]
Parameters:
owner The company that can be bough.
value The value/costs of buying the company.

Definition at line 369 of file script_event_types.hpp.


Member Function Documentation

bool ScriptEventCompanyAskMerger::AcceptMerger (  ) 

Take over the company for this merger.

Returns:
true if the merger was a success.

Definition at line 119 of file script_event_types.cpp.

References CMD_BUY_COMPANY, ScriptObject::DoCommand(), and owner.

static ScriptEventCompanyAskMerger* ScriptEventCompanyAskMerger::Convert ( ScriptEvent instance  )  [inline, static]

Convert an ScriptEvent to the real instance.

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

Definition at line 380 of file script_event_types.hpp.

ScriptCompany::CompanyID ScriptEventCompanyAskMerger::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.

Definition at line 387 of file script_event_types.hpp.

References owner.

int32 ScriptEventCompanyAskMerger::GetValue (  )  [inline]

Get the value of the new company.

Returns:
The value of the new company.

Definition at line 393 of file script_event_types.hpp.

References value.


The documentation for this class was generated from the following files: