Page MenuHomeFeedback Tracker

Modding Functions with "ParamsReadContext ctx"
New, NormalPublic

Description

PC version 1.08 stable

I am have a code:

override void OnRPC( PlayerIdentity sender, Object target, int rpc_type, ref ParamsReadContext ctx )
	{
		#ifdef EXPANSIONEXPRINT
		EXPrint("ExpansionGlobalChatModule::OnRPC - Start");
		#endif
		switch ( rpc_type )
		{
			case ExpansionGlobalChatRPC.AddChatMessage:
				AddChatMessage( ctx, sender, target );
			break;
		}
		#ifdef EXPANSIONEXPRINT
		EXPrint("ExpansionGlobalChatModule::OnRPC - End");
		#endif
	}

How add a my function with my mod to this structure with work ref ParamsReadContext ctx ?
I am try add ths:

override void OnRPC( PlayerIdentity sender, Object target, int rpc_type, ref ParamsReadContext ctx )
	{
super.OnRPC(sender,target,rpc_type,ctx);
		MyFunction(ctx);
	}

but reading ref ParamsReadContext ctx in MyFunction don't worked. How do work this withour replasing all original code function and work my custom code?

Details

Severity
Trivial
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Operating System Version
6.1(7601)
Category
Modding

Event Timeline

AXEL7 created this task.Jul 9 2020, 10:24 PM
AXEL7 added a comment.Jul 16 2020, 7:48 PM

Any answer?

AXEL7 added a comment.Jul 31 2020, 5:33 PM

Maybe a some answers? Developvers???