Core/Players: Store player creation timestamp and type (normal/npe)

Port From (https://github.com/TrinityCore/TrinityCore/commit/11762273c68b24b332238aa89a73b9ed9ac1d249)
This commit is contained in:
hondacrx
2021-10-02 20:50:59 -04:00
parent 9785c8cb0e
commit 4a97883559
7 changed files with 36 additions and 4 deletions
+6
View File
@@ -2551,6 +2551,8 @@ namespace Game.Entities
uint mapId = result.Read<ushort>(fieldIndex++);
float orientation = result.Read<float>(fieldIndex++);
string taximask = result.Read<string>(fieldIndex++);
long createTime = result.Read<long>(fieldIndex++);
PlayerCreateMode createMode = (PlayerCreateMode)result.Read<byte>(fieldIndex++);
byte cinematic = result.Read<byte>(fieldIndex++);
uint totaltime = result.Read<uint>(fieldIndex++);
uint leveltime = result.Read<uint>(fieldIndex++);
@@ -3030,6 +3032,8 @@ namespace Game.Entities
SetDrunkValue(newDrunkValue);
m_createTime = createTime;
m_createMode = createMode;
m_cinematic = cinematic;
m_PlayedTimeTotal = totaltime;
m_PlayedTimeLevel = leveltime;
@@ -3385,6 +3389,8 @@ namespace Game.Entities
ss.Append(m_taxi.m_taximask[i] + " ");
stmt.AddValue(index++, ss.ToString());
stmt.AddValue(index++, m_createTime);
stmt.AddValue(index++, (byte)m_createMode);
stmt.AddValue(index++, m_cinematic);
stmt.AddValue(index++, m_PlayedTimeTotal);
stmt.AddValue(index++, m_PlayedTimeLevel);
@@ -196,6 +196,9 @@ namespace Game.Entities
public PlayerData m_playerData;
public ActivePlayerData m_activePlayerData;
long m_createTime;
PlayerCreateMode m_createMode;
uint m_nextSave;
byte m_cinematic;
+1
View File
@@ -194,6 +194,7 @@ namespace Game.Entities
}
SetMap(Global.MapMgr.CreateMap(info.MapId, this));
m_createTime = GameTime.GetGameTime();
UpdatePositionData();
PowerType powertype = cEntry.DisplayPower;