DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SendRPCHealth()

void PluginBase::SendRPCHealth ( PlayerBase player)
inlineprotected

См. определение в файле PluginDeveloperSync.c строка 553

554 {
555 //write and send values
556 if ( player )
557 {
558 array<ref Param> rpc_params = new array<ref Param>;
559
560 EntityAI target;
561 if (m_HealthObserverMode.Get(player) == false)
562 target = player;
563 else
564 {
566 target = EntityAI.Cast(itemDiagPlugin.GetWatchedItem(player));
567 }
568
569 if (target)
570 {
571 DamageZoneMap dmgZones = target.GetEntityDamageZoneMap();
572
573 SetupZoneValues(rpc_params, dmgZones, target, "Health", 0);
574 SetupZoneValues(rpc_params, dmgZones, target, "Shock", 1);
575 SetupZoneValues(rpc_params, dmgZones, target, "Blood", 2);
576 }
577
578 bool targetChanged = false;
579 if (target != m_HealthObserverEntity.Get(player))
580 {
581 targetChanged = true;
582 m_HealthObserverEntity.Set(player, target);
583 }
584
585 rpc_params.InsertAt( new Param2<int, bool>(rpc_params.Count(), targetChanged), 0);
586
587 GetDayZGame().RPC( player, ERPCs.DEV_RPC_HEALTH_DATA, rpc_params, true, player.GetIdentity() );
588 }
589 }
class LogManager EntityAI
map< string, ref array< string > > DamageZoneMap
Определения DamageSystem.c:157
DayZGame GetDayZGame()
Определения DayZGame.c:3870
ERPCs
Определения ERPCs.c:2
void PluginItemDiagnostic()
Определения PluginItemDiagnostic.c:74
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
void SetupZoneValues(inout array< ref Param > rpc_params, DamageZoneMap dmgZones, EntityAI target, string healthType, int typeID)
Определения PluginDeveloperSync.c:612
ref map< PlayerBase, bool > m_HealthObserverMode
Определения PluginDeveloperSync.c:42
ref map< PlayerBase, EntityAI > m_HealthObserverEntity
Определения PluginDeveloperSync.c:43

Перекрестные ссылки GetDayZGame(), GetPlugin(), m_HealthObserverEntity, m_HealthObserverMode, PluginItemDiagnostic() и SetupZoneValues().

Используется в Update().