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

◆ DeSerializeNumericalVars()

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

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

2837 {
2838 //some variables handled on EntityAI level already!
2839 super.DeSerializeNumericalVars(floats);
2840
2841 // the order of serialization must be the same as the order of de-serialization
2842 int index = 0;
2843 int mask = Math.Round(floats.Get(index));
2844
2845 index++;
2846 //--------------------------------------------
2847 if (mask & VARIABLE_QUANTITY)
2848 {
2849 if (m_IsStoreLoad)
2850 {
2851 SetStoreLoadedQuantity(floats.Get(index));
2852 }
2853 else
2854 {
2855 float quantity = floats.Get(index);
2856 SetQuantity(quantity, true, false, false, false);
2857 }
2858 index++;
2859 }
2860 //--------------------------------------------
2861 if (mask & VARIABLE_WET)
2862 {
2863 float wet = floats.Get(index);
2864 SetWet(wet);
2865 index++;
2866 }
2867 //--------------------------------------------
2868 if (mask & VARIABLE_LIQUIDTYPE)
2869 {
2870 int liquidtype = Math.Round(floats.Get(index));
2871 SetLiquidType(liquidtype);
2872 index++;
2873 }
2874 //--------------------------------------------
2875 if (mask & VARIABLE_COLOR)
2876 {
2877 m_ColorComponentR = Math.Round(floats.Get(index));
2878 index++;
2879 m_ColorComponentG = Math.Round(floats.Get(index));
2880 index++;
2881 m_ColorComponentB = Math.Round(floats.Get(index));
2882 index++;
2883 m_ColorComponentA = Math.Round(floats.Get(index));
2884 index++;
2885 }
2886 //--------------------------------------------
2887 if (mask & VARIABLE_CLEANNESS)
2888 {
2889 int cleanness = Math.Round(floats.Get(index));
2890 SetCleanness(cleanness);
2891 index++;
2892 }
2893 }
bool m_IsStoreLoad
Определения ItemBase.c:70
int m_ColorComponentB
Определения ItemBase.c:80
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3577
int m_ColorComponentA
Определения ItemBase.c:81
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3658
int m_ColorComponentG
Определения ItemBase.c:79
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
int m_ColorComponentR
Определения ItemBase.c:78
const int VARIABLE_LIQUIDTYPE
Определения constants.c:630
const int VARIABLE_CLEANNESS
Определения constants.c:633
const int VARIABLE_COLOR
Определения constants.c:632
const int VARIABLE_QUANTITY
Определения constants.c:626
const int VARIABLE_WET
Определения constants.c:629

Перекрестные ссылки 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.