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

◆ ReadVarsFromCTX()

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

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

3002 {
3003 if (!super.ReadVarsFromCTX(ctx,version))
3004 return false;
3005
3006 int intValue;
3007 float value;
3008
3009 if (version < 140)
3010 {
3011 if (!ctx.Read(intValue))
3012 return false;
3013
3014 m_VariablesMask = intValue;
3015 }
3016
3017 if (m_VariablesMask & VARIABLE_QUANTITY)
3018 {
3019 if (!ctx.Read(value))
3020 return false;
3021
3022 if (IsStoreLoad())
3023 {
3025 }
3026 else
3027 {
3028 SetQuantity(value, true, false, false, false);
3029 }
3030 }
3031 //--------------------------------------------
3032 if (version < 140)
3033 {
3034 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3035 {
3036 if (!ctx.Read(value))
3037 return false;
3038 SetTemperatureDirect(value);
3039 }
3040 }
3041 //--------------------------------------------
3042 if (m_VariablesMask & VARIABLE_WET)
3043 {
3044 if (!ctx.Read(value))
3045 return false;
3046 SetWet(value);
3047 }
3048 //--------------------------------------------
3049 if (m_VariablesMask & VARIABLE_LIQUIDTYPE)
3050 {
3051 if (!ctx.Read(intValue))
3052 return false;
3053 SetLiquidType(intValue);
3054 }
3055 //--------------------------------------------
3056 if (m_VariablesMask & VARIABLE_COLOR)
3057 {
3058 int r,g,b,a;
3059 if (!ctx.Read(r))
3060 return false;
3061 if (!ctx.Read(g))
3062 return false;
3063 if (!ctx.Read(b))
3064 return false;
3065 if (!ctx.Read(a))
3066 return false;
3067
3068 SetColor(r,g,b,a);
3069 }
3070 //--------------------------------------------
3071 if (m_VariablesMask & VARIABLE_CLEANNESS)
3072 {
3073 if (!ctx.Read(intValue))
3074 return false;
3075 SetCleanness(intValue);
3076 }
3077 //--------------------------------------------
3078 if (version >= 138 && version < 140)
3079 {
3080 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3081 {
3082 if (!ctx.Read(intValue))
3083 return false;
3084 SetFrozen(intValue);
3085 }
3086 }
3087
3088 return true;
3089 }
override void SetColor(int r, int g, int b, int a)
Определения ItemBase.c:3797
override bool IsStoreLoad()
Определения ItemBase.c:3723
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3647
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3728
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
proto bool Read(void value_in)
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_TEMPERATURE
Определения 3_Game/constants.c:630
const int VARIABLE_QUANTITY
Определения 3_Game/constants.c:628
const int VARIABLE_WET
Определения 3_Game/constants.c:631

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