CTP2 Bureau
The Modding
Knowledgebase
Apolyton CTP2 section
Apolyton CTP2 files
Apolyton CTP2 forums
Source Code Project SVN

Actions

Pages

Recent Changes Search

Create a new page:

AE Modding Wiki : Functions : FreeAllSlaves

New SLIC function: FreeAllSlaves(): Obviously frees a city's slaves. Only works in messages, where the city is given from the context.

//Added by The Big MC
SFN_ERROR Slic_FreeAllSlaves::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(g_network.IsClient()) 
	{
		g_network.SendAction(new NetAction(NET_ACTION_FREE_SLAVES, city.m_id));
	}

	city.FreeSlaves();
	return SFN_ERROR_OK;
}
Page last modified on June 11, 2009, at 02:43 PM
  Administration
AE Modding Wiki built with PmWiki Design: BureauBert
Share this page:  VK Facebook Twitter LiveJournal OK MR Google+ LinkedIn tumblr Pinterest Blogger Digg Evernote