Update damage handler and improve study body

Vanilla development commits applied:

3db0fe8e7a

73a63898f1

08e18d5b52

126da2dcd3

d5fa323865

d37526fcc6

5fcca134f0

c9c1fc934d
This commit is contained in:
ebaydayz
2016-08-11 15:16:46 -04:00
parent 4019d0c351
commit 7439b87779
10 changed files with 226 additions and 179 deletions

View File

@@ -1,17 +1,22 @@
private["_body","_name","_method","_methodStr"];
private["_body","_name","_method","_methodStr","_message"];
_body = _this select 3;
_name = _body getVariable["bodyName","unknown"];
_method = _body getVariable["deathType","unknown"];
_methodStr = localize format ["str_death_%1",_method];
_killingBlow = _body getVariable "KillingBlow";
_killingBlow = _body getVariable ["KillingBlow",objNull];
format[localize "str_player_studybody",_name,_methodStr] call dayz_rollingMessages;
// "His/Her name was %1, it appears he/she died from %2"
_message = if (_body isKindOf "SurvivorW2_DZ") then {"str_player_studybody_female"} else {"str_player_studybody"};
if (typeName _killingBlow == "OBJECT") then {
_ConfirmedHumanKills = _killingBlow getVariable ["ConfirmedHumanKills",0];
_killingBlow setVariable ["ConfirmedHumanKills",(_ConfirmedHumanKills + 1),true];
} else {
_ConfirmedBanditKills = _killingBlow getVariable ["ConfirmedBanditKills",0];
_killingBlow setVariable ["ConfirmedBanditKills",(_ConfirmedBanditKills + 1),true];
format[localize _message,_name,_methodStr] call dayz_rollingMessages;
if (!(isNull _killingBlow) AND {(isPlayer _killingBlow)}) then {
if (typeName _killingBlow == "OBJECT") then {
_ConfirmedHumanKills = _killingBlow getVariable ["ConfirmedHumanKills",0];
_killingBlow setVariable ["ConfirmedHumanKills",(_ConfirmedHumanKills + 1),true];
} else {
_ConfirmedBanditKills = _killingBlow getVariable ["ConfirmedBanditKills",0];
_killingBlow setVariable ["ConfirmedBanditKills",(_ConfirmedBanditKills + 1),true];
};
};