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

◆ DeSerializeNumericalVars()

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

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

2907 {
2908 //some variables handled on EntityAI level already!
2909 super.DeSerializeNumericalVars(floats);
2910
2911 // the order of serialization must be the same as the order of de-serialization
2912 int index = 0;
2913 int mask = Math.Round(floats.Get(index));
2914
2915 index++;
2916 //--------------------------------------------
2917 if (mask & VARIABLE_QUANTITY)
2918 {
2919 if (m_IsStoreLoad)
2920 {
2921 SetStoreLoadedQuantity(floats.Get(index));
2922 }
2923 else
2924 {
2925 float quantity = floats.Get(index);
2926 SetQuantity(quantity, true, false, false, false);
2927 }
2928 index++;
2929 }
2930 //--------------------------------------------
2931 if (mask & VARIABLE_WET)
2932 {
2933 float wet = floats.Get(index);
2934 SetWet(wet);
2935 index++;
2936 }
2937 //--------------------------------------------
2938 if (mask & VARIABLE_LIQUIDTYPE)
2939 {
2940 int liquidtype = Math.Round(floats.Get(index));
2941 SetLiquidType(liquidtype);
2942 index++;
2943 }
2944 //--------------------------------------------
2945 if (mask & VARIABLE_COLOR)
2946 {
2947 m_ColorComponentR = Math.Round(floats.Get(index));
2948 index++;
2949 m_ColorComponentG = Math.Round(floats.Get(index));
2950 index++;
2951 m_ColorComponentB = Math.Round(floats.Get(index));
2952 index++;
2953 m_ColorComponentA = Math.Round(floats.Get(index));
2954 index++;
2955 }
2956 //--------------------------------------------
2957 if (mask & VARIABLE_CLEANNESS)
2958 {
2959 int cleanness = Math.Round(floats.Get(index));
2960 SetCleanness(cleanness);
2961 index++;
2962 }
2963 }
bool m_IsStoreLoad
Определения ItemBase.c:70
int m_ColorComponentB
Определения ItemBase.c:80
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3647
int m_ColorComponentA
Определения ItemBase.c:81
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3728
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:3308
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3833
override void SetCleanness(int value, bool allow_client=false)
Определения ItemBase.c:3758
int m_ColorComponentR
Определения ItemBase.c:78
const int VARIABLE_LIQUIDTYPE
Определения 3_Game/constants.c:632
const int VARIABLE_CLEANNESS
Определения 3_Game/constants.c:635
const int VARIABLE_COLOR
Определения 3_Game/constants.c:634
const int VARIABLE_QUANTITY
Определения 3_Game/constants.c:628
const int VARIABLE_WET
Определения 3_Game/constants.c:631

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