Changed: #1433 Merge changes from patch 1.13
This commit is contained in:
parent
01a3479288
commit
ea0804b153
4 changed files with 56 additions and 12 deletions
|
@ -1108,9 +1108,7 @@ namespace CHARSYNC
|
|||
|
||||
void setResult(TCharacterNameResult value)
|
||||
{
|
||||
|
||||
_Result = value;
|
||||
|
||||
}
|
||||
//
|
||||
uint32 getUserId() const
|
||||
|
@ -1120,9 +1118,7 @@ namespace CHARSYNC
|
|||
|
||||
void setUserId(uint32 value)
|
||||
{
|
||||
|
||||
_UserId = value;
|
||||
|
||||
}
|
||||
//
|
||||
uint8 getCharIndex() const
|
||||
|
@ -1132,9 +1128,7 @@ namespace CHARSYNC
|
|||
|
||||
void setCharIndex(uint8 value)
|
||||
{
|
||||
|
||||
_CharIndex = value;
|
||||
|
||||
}
|
||||
//
|
||||
const ucstring& getFullName() const
|
||||
|
@ -1144,9 +1138,7 @@ namespace CHARSYNC
|
|||
|
||||
void setFullName(const ucstring &value)
|
||||
{
|
||||
|
||||
_FullName = value;
|
||||
|
||||
}
|
||||
|
||||
bool operator == (const CValidateNameResult &other) const
|
||||
|
@ -1161,7 +1153,6 @@ namespace CHARSYNC
|
|||
// constructor
|
||||
CValidateNameResult()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void serial(NLMISC::IStream &s)
|
||||
|
@ -1170,7 +1161,6 @@ namespace CHARSYNC
|
|||
s.serial(_UserId);
|
||||
s.serial(_CharIndex);
|
||||
s.serial(_FullName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -884,6 +884,7 @@ namespace RYMSG
|
|||
std::vector< NLMISC::CSheetId > _LootList;
|
||||
//
|
||||
NLMISC::CSheetId _Outpost;
|
||||
uint32 _Organization;
|
||||
//
|
||||
float _MaxHitRangeForPC;
|
||||
//
|
||||
|
@ -1336,6 +1337,21 @@ namespace RYMSG
|
|||
_Outpost = value;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
uint32 getOrganization() const
|
||||
{
|
||||
return _Organization;
|
||||
}
|
||||
|
||||
void setOrganization(uint32 value)
|
||||
{
|
||||
|
||||
|
||||
_Organization = value;
|
||||
|
||||
|
||||
}
|
||||
//
|
||||
float getMaxHitRangeForPC() const
|
||||
|
@ -1431,6 +1447,7 @@ namespace RYMSG
|
|||
&& _ContextOptions == other._ContextOptions
|
||||
&& _LootList == other._LootList
|
||||
&& _Outpost == other._Outpost
|
||||
&& _Organization == other._Organization
|
||||
&& _MaxHitRangeForPC == other._MaxHitRangeForPC
|
||||
&& _UserModelId == other._UserModelId
|
||||
&& _CustomLootTableId == other._CustomLootTableId
|
||||
|
@ -1489,6 +1506,7 @@ namespace RYMSG
|
|||
s.serialCont(_ContextOptions);
|
||||
s.serialCont(_LootList);
|
||||
s.serial(_Outpost);
|
||||
s.serial(_Organization);
|
||||
s.serial(_MaxHitRangeForPC);
|
||||
s.serial(_UserModelId);
|
||||
s.serial(_CustomLootTableId);
|
||||
|
|
|
@ -175,6 +175,42 @@
|
|||
#include "nel/misc/hierarchical_timer.h"
|
||||
inline uint32 saveGameCycleToSecond(NLMISC::TGameCycle tick)
|
||||
{
|
||||
// Evaluate the UTC of this event (with the current date of save). Suppose that 1 second==10 tick
|
||||
// NB: result should be positive since no event should have been launched before 1970!
|
||||
if (tick < CTickEventHandler::getGameCycle())
|
||||
{
|
||||
NLMISC::TGameCycle tick_dt = CTickEventHandler::getGameCycle() - tick;
|
||||
uint32 s_dt = tick_dt / 10;
|
||||
return NLMISC::CTime::getSecondsSince1970() - s_dt;
|
||||
}
|
||||
else
|
||||
{
|
||||
NLMISC::TGameCycle tick_dt = tick - CTickEventHandler::getGameCycle();
|
||||
uint32 s_dt = tick_dt / 10;
|
||||
return NLMISC::CTime::getSecondsSince1970() + s_dt;
|
||||
}
|
||||
}
|
||||
inline NLMISC::TGameCycle loadSecondToGameCycle(uint32 second)
|
||||
{
|
||||
if (second < NLMISC::CTime::getSecondsSince1970())
|
||||
{
|
||||
uint32 s_dt = NLMISC::CTime::getSecondsSince1970() - second;
|
||||
NLMISC::TGameCycle tick_dt = s_dt * 10;
|
||||
return CTickEventHandler::getGameCycle() - tick_dt;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 s_dt = second - NLMISC::CTime::getSecondsSince1970();
|
||||
NLMISC::TGameCycle tick_dt = s_dt * 10;
|
||||
return CTickEventHandler::getGameCycle() + tick_dt;
|
||||
}
|
||||
}
|
||||
|
||||
/*inline uint32 saveGameCycleToSecond(NLMISC::TGameCycle tick)
|
||||
{
|
||||
sint32 dt = CTickEventHandler::getGameCycle() - tick;
|
||||
|
||||
|
||||
// Evaluate the UTC of this event (with the current date of save). Suppose that 1 second==10 tick
|
||||
if (tick < CTickEventHandler::getGameCycle())
|
||||
return NLMISC::CTime::getSecondsSince1970();
|
||||
|
@ -190,7 +226,7 @@ inline NLMISC::TGameCycle loadSecondToGameCycle(uint32 second)
|
|||
|
||||
// Convert UTC of the event to game cycle. Suppose that 1 second==10 tick
|
||||
return CTickEventHandler::getGameCycle() + (second - NLMISC::CTime::getSecondsSince1970())*10;
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
|
||||
// GameCycle property (saved as a UTC of the current game cycle, support server migration)
|
||||
|
|
|
@ -51,4 +51,4 @@ std::map<std::string, CSPType::TSPType> CSPType::_ValueMap;
|
|||
// End of static implementation of CSPType
|
||||
|
||||
|
||||
} // End of EGSPD
|
||||
} // End of EGSPD
|
||||
|
|
Loading…
Reference in a new issue