DayZ 1.27
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 строка 795

796 {
797 bool type;
798
799 if ( tool )
800 {
801 //is unrestrain and not struggle
802 type = tool.ConfigGetBool("RestrainUnlockType");
803 }
804 string new_item_name = current_item.ConfigGetString( "OnRestrainChange");
805
806 if ( new_item_name != "" )
807 {
808 if ( player_target )
809 {
810 if (player_target.IsAlive())
811 MiscGameplayFunctions.TurnItemIntoItemEx(player_target, new ReplaceAndDestroyLambdaEx(current_item, new_item_name, player_target, type));
812 else
813 MiscGameplayFunctions.TurnItemIntoItemEx(player_source, new DestroyItemInCorpsesHandsAndCreateNewOnGndLambda(current_item, new_item_name, player_target, type));
814 }
815 else
816 {
817 MiscGameplayFunctions.TurnItemIntoItemEx(player_target, new ReplaceAndDestroyLambdaEx(current_item, new_item_name, player_target, type));
818 }
819 }
820 else
821 {
822 Error("current_item:" +current_item+ ", tool:" +tool +". No value for 'OnRestrainChange' config parameter");
823 }
824 }
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

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