mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 17:10:49 +03:00
Update confirmed kills system
Vanilla commits applied:347105c036e6b6814f511009828d8e
This commit is contained in:
@@ -1,22 +1,38 @@
|
||||
private["_body","_name","_method","_methodStr","_message"];
|
||||
private["_body","_name","_method","_methodStr","_message","_killingBlow","_BodyStudied"];
|
||||
|
||||
_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",objNull];
|
||||
_killingBlow = _body getVariable ["KillingBlow",[objNull,0]];
|
||||
|
||||
/*
|
||||
Setup by player_death
|
||||
[Object,Punished];
|
||||
_killer = _killingBlow select 0; //Killer
|
||||
_Punished = _killingBlow select 1; //False = HumanKill, True = BanditKill
|
||||
*/
|
||||
|
||||
//Has the body already been Studied?
|
||||
_BodyStudied = _body getVariable ["BodyStudied",objNull];
|
||||
|
||||
// "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"};
|
||||
|
||||
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];
|
||||
//Body hasnt already been Studied lets set the confimed Kills system.
|
||||
if (isNull _BodyStudied) then {
|
||||
if (!(isNull (_killingBlow select 0)) AND {(isPlayer (_killingBlow select 0))}) then {
|
||||
if (!(_killingBlow select 1)) then {
|
||||
_ConfirmedHumanKills = (_killingBlow select 0) getVariable ["ConfirmedHumanKills",0];
|
||||
(_killingBlow select 0) setVariable ["ConfirmedHumanKills",(_ConfirmedHumanKills + 1),true];
|
||||
} else {
|
||||
_ConfirmedBanditKills = (_killingBlow select 0) getVariable ["ConfirmedBanditKills",0];
|
||||
(_killingBlow select 0) setVariable ["ConfirmedBanditKills",(_ConfirmedBanditKills + 1),true];
|
||||
};
|
||||
|
||||
//Set the body as Studied for all.
|
||||
_body setVariable ["BodyStudied",_body];
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user