|
CTP2 Bureau The Modding Knowledgebase |
Apolyton CTP2 section Apolyton CTP2 files Apolyton CTP2 forums Source Code Project SVN |
![]() |
|
Search the Wiki: |
ActionsPagesRecent Changes SearchCreate a new page:
|
AE Modding Wiki : Functions : LiberateNew SLIC function: Liberate(): Gives the city to good old barbs. Only works in messages, where the city is given from the context.
SFN_ERROR Slic_Liberate::Call(SlicArgList *args)
{
if (args->Count() > 0)
return SFN_ERROR_NUM_ARGS;
Unit city = g_slicEngine->GetContext()->GetCity(0);
if (!city.IsValid())
{
return SFN_ERROR_OK;
}
if(!city.GetData()->GetCityData()->CapturedThisTurn()) {
if(g_network.IsClient()) {
g_network.RequestResync(RESYNC_PROBABLE_CHEATER);
}
return SFN_ERROR_OK;
}
if(g_network.IsClient()) {
g_network.SendAction(new NetAction(NET_ACTION_FREE_SLAVES, city.m_id));
}
//if(!args->GetInt(0, cause))
// return GEV_HD_Continue;
city.ResetCityOwner(PLAYER_INDEX_VANDALS, FALSE, CAUSE_REMOVE_CITY_DIPLOMACY);
return SFN_ERROR_OK;
}
Page last modified on June 11, 2009, at 02:28 PM |
|
| AE Modding Wiki built with PmWiki Design: BureauBert Hosted by: Comball.net |