![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Type: | void |
Break a stop trespassing agreement between player.1 and player.2 |
SFN_ERROR Slic_BreakLeaveOurLands::Call(SlicArgList *args) { if(args->Count() != 0) { return SFN_ERROR_NUM_ARGS; } SlicObject *context = g_slicEngine->GetContext(); if(!g_player[context->GetPlayer(0)]) { return SFN_ERROR_TYPE_ARGS; } if(!g_player[context->GetPlayer(1)]) { return SFN_ERROR_TYPE_ARGS; } sint32 unitOwner, cellOwner; unitOwner = context->GetPlayer(0); cellOwner = context->GetPlayer(1); if(!g_player[unitOwner]) return SFN_ERROR_DEAD_PLAYER; if(!g_player[cellOwner]) return SFN_ERROR_DEAD_PLAYER; sint32 i; for(i = g_player[unitOwner]->m_agreed->Num() - 1; i >= 0; i--) { Agreement ag = g_player[unitOwner]->m_agreed->Access(i); if(g_theAgreementPool->IsValid(ag) && ag.GetRecipient() == unitOwner && ag.GetAgreement() == AGREEMENT_TYPE_DEMAND_LEAVE_OUR_LANDS) { if(g_network.IsClient()) { g_network.SendAction(new NetAction(NET_ACTION_VIOLATE_AGREEMENT, ag.m_id)); } else if(g_network.IsHost()) { g_network.Enqueue(new NetInfo(NET_INFO_CODE_VIOLATE_AGREEMENT, ag.m_id, unitOwner)); } ag.AccessData()->RecipientIsViolating(unitOwner, TRUE); } } return SFN_ERROR_OK; } |
Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.
*) Required fields
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 102498 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |