1225 {
1226 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1227
1229 {
1231 }
1232
1233 if (damageResult != null && damageResult.
GetDamage(dmgZone,
"Shock") > 0)
1234 {
1236
1238 {
1239 if (
g_Game.ConfigIsExisting(
"cfgAmmo " + ammo +
" unconRefillModifier"))
1240 {
1242 }
1243 else
1244 {
1246 }
1247 }
1248 }
1249
1251 if (damageType ==
DamageType.EXPLOSION && ammo ==
"FlashGrenade_Ammo")
1252 {
1254 }
1255
1256
1257
1259 {
1260 float dmg = damageResult.
GetDamage(dmgZone,
"Blood");
1262 }
1263
1264
1265 #ifdef DIAG_DEVELOPER
1267 Print(
"EEHitBy() | " +
GetDisplayName() +
" hit by " + source.GetDisplayName() +
" to " + dmgZone);
1268
1269 PluginRemotePlayerDebugServer plugin_remote_server = PluginRemotePlayerDebugServer.Cast(
GetPlugin(PluginRemotePlayerDebugServer));
1270 if (plugin_remote_server)
1271 {
1272 plugin_remote_server.OnDamageEvent(this, damageResult);
1273 }
1274 #endif
1275
1276 if (
g_Game.IsDebugMonitor())
1278
1281
1282 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
1283 if (transferShockToDamageCoef == 1)
1284 {
1285
1287 if (dmgZone != "Head")
1288 AddHealth(dmgZone,
"Health", -damageResult.
GetDamage(dmgZone,
"Shock"));
1289 }
1290
1292 {
1293 if (GetHealth("RightLeg", "Health") <= 1 || GetHealth("LeftLeg", "Health") <= 1 || GetHealth("RightFoot", "Health") <= 1 || GetHealth("LeftFoot", "Health") <= 1)
1294 {
1296 {
1298 }
1300 }
1301
1302 if (ammo == "Bullet_CupidsBolt" && IsAlive())
1303 {
1304 DamageSystem.ResetAllZones(this);
1307
1308
1311
1312
1314 {
1320
1322
1328 }
1329
1330
1333
1336
1337
1339 DayZPlayerSyncJunctures.SendPlayerUnconsciousness(this, false);
1340 }
1341 }
1342
1344
1345
1346 g_Game.GetAnalyticsServer().OnEntityHit(source,
this);
1347 }
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()
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