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

◆ OnStoreLoad()

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

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

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