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

◆ OnStoreLoad()

override bool InventoryItem::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

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

3121 {
3122 m_IsStoreLoad = true;
3124 {
3125 m_FixDamageSystemInit = true;
3126 }
3127
3128 if (!super.OnStoreLoad(ctx, version))
3129 {
3130 m_IsStoreLoad = false;
3131 return false;
3132 }
3133
3134 if (version >= 114)
3135 {
3136 bool hasQuickBarIndexSaved;
3137
3138 if (!ctx.Read(hasQuickBarIndexSaved))
3139 {
3140 m_IsStoreLoad = false;
3141 return false;
3142 }
3143
3144 if (hasQuickBarIndexSaved)
3145 {
3146 int itmQBIndex;
3147
3148 //Load quickbar item bind
3149 if (!ctx.Read(itmQBIndex))
3150 {
3151 m_IsStoreLoad = false;
3152 return false;
3153 }
3154
3155 PlayerBase parentPlayer = PlayerBase.Cast(GetHierarchyRootPlayer());
3156 if (itmQBIndex != -1 && parentPlayer)
3157 parentPlayer.SetLoadedQuickBarItemBind(this, itmQBIndex);
3158 }
3159 }
3160 else
3161 {
3162 // Backup of how it used to be
3163 PlayerBase player;
3164 int itemQBIndex;
3165 if (version == int.MAX)
3166 {
3167 if (!ctx.Read(itemQBIndex))
3168 {
3169 m_IsStoreLoad = false;
3170 return false;
3171 }
3172 }
3173 else if (Class.CastTo(player, GetHierarchyRootPlayer()))
3174 {
3175 //Load quickbar item bind
3176 if (!ctx.Read(itemQBIndex))
3177 {
3178 m_IsStoreLoad = false;
3179 return false;
3180 }
3181 if (itemQBIndex != -1 && player)
3182 player.SetLoadedQuickBarItemBind(this,itemQBIndex);
3183 }
3184 }
3185
3186 if (version < 140)
3187 {
3188 // variable management system
3189 if (!LoadVariables(ctx, version))
3190 {
3191 m_IsStoreLoad = false;
3192 return false;
3193 }
3194 }
3195
3196 //agent trasmission system
3197 if (!LoadAgents(ctx, version))
3198 {
3199 m_IsStoreLoad = false;
3200 return false;
3201 }
3202 if (version >= 132)
3203 {
3204 RemotelyActivatedItemBehaviour raib = GetRemotelyActivatedItemBehaviour();
3205 if (raib)
3206 {
3207 if (!raib.OnStoreLoad(ctx,version))
3208 {
3209 m_IsStoreLoad = false;
3210 return false;
3211 }
3212 }
3213 }
3214
3215 m_IsStoreLoad = false;
3216 return true;
3217 }
const int MAX
Определения EnConvert.c:27
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Определения RemoteDetonator.c:272
bool m_IsStoreLoad
Определения ItemBase.c:76
bool m_FixDamageSystemInit
Определения ItemBase.c:73
int GetDamageSystemVersionChange()
Re-sets DamageSystem changes.
Определения ItemBase.c:742
bool LoadAgents(ParamsReadContext ctx, int version)
Определения ItemBase.c:4066
bool OnStoreLoad(ParamsReadContext ctx, int version)
proto bool Read(void value_in)

Перекрестные ссылки Class::CastTo(), ItemBase::GetDamageSystemVersionChange(), GetRemotelyActivatedItemBehaviour(), LoadAgents(), m_FixDamageSystemInit, m_IsStoreLoad, MAX, RemotelyActivatedItemBehaviour::OnStoreLoad() и Serializer::Read().