SHOW:
|
|
- or go back to the newest paste.
1 | - | /** |
1 | + | class ScriptEventOnHouseDestroyed : public ScriptEventCompanyTown { |
2 | - | * Event Road Reconstruction, indicating that company triggered |
2 | + | |
3 | - | * road reconstructions in a town. |
3 | + | int population; |
4 | - | * @api ai game |
4 | + | |
5 | - | */ |
5 | + | |
6 | - | class ScriptEventRoadReconstruction : public ScriptEventCompanyTown { |
6 | + | |
7 | * @param town The town. | |
8 | * @param _population The population. | |
9 | */ | |
10 | ScriptEventOnHouseDestroyed(ScriptCompany::CompanyID company, TownID town, int _population) : | |
11 | ScriptEventCompanyTown(ET_HOUSE_DESTROYED, company, town) | |
12 | - | ScriptEventRoadReconstruction(ScriptCompany::CompanyID company, TownID town) : |
12 | + | { |
13 | - | ScriptEventCompanyTown(ET_ROAD_RECONSTRUCTION, company, town) |
13 | + | population = _population; |
14 | - | {} |
14 | + | } |
15 | ||
16 | /** | |
17 | - | * Convert an ScriptEvent to the real instance. |
17 | + | * Convert an ScriptEvent to the real instance. |
18 | - | * @param instance The instance to convert. |
18 | + | * @param instance The instance to convert. |
19 | - | * @return The converted instance. |
19 | + | * @return The converted instance. |
20 | */ | |
21 | - | static ScriptEventRoadReconstruction *Convert(ScriptEventCompanyTown *instance) { return (ScriptEventRoadReconstruction *)instance; } |
21 | + | static ScriptEventOnHouseDestroyed *Convert(ScriptEventCompanyTown *instance) { |
22 | return (ScriptEventRoadReconstruction *)instance; | |
23 | } | |
24 | }; |