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

◆ OnStoreLoad()

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

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

3093 {
3094 m_IsStoreLoad = true;
3096 {
3097 m_FixDamageSystemInit = true;
3098 }
3099
3100 if (!super.OnStoreLoad(ctx, version))
3101 {
3102 m_IsStoreLoad = false;
3103 return false;
3104 }
3105
3106 if (version >= 114)
3107 {
3108 bool hasQuickBarIndexSaved;
3109
3110 if (!ctx.Read(hasQuickBarIndexSaved))
3111 {
3112 m_IsStoreLoad = false;
3113 return false;
3114 }
3115
3116 if (hasQuickBarIndexSaved)
3117 {
3118 int itmQBIndex;
3119
3120 //Load quickbar item bind
3121 if (!ctx.Read(itmQBIndex))
3122 {
3123 m_IsStoreLoad = false;
3124 return false;
3125 }
3126
3127 PlayerBase parentPlayer = PlayerBase.Cast(GetHierarchyRootPlayer());
3128 if (itmQBIndex != -1 && parentPlayer)
3129 parentPlayer.SetLoadedQuickBarItemBind(this, itmQBIndex);
3130 }
3131 }
3132 else
3133 {
3134 // Backup of how it used to be
3135 PlayerBase player;
3136 int itemQBIndex;
3137 if (version == int.MAX)
3138 {
3139 if (!ctx.Read(itemQBIndex))
3140 {
3141 m_IsStoreLoad = false;
3142 return false;
3143 }
3144 }
3145 else if (Class.CastTo(player, GetHierarchyRootPlayer()))
3146 {
3147 //Load quickbar item bind
3148 if (!ctx.Read(itemQBIndex))
3149 {
3150 m_IsStoreLoad = false;
3151 return false;
3152 }
3153 if (itemQBIndex != -1 && player)
3154 player.SetLoadedQuickBarItemBind(this,itemQBIndex);
3155 }
3156 }
3157
3158 if (version < 140)
3159 {
3160 // variable management system
3161 if (!LoadVariables(ctx, version))
3162 {
3163 m_IsStoreLoad = false;
3164 return false;
3165 }
3166 }
3167
3168 //agent trasmission system
3169 if (!LoadAgents(ctx, version))
3170 {
3171 m_IsStoreLoad = false;
3172 return false;
3173 }
3174 if (version >= 132)
3175 {
3176 RemotelyActivatedItemBehaviour raib = GetRemotelyActivatedItemBehaviour();
3177 if (raib)
3178 {
3179 if (!raib.OnStoreLoad(ctx,version))
3180 {
3181 m_IsStoreLoad = false;
3182 return false;
3183 }
3184 }
3185 }
3186
3187 m_IsStoreLoad = false;
3188 return true;
3189 }
const int MAX
Определения EnConvert.c:27
override RemotelyActivatedItemBehaviour GetRemotelyActivatedItemBehaviour()
Определения RemoteDetonator.c:272
bool m_IsStoreLoad
Определения ItemBase.c:70
bool m_FixDamageSystemInit
Определения ItemBase.c:67
int GetDamageSystemVersionChange()
Re-sets DamageSystem changes.
Определения ItemBase.c:732
bool LoadAgents(ParamsReadContext ctx, int version)
Определения ItemBase.c:4016
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().