![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
![]() |
Search the Wiki: |
ActionsPagesRecent Changes SearchCreate a new page: ![]() |
AE Modding Wiki : Functions : CreateWonderNew SLIC-function: CreateWonder(city, wonder) The difference with the same event is that the function doesn't effect stored production in a city. And doesn't trigger the wonder movie. //---------------------------------------------------------------------------- // // Authored : Maq // // Name : Slic_CreateWonder // // Description: Function to create a wonder in a city. // // Parameters : SlicArg 0: city // SlicArg 1: wonderdb index // // Globals : - // // Returns : SFN_ERROR : execution result // //---------------------------------------------------------------------------- SFN_ERROR Slic_CreateWonder::Call(SlicArgList *args) { if (args->Count() != 2) { return SFN_ERROR_NUM_ARGS; } Unit city; sint32 type; if(!args->GetCity(0, city)) { return SFN_ERROR_TYPE_BUILTIN; } if(!args->GetInt(1, type)) return SFN_ERROR_TYPE_ARGS; if(!g_theUnitPool->IsValid(city)) { return SFN_ERROR_OK; } if(type < 0 || type >= g_theWonderDB->NumRecords()) return SFN_ERROR_OUT_OF_RANGE; city.CD()->AddWonder(type); return SFN_ERROR_OK; } Page last modified on July 17, 2009, at 06:17 PM |
![]() |
AE Modding Wiki built with PmWiki Design: BureauBert |