diff --git a/SQF/dayz_code/Configs/CfgPlayerStats/p_bandits_killed.hpp b/SQF/dayz_code/Configs/CfgPlayerStats/p_bandits_killed.hpp index 5a3c91658..3f6354fc7 100644 --- a/SQF/dayz_code/Configs/CfgPlayerStats/p_bandits_killed.hpp +++ b/SQF/dayz_code/Configs/CfgPlayerStats/p_bandits_killed.hpp @@ -11,7 +11,7 @@ class horde_journal_pages_bandits { idd = -1; movingEnable = false; - onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['banditKills', 0]] call horde_epeen_setText_stats_fnc;"; + onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['ConfirmedBanditKills', 0]] call horde_epeen_setText_stats_fnc;"; enableSimulation = true; controlsBackground[] = {}; objects[] = {}; diff --git a/SQF/dayz_code/Configs/CfgPlayerStats/p_murders.hpp b/SQF/dayz_code/Configs/CfgPlayerStats/p_murders.hpp index c3d118899..43ca0aaf3 100644 --- a/SQF/dayz_code/Configs/CfgPlayerStats/p_murders.hpp +++ b/SQF/dayz_code/Configs/CfgPlayerStats/p_murders.hpp @@ -11,7 +11,7 @@ class horde_journal_pages_murders { idd = -1; movingEnable = false; - onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['humanKills', 0]] call horde_epeen_setText_stats_fnc;"; + onLoad = "uiNamespace setVariable ['horde_myDisplay', (_this select 0)]; [player getVariable['ConfirmedHumanKills', 0]] call horde_epeen_setText_stats_fnc;"; enableSimulation = true; controlsBackground[] = {}; objects[] = {}; diff --git a/SQF/dayz_code/actions/study_body.sqf b/SQF/dayz_code/actions/study_body.sqf index 553dbedd9..cb00246fb 100644 --- a/SQF/dayz_code/actions/study_body.sqf +++ b/SQF/dayz_code/actions/study_body.sqf @@ -4,5 +4,14 @@ _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"; format[localize "str_player_studybody",_name,_methodStr] call dayz_rollingMessages; + +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]; +}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index e58bad2dd..0a586f2c9 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -102,6 +102,11 @@ if (count _array > 0) then { }; }; _body setVariable ["deathType",_method,true]; + + //Setup for study bodys. + if ((!isNull _source) && (_source != player)) then { + _body setVariable ["KillingBlow",_source,true]; + }; }; terminate dayz_musicH; diff --git a/SQF/dayz_code/compile/player_humanityMorph.sqf b/SQF/dayz_code/compile/player_humanityMorph.sqf index f77dd93a6..ffc9501bd 100644 --- a/SQF/dayz_code/compile/player_humanityMorph.sqf +++ b/SQF/dayz_code/compile/player_humanityMorph.sqf @@ -23,6 +23,9 @@ _headShots = player getVariable ["headShots",0]; _humanKills = player getVariable ["humanKills",0]; _banditKills = player getVariable ["banditKills",0]; _achievements = player getVariable ["Achievements",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]; + +_ConfirmedHumanKills = player getVariable ["ConfirmedHumanKills",0]; +_ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0]; _friendlies = player getVariable ["friendlies",[]]; _tagSetting = player getVariable ["DZE_display_name",false]; @@ -78,6 +81,9 @@ player setVariable ["banditKills",_banditKills,true]; player setVariable ["characterID",_charID,true]; player setVariable ["worldspace",_worldspace]; player setVariable ["Achievements",_achievements]; + +player getVariable ["ConfirmedHumanKills",_ConfirmedHumanKills,true]; +player getVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true]; player setVariable ["friendlies",_friendlies,true]; player setVariable ["DZE_display_name",_tagSetting,true]; diff --git a/SQF/dayz_server/compile/server_playerSetup.sqf b/SQF/dayz_server/compile/server_playerSetup.sqf index a4a729d37..e9734aca2 100644 --- a/SQF/dayz_server/compile/server_playerSetup.sqf +++ b/SQF/dayz_server/compile/server_playerSetup.sqf @@ -141,6 +141,11 @@ if (count _stats > 0) then { _playerObj setVariable ["headShots",(_stats select 1),true]; _playerObj setVariable ["humanKills",(_stats select 2),true]; _playerObj setVariable ["banditKills",(_stats select 3),true]; + + //ConfirmedKills + _playerObj setVariable ["ConfirmedHumanKills",(_stats select 2),true]; + _playerObj setVariable ["ConfirmedBanditKills",(_stats select 3),true]; + _playerObj addScore (_stats select 1); //Save Score @@ -162,6 +167,10 @@ if (count _stats > 0) then { _playerObj setVariable ["humanKills",0,true]; _playerObj setVariable ["banditKills",0,true]; _playerObj setVariable ["headShots",0,true]; + + //ConfirmedKills + _playerObj setVariable ["ConfirmedHumanKills",0,true]; + _playerObj setVariable ["ConfirmedBanditKills",0,true]; //record for Server JIP checks _playerObj setVariable ["zombieKills_CHK",0];