Core/logs: added xp info on login & logout
Port From (https://github.com/TrinityCore/TrinityCore/commit/bb24c6a11b2410f6dd4ef34f2b7fb87e4b01ba37)
This commit is contained in:
@@ -6363,6 +6363,9 @@ namespace Game.Entities
|
|||||||
SendMovementSetCollisionHeight(scale * GetCollisionHeight(IsMounted()));
|
SendMovementSetCollisionHeight(scale * GetCollisionHeight(IsMounted()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint GetXP() { return m_activePlayerData.XP; }
|
||||||
|
public uint GetXPForNextLevel() { return m_activePlayerData.NextLevelXP; }
|
||||||
|
|
||||||
public void SetXP(uint xp)
|
public void SetXP(uint xp)
|
||||||
{
|
{
|
||||||
SetUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.XP), xp);
|
SetUpdateFieldValue(m_values.ModifyValue(m_activePlayerData).ModifyValue(m_activePlayerData.XP), xp);
|
||||||
|
|||||||
@@ -1019,8 +1019,7 @@ namespace Game
|
|||||||
SendNotification(CypherStrings.GmOn);
|
SendNotification(CypherStrings.GmOn);
|
||||||
|
|
||||||
string IP_str = GetRemoteAddress();
|
string IP_str = GetRemoteAddress();
|
||||||
Log.outDebug(LogFilter.Network, "Account: {0} (IP: {1}) Login Character:[{2}] ({3}) Level: {4}",
|
Log.outDebug(LogFilter.Network, $"Account: {GetAccountId()} (IP: {GetRemoteAddress()}) Login Character: [{pCurrChar.GetName()}] ({pCurrChar.GetGUID()}) Level: {pCurrChar.GetLevel()}, XP: { _player.GetXP()}/{_player.GetXPForNextLevel()} ({_player.GetXPForNextLevel() - _player.GetXP()} left)");
|
||||||
GetAccountId(), IP_str, pCurrChar.GetName(), pCurrChar.GetGUID().ToString(), pCurrChar.GetLevel());
|
|
||||||
|
|
||||||
if (!pCurrChar.IsStandState() && !pCurrChar.HasUnitState(UnitState.Stunned))
|
if (!pCurrChar.IsStandState() && !pCurrChar.HasUnitState(UnitState.Stunned))
|
||||||
pCurrChar.SetStandState(UnitStandStateType.Stand);
|
pCurrChar.SetStandState(UnitStandStateType.Stand);
|
||||||
|
|||||||
@@ -202,8 +202,7 @@ namespace Game
|
|||||||
// e.g if he got disconnected during a transfer to another map
|
// e.g if he got disconnected during a transfer to another map
|
||||||
// calls to GetMap in this case may cause crashes
|
// calls to GetMap in this case may cause crashes
|
||||||
GetPlayer().CleanupsBeforeDelete();
|
GetPlayer().CleanupsBeforeDelete();
|
||||||
Log.outInfo(LogFilter.Player, "Account: {0} (IP: {1}) Logout Character:[{2}] (GUID: {3}) Level: {4}",
|
Log.outInfo(LogFilter.Player, $"Account: {GetAccountId()} (IP: {GetRemoteAddress()}) Logout Character:[{_player.GetName()}] ({_player.GetGUID()}) Level: {_player.GetLevel()}, XP: {_player.GetXP()}/{_player.GetXPForNextLevel()} ({_player.GetXPForNextLevel() - _player.GetXP()} left)");
|
||||||
GetAccountId(), GetRemoteAddress(), _player.GetName(), _player.GetGUID().ToString(), _player.GetLevel());
|
|
||||||
|
|
||||||
Map map = GetPlayer().GetMap();
|
Map map = GetPlayer().GetMap();
|
||||||
if (map != null)
|
if (map != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user