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

◆ ReadVarsFromCTX()

override bool InventoryItem::ReadVarsFromCTX ( ParamsReadContext ctx,
int version = -1 )
inlineprivate

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

2932 {
2933 if (!super.ReadVarsFromCTX(ctx,version))
2934 return false;
2935
2936 int intValue;
2937 float value;
2938
2939 if (version < 140)
2940 {
2941 if (!ctx.Read(intValue))
2942 return false;
2943
2944 m_VariablesMask = intValue;
2945 }
2946
2947 if (m_VariablesMask & VARIABLE_QUANTITY)
2948 {
2949 if (!ctx.Read(value))
2950 return false;
2951
2952 if (IsStoreLoad())
2953 {
2955 }
2956 else
2957 {
2958 SetQuantity(value, true, false, false, false);
2959 }
2960 }
2961 //--------------------------------------------
2962 if (version < 140)
2963 {
2964 if (m_VariablesMask & VARIABLE_TEMPERATURE)
2965 {
2966 if (!ctx.Read(value))
2967 return false;
2968 SetTemperatureDirect(value);
2969 }
2970 }
2971 //--------------------------------------------
2972 if (m_VariablesMask & VARIABLE_WET)
2973 {
2974 if (!ctx.Read(value))
2975 return false;
2976 SetWet(value);
2977 }
2978 //--------------------------------------------
2979 if (m_VariablesMask & VARIABLE_LIQUIDTYPE)
2980 {
2981 if (!ctx.Read(intValue))
2982 return false;
2983 SetLiquidType(intValue);
2984 }
2985 //--------------------------------------------
2986 if (m_VariablesMask & VARIABLE_COLOR)
2987 {
2988 int r,g,b,a;
2989 if (!ctx.Read(r))
2990 return false;
2991 if (!ctx.Read(g))
2992 return false;
2993 if (!ctx.Read(b))
2994 return false;
2995 if (!ctx.Read(a))
2996 return false;
2997
2998 SetColor(r,g,b,a);
2999 }
3000 //--------------------------------------------
3001 if (m_VariablesMask & VARIABLE_CLEANNESS)
3002 {
3003 if (!ctx.Read(intValue))
3004 return false;
3005 SetCleanness(intValue);
3006 }
3007 //--------------------------------------------
3008 if (version >= 138 && version < 140)
3009 {
3010 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3011 {
3012 if (!ctx.Read(intValue))
3013 return false;
3014 SetFrozen(intValue);
3015 }
3016 }
3017
3018 return true;
3019 }
override void SetColor(int r, int g, int b, int a)
Определения ItemBase.c:3727
override bool IsStoreLoad()
Определения ItemBase.c:3653
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3577
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3658
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
Set item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
Определения ItemBase.c:3238
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3763
override void SetCleanness(int value, bool allow_client=false)
Определения ItemBase.c:3688
proto bool Read(void value_in)
const int VARIABLE_LIQUIDTYPE
Определения constants.c:630
const int VARIABLE_CLEANNESS
Определения constants.c:633
const int VARIABLE_COLOR
Определения constants.c:632
const int VARIABLE_TEMPERATURE
Определения constants.c:628
const int VARIABLE_QUANTITY
Определения constants.c:626
const int VARIABLE_WET
Определения constants.c:629

Перекрестные ссылки IsStoreLoad(), Serializer::Read(), SetCleanness(), SetColor(), SetLiquidType(), ItemBase::SetQuantity(), SetStoreLoadedQuantity(), SetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY, VARIABLE_TEMPERATURE и VARIABLE_WET.