5294 {
5295 super.OnRPC(sender, rpc_type, ctx);
5296
5297 switch (rpc_type)
5298 {
5299 #ifndef SERVER
5300
5301 case ERPCs.RPC_PLAYER_STAT:
5304 break;
5305
5306 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5308 {
5310 }
5311 break;
5312
5313 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5315 {
5317 }
5318 break;
5319
5320 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5322 {
5324 }
5325 break;
5326
5327 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5330 break;
5331
5332 case ERPCs.RPC_USER_ACTION_MESSAGE:
5334 {
5335 break;
5336 }
5338 {
5341 }
5342 break;
5343
5344 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5345 ref Param1<float> p_synch = new Param1<float>(0);
5347 float specialty_level = p_synch.param1;
5349 break;
5350
5351 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5352 ref Param5<float, float, float, float, bool> p_debug_synch = new Param5<float, float ,float, float, bool>(0, 0, 0, 0, false);
5353 ctx.
Read(p_debug_synch);
5354 float general_bonus_before = p_debug_synch.param1;
5355 float general_bonus_after = p_debug_synch.param2;
5356 float last_UA_value = p_debug_synch.param3;
5357 float cooldown_value = p_debug_synch.param4;
5358 float cooldown_active = p_debug_synch.param5;
5364 break;
5365
5366 case ERPCs.RPC_WARNING_ITEMDROP:
5367 {
5369 {
5372 }
5373 break;
5374 }
5375
5376 case ERPCs.RPC_WARNING_TELEPORT:
5377 {
5379 {
5382 }
5383 break;
5384 }
5385 case ERPCs.RPC_INIT_SET_QUICKBAR:
5386 ref Param1<int> count = new Param1<int>(0);
5387 if (ctx.
Read(count))
5388 {
5389 for (int i = 0; i < count.param1 ; i++)
5390 {
5392 }
5393 }
5394 break;
5395
5396 case ERPCs.RPC_SYNC_THERMOMETER:
5397 {
5398 float value;
5399 if (ctx.
Read(value))
5400 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5401 break;
5402 }
5403
5404
5405 case ERPCs.RPC_CHECK_PULSE:
5406 ctx.
Read(CachedObjectsParams.PARAM1_INT);
5408 if ((CachedObjectsParams.PARAM1_INT.param1 & ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT) == 0)
5409 {
5411 }
5412 else
5413 {
5415 }
5416
5417 int blood_level = ~ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT & CachedObjectsParams.PARAM1_INT.param1;
5419 {
5421 }
5422 break;
5423
5425
5426 case PlantType.TREE_HARD:
5427 SoundHardTreeFallingPlay();
5428 break;
5429
5430 case PlantType.TREE_SOFT:
5431 SoundSoftTreeFallingPlay();
5432 break;
5433
5434 case PlantType.BUSH_HARD:
5435 SoundHardBushFallingPlay();
5436 break;
5437
5438 case PlantType.BUSH_SOFT:
5439 SoundSoftBushFallingPlay();
5440 break;
5441
5442 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5444 {
5446 }
5447 break;
5448
5449 case ERPCs.RPC_DEBUG_MONITOR_STR:
5451 {
5453 }
5454 break;
5455 #endif
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470 #ifdef DIAG_DEVELOPER
5471 case ERPCs.DEV_RPC_AGENT_RESET:
5472 {
5473 bool val;
5476 break;
5477 }
5478
5479 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5480 {
5481 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5482 plugin_remote_server.OnRPC(ctx, this);
5483 break;
5484 }
5485
5486 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5487 {
5488 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5489 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5490 if (plugin_dev.m_ScriptConsole)
5491 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5492 else
5493 plugin_remote_client.OnRPC(ctx);
5494 break;
5495 }
5496
5497 case ERPCs.DEV_AGENT_GROW:
5498 {
5500 break;
5501 }
5502
5503 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5504 {
5506 mid.StopWatchRequest(this);
5507 break;
5508 }
5509
5511 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5512 {
5513 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5514 plugin_uts_server.OnRPC(ctx, this);
5515 break;
5516 }
5517
5518 case ERPCs.DEV_UTS_DEBUG_DATA:
5519 {
5520 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5521 plugin_uts_client.OnRPC(ctx);
5522 break;
5523 }
5525 #endif
5526
5527 #ifdef DEVELOPER
5528 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5529 {
5530
5531
5532
5533 if (ctx.
Read(CachedObjectsParams.PARAM1_STRING))
5534 {
5536 string code = CachedObjectsParams.PARAM1_STRING.param1;
5538 CachedObjectsParams.PARAM1_BOOL.param1 = success;
5539 RPCSingleParam(
ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT, CachedObjectsParams.PARAM1_BOOL,
true, GetIdentity());
5540 }
5541 break;
5542 }
5543
5544 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5545 {
5546 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5547 if (dev.m_ScriptConsole)
5548 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5549 break;
5550 }
5551
5552 case ERPCs.DEV_SET_DEV_ITEM:
5553 {
5554 Param1<EntityAI> ent = new Param1<EntityAI>(null);
5555 if (ctx.
Read(ent) && ent.param1)
5556 {
5558 mid2.RegisterDebugItem(ent.param1, this);
5559 }
5560
5561 break;
5562 }
5563
5564 case ERPCs.RPC_ITEM_DIAG:
5565 {
5566 Param1<EntityAI> p1 = new Param1<EntityAI>(null);
5568 {
5570 plgn.OnRPC(p1.param1, ctx);
5571 }
5572 break;
5573 }
5574 #endif
5575 }
5576
5577 #ifdef DIAG_DEVELOPER
5578 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5579 if (module_rc)
5580 module_rc.OnRPC(this, rpc_type, ctx);
5581
5582 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5583 if (module_rcs)
5584 module_rcs.OnRPC(this, rpc_type, ctx);
5585
5586 #ifdef SERVER
5587 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuServer));
5588 #else
5589 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuClient));
5590 #endif
5591
5592 if (plugin_diag_menu)
5593 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5594 #endif
5595 }
void PluginItemDiagnostic()
PluginBase GetPlugin(typename plugin_type)
override ScriptCallQueue GetCallQueue(int call_category)
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
proto native Mission GetMission()
SymptomManager GetSymptomManager()
PlayerBase m_CheckPulseLastTarget
void MessageAction(string text)
ref PlayerAgentPool m_AgentPool
VirtualHud GetVirtualHud()
ref DebugMonitorValues m_DebugMonitorValues
SoftSkillsManager GetSoftSkillsManager()
ref TransferValues m_TrasferValues
PlayerStats GetPlayerStats()
QuickBarBase m_QuickBarBase
ref Param1< string > m_UAParamMessage
void AddActiveInputExcludes(array< string > excludes)
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Read(void value_in)
void SetCoolDown(bool cool_down)
void SetLastUAValue(float last_ua_value)
void SetGeneralBonusBefore(float general_bonus_before)
void SetCoolDownValue(float cooldown_value)
void SetGeneralBonusAfter(float general_bonus_after)
void SetSpecialtyLevel(float specialty_level)
void OnRPC(int rpc_type, ParamsReadContext ctx)
proto string ToString(bool simple=true)
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerInstanceType GetInstanceType()
proto native CGame GetGame()