5451 {
5452 super.OnRPC(sender, rpc_type, ctx);
5453
5454 switch (rpc_type)
5455 {
5456 #ifndef SERVER
5457
5458 case ERPCs.RPC_PLAYER_STAT:
5461 break;
5462
5463 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5465 {
5467 }
5468 break;
5469
5470 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5472 {
5474 }
5475 break;
5476
5477 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5479 {
5481 }
5482 break;
5483
5484 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5487 break;
5488
5489 case ERPCs.RPC_USER_ACTION_MESSAGE:
5491 {
5492 break;
5493 }
5495 {
5498 }
5499 break;
5500
5501 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5502 ref Param1<float> p_synch = new Param1<float>(0);
5504 float specialty_level = p_synch.param1;
5506 break;
5507
5508 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5509 ref Param5<float, float, float, float, bool> p_debug_synch = new Param5<float, float ,float, float, bool>(0, 0, 0, 0, false);
5510 ctx.
Read(p_debug_synch);
5511 float general_bonus_before = p_debug_synch.param1;
5512 float general_bonus_after = p_debug_synch.param2;
5513 float last_UA_value = p_debug_synch.param3;
5514 float cooldown_value = p_debug_synch.param4;
5515 float cooldown_active = p_debug_synch.param5;
5521 break;
5522
5523 case ERPCs.RPC_WARNING_ITEMDROP:
5524 {
5526 {
5528 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5529 }
5530 break;
5531 }
5532
5533 case ERPCs.RPC_WARNING_TELEPORT:
5534 {
5536 {
5538 g_Game.GetMission().AddActiveInputExcludes({
"menu"});
5539 }
5540 break;
5541 }
5542 case ERPCs.RPC_INIT_SET_QUICKBAR:
5543 ref Param1<int> count = new Param1<int>(0);
5544 if (ctx.
Read(count))
5545 {
5546 for (int i = 0; i < count.param1 ; i++)
5547 {
5549 }
5550 }
5551 break;
5552
5553 case ERPCs.RPC_SYNC_THERMOMETER:
5554 {
5555 float value;
5556 if (ctx.
Read(value))
5557 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5558 break;
5559 }
5560
5561
5562 case ERPCs.RPC_CHECK_PULSE:
5563 ctx.
Read(CachedObjectsParams.PARAM1_INT);
5565 if ((CachedObjectsParams.PARAM1_INT.param1 & ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT) == 0)
5566 {
5568 }
5569 else
5570 {
5572 }
5573
5574 int blood_level = ~ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT & CachedObjectsParams.PARAM1_INT.param1;
5576 {
5578 }
5579 break;
5580
5582
5583 case PlantType.TREE_HARD:
5584 SoundHardTreeFallingPlay();
5585 break;
5586
5587 case PlantType.TREE_SOFT:
5588 SoundSoftTreeFallingPlay();
5589 break;
5590
5591 case PlantType.BUSH_HARD:
5592 SoundHardBushFallingPlay();
5593 break;
5594
5595 case PlantType.BUSH_SOFT:
5596 SoundSoftBushFallingPlay();
5597 break;
5598
5599 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5601 {
5603 }
5604 break;
5605
5606 case ERPCs.RPC_DEBUG_MONITOR_STR:
5608 {
5610 }
5611 break;
5612
5613 case ERPCs.RPC_ITEM_REPAIR:
5614 PluginInventoryRepair repairPlugin = PluginInventoryRepair.Cast(
GetPlugin(PluginInventoryRepair));
5615 repairPlugin.OnRPC(ctx);
5616 #endif
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631 #ifdef DIAG_DEVELOPER
5632 case ERPCs.DEV_RPC_AGENT_RESET:
5633 {
5634 bool val;
5637 break;
5638 }
5639
5640 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5641 {
5642 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5643 plugin_remote_server.OnRPC(ctx, this);
5644 break;
5645 }
5646
5647 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5648 {
5649 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5650 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5651 if (plugin_dev.m_ScriptConsole)
5652 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5653 else
5654 plugin_remote_client.OnRPC(ctx);
5655 break;
5656 }
5657
5658 case ERPCs.DEV_AGENT_GROW:
5659 {
5661 break;
5662 }
5663
5664 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5665 {
5667 mid.StopWatchRequest(this);
5668 break;
5669 }
5670
5672 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5673 {
5674 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5675 plugin_uts_server.OnRPC(ctx, this);
5676 break;
5677 }
5678
5679 case ERPCs.DEV_UTS_DEBUG_DATA:
5680 {
5681 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5682 plugin_uts_client.OnRPC(ctx);
5683 break;
5684 }
5686 #endif
5687
5688 #ifdef DEVELOPER
5689 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5690 {
5691
5692
5693
5694 if (ctx.
Read(CachedObjectsParams.PARAM1_STRING))
5695 {
5697 string code = CachedObjectsParams.PARAM1_STRING.param1;
5698 bool success =
g_Game.ExecuteEnforceScript(
"void scConsMain() \n{\n" + code +
"\n}\n",
"scConsMain");
5699 CachedObjectsParams.PARAM1_BOOL.param1 = success;
5700 RPCSingleParam(
ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT, CachedObjectsParams.PARAM1_BOOL,
true, GetIdentity());
5701 }
5702 break;
5703 }
5704
5705 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5706 {
5707 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5708 if (dev.m_ScriptConsole)
5709 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5710 break;
5711 }
5712
5713 case ERPCs.DEV_SET_DEV_ITEM:
5714 {
5715 Param1<EntityAI> ent = new Param1<EntityAI>(null);
5716 if (ctx.
Read(ent) && ent.param1)
5717 {
5719 mid2.RegisterDebugItem(ent.param1, this);
5720 }
5721
5722 break;
5723 }
5724
5725 case ERPCs.RPC_ITEM_DIAG:
5726 {
5727 Param1<EntityAI> p1 = new Param1<EntityAI>(null);
5729 {
5731 plgn.OnRPC(p1.param1, ctx);
5732 }
5733 break;
5734 }
5735 #endif
5736 }
5737
5738 #ifdef DIAG_DEVELOPER
5739 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5740 if (module_rc)
5741 module_rc.OnRPC(this, rpc_type, ctx);
5742
5743 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5744 if (module_rcs)
5745 module_rcs.OnRPC(this, rpc_type, ctx);
5746
5747 #ifdef SERVER
5748 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuServer));
5749 #else
5750 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuClient));
5751 #endif
5752
5753 if (plugin_diag_menu)
5754 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5755 #endif
5756 }
void PluginItemDiagnostic()
PluginBase GetPlugin(typename plugin_type)
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 OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
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()