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

◆ ReadVarsFromCTX()

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

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

3030 {
3031 if (!super.ReadVarsFromCTX(ctx,version))
3032 return false;
3033
3034 int intValue;
3035 float value;
3036
3037 if (version < 140)
3038 {
3039 if (!ctx.Read(intValue))
3040 return false;
3041
3042 m_VariablesMask = intValue;
3043 }
3044
3045 if (m_VariablesMask & VARIABLE_QUANTITY)
3046 {
3047 if (!ctx.Read(value))
3048 return false;
3049
3050 if (IsStoreLoad())
3051 {
3053 }
3054 else
3055 {
3056 SetQuantity(value, true, false, false, false);
3057 }
3058 }
3059 //--------------------------------------------
3060 if (version < 140)
3061 {
3062 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3063 {
3064 if (!ctx.Read(value))
3065 return false;
3066 SetTemperatureDirect(value);
3067 }
3068 }
3069 //--------------------------------------------
3070 if (m_VariablesMask & VARIABLE_WET)
3071 {
3072 if (!ctx.Read(value))
3073 return false;
3074 SetWet(value);
3075 }
3076 //--------------------------------------------
3077 if (m_VariablesMask & VARIABLE_LIQUIDTYPE)
3078 {
3079 if (!ctx.Read(intValue))
3080 return false;
3081 SetLiquidType(intValue);
3082 }
3083 //--------------------------------------------
3084 if (m_VariablesMask & VARIABLE_COLOR)
3085 {
3086 int r,g,b,a;
3087 if (!ctx.Read(r))
3088 return false;
3089 if (!ctx.Read(g))
3090 return false;
3091 if (!ctx.Read(b))
3092 return false;
3093 if (!ctx.Read(a))
3094 return false;
3095
3096 SetColor(r,g,b,a);
3097 }
3098 //--------------------------------------------
3099 if (m_VariablesMask & VARIABLE_CLEANNESS)
3100 {
3101 if (!ctx.Read(intValue))
3102 return false;
3103 SetCleanness(intValue);
3104 }
3105 //--------------------------------------------
3106 if (version >= 138 && version < 140)
3107 {
3108 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3109 {
3110 if (!ctx.Read(intValue))
3111 return false;
3112 SetFrozen(intValue);
3113 }
3114 }
3115
3116 return true;
3117 }
override void SetColor(int r, int g, int b, int a)
Определения ItemBase.c:3852
override bool IsStoreLoad()
Определения ItemBase.c:3778
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3702
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3783
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
proto bool Read(void value_in)
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_TEMPERATURE
Определения 3_Game/DayZ/constants.c:633
const int VARIABLE_QUANTITY
Определения 3_Game/DayZ/constants.c:631
const int VARIABLE_WET
Определения 3_Game/DayZ/constants.c:634

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