1256 {
1257 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1258
1260 {
1262 }
1263
1264 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
1265 {
1267
1269 {
1270 if (
g_Game.ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
1271 {
1273 }
1274 else
1275 {
1277 }
1278 }
1279 }
1280
1282 if (damageType ==
DamageType.EXPLOSION && ammo ==
"FlashGrenade_Ammo")
1283 {
1285 }
1286
1287
1288
1290 {
1291 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
1293 }
1294
1295
1296 #ifdef DIAG_DEVELOPER
1298 Print(
"EEHitBy() | " +
GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
1299
1300 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
1301 if (plugin_remote_server)
1302 {
1303 plugin_remote_server.OnDamageEvent(this, damageResult);
1304 }
1305 #endif
1306
1307 if (
g_Game.IsDebugMonitor())
1309
1312
1313 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
1314 if (transferShockToDamageCoef == 1)
1315 {
1316
1318 if (dmgZone != "Head")
1319 AddHealth(dmgZone,
"Health", -damageResult.
GetDamage(dmgZone,
"Shock"));
1320 }
1321
1323 {
1324 if (GetHealth("RightLeg", "Health") <= 1 || GetHealth("LeftLeg", "Health") <= 1 || GetHealth("RightFoot", "Health") <= 1 || GetHealth("LeftFoot", "Health") <= 1)
1325 {
1327 {
1329 }
1331 }
1332
1333 if (ammo == "Bullet_CupidsBolt" && IsAlive())
1334 {
1335 DamageSystem.ResetAllZones(this);
1338
1339
1342
1343
1345 {
1352
1354
1361 }
1362
1363
1366
1369
1370
1372 DayZPlayerSyncJunctures.SendPlayerUnconsciousness(this, false);
1373 }
1374 }
1375
1377
1378
1379 g_Game.GetAnalyticsServer().OnEntityHit(source,
this);
1380 }
DamageType
exposed from C++ (do not change)
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
static string GetDisplayName(int liquid_type)
PluginBase GetPlugin(typename plugin_type)
override bool IsUnconscious()
ref PlayerAgentPool m_AgentPool
BleedingSourcesManagerServer GetBleedingManagerServer()
PlayerStat< float > GetStatEnergy()
ThermalBiasHandler GetThermalBiasHandler()
ModifiersManager GetModifiersManager()
ref DebugMonitorValues m_DebugMonitorValues
ref BleedingSourcesManagerServer m_BleedingManagerServer
PlayerStat< float > GetStatHeatComfort()
float m_UnconRefillModifier
ref ModifiersManager m_ModifiersManager
PlayerStat< float > GetStatWater()
PlayerStat< int > GetStatBloodType()
StaminaHandler GetStaminaHandler()
float ConvertNonlethalDamage(float damage, DamageType damageType)
PluginAdminLog m_AdminLog
PlayerStats GetPlayerStats()
ref StaminaHandler m_StaminaHandler
ActionManagerBase m_ActionManager
ref ShockHandler m_ShockHandler
PlayerStat< float > GetStatHeatBuffer()
void DepleteStaminaEx(EStaminaModifiers modifier, float dT=-1, float coef=1.0)
proto native float GetDamage(string zoneName, string healthType)
proto void Print(void var)
Prints content of variable to console/log.
proto native bool IsModifierActive()
is modifier active