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

◆ DeSerializeNumericalVars()

override void InventoryItem::DeSerializeNumericalVars ( array< float > floats)
inlineprotected

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

2935 {
2936 //some variables handled on EntityAI level already!
2937 super.DeSerializeNumericalVars(floats);
2938
2939 // the order of serialization must be the same as the order of de-serialization
2940 int index = 0;
2941 int mask = Math.Round(floats.Get(index));
2942
2943 index++;
2944 //--------------------------------------------
2945 if (mask & VARIABLE_QUANTITY)
2946 {
2947 if (m_IsStoreLoad)
2948 {
2949 SetStoreLoadedQuantity(floats.Get(index));
2950 }
2951 else
2952 {
2953 float quantity = floats.Get(index);
2954 SetQuantity(quantity, true, false, false, false);
2955 }
2956 index++;
2957 }
2958 //--------------------------------------------
2959 if (mask & VARIABLE_WET)
2960 {
2961 float wet = floats.Get(index);
2962 SetWet(wet);
2963 index++;
2964 }
2965 //--------------------------------------------
2966 if (mask & VARIABLE_LIQUIDTYPE)
2967 {
2968 int liquidtype = Math.Round(floats.Get(index));
2969 SetLiquidType(liquidtype);
2970 index++;
2971 }
2972 //--------------------------------------------
2973 if (mask & VARIABLE_COLOR)
2974 {
2975 m_ColorComponentR = Math.Round(floats.Get(index));
2976 index++;
2977 m_ColorComponentG = Math.Round(floats.Get(index));
2978 index++;
2979 m_ColorComponentB = Math.Round(floats.Get(index));
2980 index++;
2981 m_ColorComponentA = Math.Round(floats.Get(index));
2982 index++;
2983 }
2984 //--------------------------------------------
2985 if (mask & VARIABLE_CLEANNESS)
2986 {
2987 int cleanness = Math.Round(floats.Get(index));
2988 SetCleanness(cleanness);
2989 index++;
2990 }
2991 }
bool m_IsStoreLoad
Определения ItemBase.c:76
int m_ColorComponentB
Определения ItemBase.c:86
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3702
int m_ColorComponentA
Определения ItemBase.c:87
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3783
int m_ColorComponentG
Определения ItemBase.c:85
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:3340
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3888
override void SetCleanness(int value, bool allow_client=false)
Определения ItemBase.c:3813
int m_ColorComponentR
Определения ItemBase.c:84
const int VARIABLE_LIQUIDTYPE
Определения 3_Game/DayZ/constants.c:635
const int VARIABLE_CLEANNESS
Определения 3_Game/DayZ/constants.c:638
const int VARIABLE_COLOR
Определения 3_Game/DayZ/constants.c:637
const int VARIABLE_QUANTITY
Определения 3_Game/DayZ/constants.c:631
const int VARIABLE_WET
Определения 3_Game/DayZ/constants.c:634

Перекрестные ссылки m_ColorComponentA, m_ColorComponentB, m_ColorComponentG, m_ColorComponentR, m_IsStoreLoad, Math::Round(), SetCleanness(), SetLiquidType(), ItemBase::SetQuantity(), SetStoreLoadedQuantity(), SetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY и VARIABLE_WET.