DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TransformRestrainItem()

static void TransformRestrainItem ( EntityAI current_item,
EntityAI tool,
PlayerBase player_source,
PlayerBase player_target,
bool destroy = false )
staticprotected

См. определение в файле MiscGameplayFunctions.c строка 858

859 {
860 bool type;
861
862 if ( tool )
863 {
864 //is unrestrain and not struggle
865 type = tool.ConfigGetBool("RestrainUnlockType");
866 }
867 string new_item_name = current_item.ConfigGetString( "OnRestrainChange");
868
869 if ( new_item_name != "" )
870 {
871 if ( player_target )
872 {
873 if (!player_target.IsAlive() || destroy)
874 {
875 MiscGameplayFunctions.TurnItemIntoItemEx(player_source, new DestroyItemInCorpsesHandsAndCreateNewOnGndLambda(current_item, new_item_name, player_target, type));
876 }
877 else
878 {
879 MiscGameplayFunctions.TurnItemIntoItemEx(player_target, new ReplaceAndDestroyLambdaEx(current_item, new_item_name, player_target, type));
880 }
881 }
882 else
883 {
884 MiscGameplayFunctions.TurnItemIntoItemEx(player_target, new ReplaceAndDestroyLambdaEx(current_item, new_item_name, player_target, type));
885 }
886 }
887 else
888 {
889 Error("current_item:" +current_item+ ", tool:" +tool +". No value for 'OnRestrainChange' config parameter");
890 }
891 }
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки Error().