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

◆ OnStoreLoad()

override bool ManBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprivate

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

7086 {
7087 //Print("---- PlayerBase OnStoreLoad START ----, version: "+version);
7088 m_aQuickBarLoad = new array<ref Param2<EntityAI,int>>;
7089
7090 // todo :: this should be after base call !!!!
7091 if (version < 102)//write removed in v. 102
7092 {
7093 if (!ctx.Read(m_StoreLoadVersion))
7094 return false;
7095 }
7096
7097 if (!super.OnStoreLoad(ctx, version))
7098 return false;
7099
7100 // FSM of hands
7101 if (!GetHumanInventory().OnStoreLoad(ctx, version))
7102 return false;
7103
7104 if (!OnStoreLoadLifespan(ctx, version))
7105 return false;
7106
7107 if (GetDayZGame().IsServer() && GetDayZGame().IsMultiplayer())
7108 {
7109 if (!GetPlayerStats().LoadStats(ctx, version)) // load stats
7110 {
7111 Print("---- failed to load PlayerStats ----");
7112 return false;
7113 }
7114
7115 if (!m_ModifiersManager.OnStoreLoad(ctx, version))
7116 {
7117 Print("---- failed to load ModifiersManager, read fail ----");
7118 return false;
7119 }
7120
7121 if (!m_AgentPool.OnStoreLoad(ctx, version))
7122 {
7123 Print("---- failed to load AgentPool, read fail ----");
7124 return false;
7125 }
7126
7127 if (!GetSymptomManager().OnStoreLoad(ctx, version))
7128 {
7129 Print("---- failed to load SymptomManager, read fail ----");
7130 return false;
7131 }
7132
7133 if (!GetBleedingManagerServer().OnStoreLoad(ctx, version))
7134 {
7135 Print("---- failed to load BleedingManagerServer, read fail ----");
7136 return false;
7137 }
7138
7139 if (!m_PlayerStomach.OnStoreLoad(ctx, version))
7140 {
7141 Print("---- failed to load PlayerStomach, read fail ----");
7142 return false;
7143 }
7144
7145 //Check for broken leg value
7146 if (version >= 116)
7147 {
7148 if (!ctx.Read(m_BrokenLegState))
7149 {
7150 return false;
7151 }
7152 if (version <= 126)// WHILE >= 116
7153 {
7154 if (!ctx.Read(m_LocalBrokenState))
7155 {
7156 return false;
7157 }
7158 }
7159 }
7160 //Load persistent flags value
7161 if (version >= 125 && (!ctx.Read(m_PersistentFlags)))
7162 {
7163 Print("---- failed to load Persistent Flags, read fail ----");
7164 return false;
7165 }
7166
7167 if (version >= 131)
7168 {
7169 bool onLadder;
7170 if (!ctx.Read(onLadder))
7171 {
7172 return false;
7173 }
7174
7175 if (onLadder)
7176 {
7177 vector position;
7178 if (!ctx.Read(position))
7179 {
7180 return false;
7181 }
7182
7183 Hive hive = GetHive();
7184 if (!hive || !hive.CharacterIsLoginPositionChanged(this))
7185 {
7186 SetPosition(position);
7187 }
7188 }
7189 }
7190
7191 if (version >= 134)
7192 {
7193 ArrowManagerPlayer arrowManager = ArrowManagerPlayer.Cast(GetArrowManager());
7194 arrowManager.Load(ctx);
7195 }
7196 }
7197
7198 Print("---- PlayerBase OnStoreLoad SUCCESS ----");
7199 return true;
7200 }
DayZGame GetDayZGame()
Определения DayZGame.c:3944
proto native Hive GetHive()
bool LoadStats(ParamsReadContext ctx, int version)
Определения PlayerStats.c:115
bool Load(ParamsReadContext ctx)
Определения ArrowManagerPlayer.c:75
proto native bool CharacterIsLoginPositionChanged(Man player)
Only valid during login.
SymptomManager GetSymptomManager()
Определения PlayerBase.c:2783
int m_BrokenLegState
Определения PlayerBase.c:192
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Определения PlayerBase.c:7085
ref PlayerAgentPool m_AgentPool
Определения PlayerBase.c:91
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2773
ref PlayerStomach m_PlayerStomach
Определения PlayerBase.c:320
int m_LocalBrokenState
Определения PlayerBase.c:193
int m_PersistentFlags
Определения PlayerBase.c:153
ref ModifiersManager m_ModifiersManager
Определения PlayerBase.c:88
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
Определения PlayerBase.c:243
PlayerStats GetPlayerStats()
Определения PlayerBase.c:1974
int m_StoreLoadVersion
Определения PlayerBase.c:71
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
Определения PlayerBase.c:7231
override ArrowManagerBase GetArrowManager()
Определения PlayerBase.c:1994
proto bool Read(void value_in)
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:463

Перекрестные ссылки Hive::CharacterIsLoginPositionChanged(), GetArrowManager(), GetBleedingManagerServer(), GetDayZGame(), GetHive(), GetPlayerStats(), GetSymptomManager(), ArrowManagerPlayer::Load(), LoadStats(), m_AgentPool, m_aQuickBarLoad, m_BrokenLegState, m_LocalBrokenState, m_ModifiersManager, m_PersistentFlags, m_PlayerStomach, m_StoreLoadVersion, OnStoreLoad(), OnStoreLoadLifespan(), Print(), Serializer::Read() и SetPosition().