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

◆ OnStoreLoad()

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

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

6860 {
6861 //Print("---- PlayerBase OnStoreLoad START ----, version: "+version);
6862 m_aQuickBarLoad = new array<ref Param2<EntityAI,int>>;
6863
6864 // todo :: this should be after base call !!!!
6865 if (version < 102)//write removed in v. 102
6866 {
6867 if (!ctx.Read(m_StoreLoadVersion))
6868 return false;
6869 }
6870
6871 if (!super.OnStoreLoad(ctx, version))
6872 return false;
6873
6874 // FSM of hands
6875 if (!GetHumanInventory().OnStoreLoad(ctx, version))
6876 return false;
6877
6878 if (!OnStoreLoadLifespan(ctx, version))
6879 return false;
6880
6881 if (GetDayZGame().IsServer() && GetDayZGame().IsMultiplayer())
6882 {
6883 if (!GetPlayerStats().LoadStats(ctx, version)) // load stats
6884 {
6885 Print("---- failed to load PlayerStats ----");
6886 return false;
6887 }
6888
6889 if (!m_ModifiersManager.OnStoreLoad(ctx, version))
6890 {
6891 Print("---- failed to load ModifiersManager, read fail ----");
6892 return false;
6893 }
6894
6895 if (!m_AgentPool.OnStoreLoad(ctx, version))
6896 {
6897 Print("---- failed to load AgentPool, read fail ----");
6898 return false;
6899 }
6900
6901 if (!GetSymptomManager().OnStoreLoad(ctx, version))
6902 {
6903 Print("---- failed to load SymptomManager, read fail ----");
6904 return false;
6905 }
6906
6907 if (!GetBleedingManagerServer().OnStoreLoad(ctx, version))
6908 {
6909 Print("---- failed to load BleedingManagerServer, read fail ----");
6910 return false;
6911 }
6912
6913 if (!m_PlayerStomach.OnStoreLoad(ctx, version))
6914 {
6915 Print("---- failed to load PlayerStomach, read fail ----");
6916 return false;
6917 }
6918
6919 //Check for broken leg value
6920 if (version >= 116)
6921 {
6922 if (!ctx.Read(m_BrokenLegState))
6923 {
6924 return false;
6925 }
6926 if (version <= 126)// WHILE >= 116
6927 {
6928 if (!ctx.Read(m_LocalBrokenState))
6929 {
6930 return false;
6931 }
6932 }
6933 }
6934 //Load persistent flags value
6935 if (version >= 125 && (!ctx.Read(m_PersistentFlags)))
6936 {
6937 Print("---- failed to load Persistent Flags, read fail ----");
6938 return false;
6939 }
6940
6941 if (version >= 131)
6942 {
6943 bool onLadder;
6944 if (!ctx.Read(onLadder))
6945 {
6946 return false;
6947 }
6948
6949 if (onLadder)
6950 {
6951 vector position;
6952 if (!ctx.Read(position))
6953 {
6954 return false;
6955 }
6956
6957 Hive hive = GetHive();
6958 if (!hive || !hive.CharacterIsLoginPositionChanged(this))
6959 {
6960 SetPosition(position);
6961 }
6962 }
6963 }
6964
6965 if (version >= 134)
6966 {
6967 ArrowManagerPlayer arrowManager = ArrowManagerPlayer.Cast(GetArrowManager());
6968 arrowManager.Load(ctx);
6969 }
6970 }
6971
6972 Print("---- PlayerBase OnStoreLoad SUCCESS ----");
6973 return true;
6974 }
DayZGame GetDayZGame()
Определения DayZGame.c:3870
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:2665
int m_BrokenLegState
Определения PlayerBase.c:145
override bool OnStoreLoad(ParamsReadContext ctx, int version)
Определения PlayerBase.c:6859
ref PlayerAgentPool m_AgentPool
Определения PlayerBase.c:44
BleedingSourcesManagerServer GetBleedingManagerServer()
Определения PlayerBase.c:2655
ref PlayerStomach m_PlayerStomach
Определения PlayerBase.c:273
int m_LocalBrokenState
Определения PlayerBase.c:146
int m_PersistentFlags
Определения PlayerBase.c:106
ref ModifiersManager m_ModifiersManager
Определения PlayerBase.c:41
ref array< ref Param2< EntityAI, int > > m_aQuickBarLoad
Определения PlayerBase.c:196
PlayerStats GetPlayerStats()
Определения PlayerBase.c:1844
int m_StoreLoadVersion
Определения PlayerBase.c:23
bool OnStoreLoadLifespan(ParamsReadContext ctx, int version)
Определения PlayerBase.c:7005
override ArrowManagerBase GetArrowManager()
Определения PlayerBase.c:1864
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:438

Перекрестные ссылки 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().