5304 {
5305 super.OnRPC(sender, rpc_type, ctx);
5306
5307 switch (rpc_type)
5308 {
5309 #ifndef SERVER
5310
5311 case ERPCs.RPC_PLAYER_STAT:
5314 break;
5315
5316 case ERPCs.RPC_SYNC_DISPLAY_STATUS:
5318 {
5320 }
5321 break;
5322
5323 case ERPCs.RPC_PLAYER_SYMPTOM_ON:
5325 {
5327 }
5328 break;
5329
5330 case ERPCs.RPC_PLAYER_SYMPTOM_OFF:
5332 {
5334 }
5335 break;
5336
5337 case ERPCs.RPC_DAMAGE_VALUE_SYNC:
5340 break;
5341
5342 case ERPCs.RPC_USER_ACTION_MESSAGE:
5344 {
5345 break;
5346 }
5348 {
5351 }
5352 break;
5353
5354 case ERPCs.RPC_SOFT_SKILLS_SPECIALTY_SYNC:
5355 ref Param1<float> p_synch = new Param1<float>(0);
5357 float specialty_level = p_synch.param1;
5359 break;
5360
5361 case ERPCs.RPC_SOFT_SKILLS_STATS_SYNC:
5362 ref Param5<float, float, float, float, bool> p_debug_synch = new Param5<float, float ,float, float, bool>(0, 0, 0, 0, false);
5363 ctx.
Read(p_debug_synch);
5364 float general_bonus_before = p_debug_synch.param1;
5365 float general_bonus_after = p_debug_synch.param2;
5366 float last_UA_value = p_debug_synch.param3;
5367 float cooldown_value = p_debug_synch.param4;
5368 float cooldown_active = p_debug_synch.param5;
5374 break;
5375
5376 case ERPCs.RPC_WARNING_ITEMDROP:
5377 {
5379 {
5382 }
5383 break;
5384 }
5385
5386 case ERPCs.RPC_WARNING_TELEPORT:
5387 {
5389 {
5392 }
5393 break;
5394 }
5395 case ERPCs.RPC_INIT_SET_QUICKBAR:
5396 ref Param1<int> count = new Param1<int>(0);
5397 if (ctx.
Read(count));
5398 {
5399 for (int i = 0; i < count.param1 ; i++)
5400 {
5402 }
5403 }
5404 break;
5405
5406 case ERPCs.RPC_SYNC_THERMOMETER:
5407 {
5408 float value;
5409 if (ctx.
Read(value))
5410 m_Hud.SetTemperature(value.
ToString() +
"#degrees_celsius");
5411 break;
5412 }
5413
5414
5415 case ERPCs.RPC_CHECK_PULSE:
5416 ctx.
Read(CachedObjectsParams.PARAM1_INT);
5418 if ((CachedObjectsParams.PARAM1_INT.param1 & ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT) == 0)
5419 {
5421 }
5422 else
5423 {
5425 }
5426
5427 int blood_level = ~ActionCheckPulse.TARGET_IRREGULAR_PULSE_BIT & CachedObjectsParams.PARAM1_INT.param1;
5429 {
5431 }
5432 break;
5433
5435
5436 case PlantType.TREE_HARD:
5437 SoundHardTreeFallingPlay();
5438 break;
5439
5440 case PlantType.TREE_SOFT:
5441 SoundSoftTreeFallingPlay();
5442 break;
5443
5444 case PlantType.BUSH_HARD:
5445 SoundHardBushFallingPlay();
5446 break;
5447
5448 case PlantType.BUSH_SOFT:
5449 SoundSoftBushFallingPlay();
5450 break;
5451
5452 case ERPCs.RPC_DEBUG_MONITOR_FLT:
5454 {
5456 }
5457 break;
5458
5459 case ERPCs.RPC_DEBUG_MONITOR_STR:
5461 {
5463 }
5464 break;
5465 #endif
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480 #ifdef DIAG_DEVELOPER
5481 case ERPCs.DEV_RPC_AGENT_RESET:
5482 {
5483 bool val;
5486 break;
5487 }
5488
5489 case ERPCs.DEV_PLAYER_DEBUG_REQUEST:
5490 {
5491 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
5492 plugin_remote_server.OnRPC(ctx, this);
5493 break;
5494 }
5495
5496 case ERPCs.DEV_PLAYER_DEBUG_DATA:
5497 {
5498 PluginRemotePlayerDebugClient plugin_remote_client = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
5499 PluginDeveloper plugin_dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5500 if (plugin_dev.m_ScriptConsole)
5501 plugin_dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5502 else
5503 plugin_remote_client.OnRPC(ctx);
5504 break;
5505 }
5506
5507 case ERPCs.DEV_AGENT_GROW:
5508 {
5510 break;
5511 }
5512
5513 case ERPCs.RPC_ITEM_DIAG_CLOSE:
5514 {
5516 mid.StopWatchRequest(this);
5517 break;
5518 }
5519
5521 case ERPCs.DEV_REQUEST_UTS_DEBUG:
5522 {
5523 PluginUniversalTemperatureSourceServer plugin_uts_server = PluginUniversalTemperatureSourceServer.Cast(
GetPlugin(PluginUniversalTemperatureSourceServer));
5524 plugin_uts_server.OnRPC(ctx, this);
5525 break;
5526 }
5527
5528 case ERPCs.DEV_UTS_DEBUG_DATA:
5529 {
5530 PluginUniversalTemperatureSourceClient plugin_uts_client = PluginUniversalTemperatureSourceClient.Cast(
GetPlugin(PluginUniversalTemperatureSourceClient));
5531 plugin_uts_client.OnRPC(ctx);
5532 break;
5533 }
5535 #endif
5536
5537 #ifdef DEVELOPER
5538 case ERPCs.DEV_RPC_SERVER_SCRIPT:
5539 {
5540
5541
5542
5543 if (ctx.
Read(CachedObjectsParams.PARAM1_STRING))
5544 {
5546 string code = CachedObjectsParams.PARAM1_STRING.param1;
5548 CachedObjectsParams.PARAM1_BOOL.param1 = success;
5549 RPCSingleParam(
ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT, CachedObjectsParams.PARAM1_BOOL,
true, GetIdentity());
5550 }
5551 break;
5552 }
5553
5554 case ERPCs.DEV_RPC_SERVER_SCRIPT_RESULT:
5555 {
5556 PluginDeveloper dev = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5557 if (dev.m_ScriptConsole)
5558 dev.m_ScriptConsole.OnRPCEx(rpc_type, ctx);
5559 break;
5560 }
5561
5562 case ERPCs.DEV_SET_DEV_ITEM:
5563 {
5564 Param1<EntityAI> ent = new Param1<EntityAI>(null);
5565 if (ctx.
Read(ent) && ent.param1)
5566 {
5568 mid2.RegisterDebugItem(ent.param1, this);
5569 }
5570
5571 break;
5572 }
5573
5574 case ERPCs.RPC_ITEM_DIAG:
5575 {
5576 Param1<EntityAI> p1 = new Param1<EntityAI>(null);
5578 {
5580 plgn.OnRPC(p1.param1, ctx);
5581 }
5582 break;
5583 }
5584 #endif
5585 }
5586
5587 #ifdef DIAG_DEVELOPER
5588 PluginDeveloper module_rc = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
5589 if (module_rc)
5590 module_rc.OnRPC(this, rpc_type, ctx);
5591
5592 PluginDeveloperSync module_rcs = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
5593 if (module_rcs)
5594 module_rcs.OnRPC(this, rpc_type, ctx);
5595
5596 #ifdef SERVER
5597 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuServer));
5598 #else
5599 PluginDiagMenu plugin_diag_menu = PluginDiagMenu.Cast(
GetPlugin(PluginDiagMenuClient));
5600 #endif
5601
5602 if (plugin_diag_menu)
5603 plugin_diag_menu.
OnRPC(
this, rpc_type, ctx);
5604 #endif
5605 }
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()