![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Type: | void |
Break a no piracy agreement between player.1 and player.2 |
SFN_ERROR Slic_BreakNoPiracy::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 pirate, victim; pirate = context->GetPlayer(0); victim = context->GetPlayer(1); if(!g_player[pirate]) return SFN_ERROR_DEAD_PLAYER; if(!g_player[victim]) return SFN_ERROR_DEAD_PLAYER; sint32 i; for(i = g_player[pirate]->m_agreed->Num() - 1; i >= 0; i--) { Agreement ag = g_player[pirate]->m_agreed->Access(i); if(g_theAgreementPool->IsValid(ag) && ag.GetRecipient() == pirate && ag.GetOwner() == victim && ag.GetAgreement() == AGREEMENT_TYPE_NO_PIRACY) { if(g_network.IsClient()) { g_network.SendAction(new NetAction(NET_ACTION_VIOLATE_AGREEMENT, ag.m_id)); } ag.AccessData()->RecipientIsViolating(pirate, 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
No user comments yet. |
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 102497 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |