diff --git a/Assets/PerfectWorld/Scripts/Common/DataProcess/ElementDataManProvider.cs b/Assets/PerfectWorld/Scripts/Common/DataProcess/ElementDataManProvider.cs index f40ab55507..e8d5a6ab5b 100644 --- a/Assets/PerfectWorld/Scripts/Common/DataProcess/ElementDataManProvider.cs +++ b/Assets/PerfectWorld/Scripts/Common/DataProcess/ElementDataManProvider.cs @@ -25,7 +25,7 @@ namespace BrewMonster } catch (Exception ex) { - Logger.LogError($"ElementDataManProvider: Failed to load element data: {ex} - {ex.StackTrace}"); + BMLogger.LogError($"ElementDataManProvider: Failed to load element data: {ex} - {ex.StackTrace}"); } } diff --git a/Assets/PerfectWorld/Scripts/Common/DataProcess/elementdataman.cs b/Assets/PerfectWorld/Scripts/Common/DataProcess/elementdataman.cs index 6939e25d96..1a039ea41e 100644 --- a/Assets/PerfectWorld/Scripts/Common/DataProcess/elementdataman.cs +++ b/Assets/PerfectWorld/Scripts/Common/DataProcess/elementdataman.cs @@ -300,7 +300,7 @@ namespace ModelRenderer.Scripts.GameData if (version != 805306495) { - Logger.LogError("ERROR:: File version mismatch"); + BMLogger.LogError("ERROR:: File version mismatch"); return -1; } diff --git a/Assets/PerfectWorld/Scripts/Common/Logger.cs b/Assets/PerfectWorld/Scripts/Common/Logger.cs index 593174c789..e3c64e92b4 100644 --- a/Assets/PerfectWorld/Scripts/Common/Logger.cs +++ b/Assets/PerfectWorld/Scripts/Common/Logger.cs @@ -4,7 +4,7 @@ using UnityEngine; namespace BrewMonster { - public class Logger + public class BMLogger { public static void Log(string message) { diff --git a/Assets/PerfectWorld/Scripts/Common/MonoSingleton.cs b/Assets/PerfectWorld/Scripts/Common/MonoSingleton.cs index 7b7721b7dc..ed75f8764b 100644 --- a/Assets/PerfectWorld/Scripts/Common/MonoSingleton.cs +++ b/Assets/PerfectWorld/Scripts/Common/MonoSingleton.cs @@ -26,7 +26,7 @@ namespace BrewMonster protected virtual void Awake() { _instance = this as T; - BrewMonster.Logger.Log("HoangDev : " + gameObject.name); + BrewMonster.BMLogger.Log("HoangDev : " + gameObject.name); Initialize(); } diff --git a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs index 6451a0935a..a726bcea27 100644 --- a/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/UnityGameSession.cs @@ -49,7 +49,7 @@ namespace BrewMonster.Network /// Set the connection info. This MUST be called call before login public static void SetConnectionInfo(string ip, int port) { - Logger.Log($"Set connection info {ip} {port}"); + BMLogger.Log($"Set connection info {ip} {port}"); Instance._ip = ip; Instance._port = port; } @@ -61,7 +61,7 @@ namespace BrewMonster.Network if (Instance._ip == "" || Instance._port == 0) { - Logger.LogError($"IP or port is not set {Instance._ip} {Instance._port}"); + BMLogger.LogError($"IP or port is not set {Instance._ip} {Instance._port}"); onLoginComplete?.Invoke(false); return; } @@ -70,7 +70,7 @@ namespace BrewMonster.Network if (!Instance._gameSession.IsConnected) { - Logger.LogError($"Failed to connect to {Instance._ip} {Instance._port}"); + BMLogger.LogError($"Failed to connect to {Instance._ip} {Instance._port}"); onLoginComplete?.Invoke(false); return; } @@ -103,7 +103,7 @@ namespace BrewMonster.Network { if (!Instance._isInitialized) { - Logger.LogError("GameSession is not initialized"); + BMLogger.LogError("GameSession is not initialized"); return; } await Instance._gameSession.ConnectAsync(ip, port); diff --git a/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs b/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs index f157af806a..43a07b88b9 100644 --- a/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs +++ b/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs @@ -140,7 +140,7 @@ namespace PerfectWorld.Scripts.Player public void MoveTo(cmd_object_move Cmd) { - BrewMonster.Logger.Log("HoangDev : MoveToMoveTo"); + BrewMonster.BMLogger.Log("HoangDev : MoveToMoveTo"); if (Cmd.use_time == 0) return; @@ -153,7 +153,7 @@ namespace PerfectWorld.Scripts.Player // to that position. if (fDist >= MAX_LAGDIST) { - BrewMonster.Logger.Log("HoangDev : fDist >= MAX_LAGDIST"); + BrewMonster.BMLogger.Log("HoangDev : fDist >= MAX_LAGDIST"); SetPos(Cmd.dest); //m_pEPWorkMan->FinishWork(CECEPWork::WORK_MOVE); return; @@ -236,14 +236,14 @@ namespace PerfectWorld.Scripts.Player float fMoveDelta = A3d_Magnitude(vPos - vCurPos); if (Math.Abs(fMoveDelta - 0f) <= float.Epsilon || fMoveDelta >= fDist) //!fMoveDelta <=> (Math.Abs(fMoveDelta - 0f) <= float.Epsilon) Compare with 0 { - BrewMonster.Logger.Log($"HoangDev : SetPosServer({m_vServerPos}) 1;"); + BrewMonster.BMLogger.Log($"HoangDev : SetPosServer({m_vServerPos}) 1;"); SetPos(m_vServerPos); PlayAction(GetMoveStandAction(false), true, 1, false); bRet = true; } else { - BrewMonster.Logger.Log($"HoangDev : SetPos({vPos}) 1;"); + BrewMonster.BMLogger.Log($"HoangDev : SetPos({vPos}) 1;"); SetPos(vPos); } } @@ -267,11 +267,11 @@ namespace PerfectWorld.Scripts.Player ); vPos = MoveStep(vDir, m_fMoveSpeed, fDeltaTime); SetPos(vPos); - BrewMonster.Logger.Log("HoangDev : SetPos(vPos) 1;"); + BrewMonster.BMLogger.Log("HoangDev : SetPos(vPos) 1;"); float fDist = A3d_Magnitude(m_vServerPos - vCurPos); if (fDist >= MAX_LAGDIST) { - BrewMonster.Logger.Log("HoangDev : SetPos(m_vServerPos) 2;"); + BrewMonster.BMLogger.Log("HoangDev : SetPos(m_vServerPos) 2;"); SetPos(m_vServerPos); return true; } @@ -291,7 +291,7 @@ namespace PerfectWorld.Scripts.Player SetServerPos(Cmd.dest); float fDist = m_vMoveDir.Normalize(); - BrewMonster.Logger.Log($"HoangDev : {fDist} : {MAX_LAGDIST} || {m_fMoveSpeed}"); + BrewMonster.BMLogger.Log($"HoangDev : {fDist} : {MAX_LAGDIST} || {m_fMoveSpeed}"); if (fDist >= MAX_LAGDIST || m_fMoveSpeed < 0.01f) { @@ -415,7 +415,7 @@ namespace PerfectWorld.Scripts.Player // Set server position public void SetServerPos(A3DVECTOR3 vPos) { - BrewMonster.Logger.Log("SetServerPos "); + BrewMonster.BMLogger.Log("SetServerPos "); m_vServerPos = vPos; // If this player is a mule, change it's rider's server pos too. if (m_iBuddyId != 0 && !m_bHangerOn) diff --git a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs index c0ff032792..65fa6b99a2 100644 --- a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs +++ b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs @@ -57,7 +57,7 @@ namespace BrewMonster.UI public async void OnLoginButtonClicked() { - Logger.Log("OnLoginButtonClicked"); + BMLogger.Log("OnLoginButtonClicked"); string username = _usernameInputField.text; string password = _passwordInputField.text; UnityGameSession.SetConnectionInfo("103.182.22.52", 29000); @@ -72,7 +72,7 @@ namespace BrewMonster.UI { if (!result) { - Logger.LogError("Login failed"); + BMLogger.LogError("Login failed"); return; } UnityGameSession.GetRoleListAsync(OnGetRoleListComplete); @@ -84,14 +84,14 @@ namespace BrewMonster.UI /// private void OnGetRoleListComplete(List roleInfos) { - Logger.Log($"OnGetRoleListComplete {roleInfos.Count}"); + BMLogger.Log($"OnGetRoleListComplete {roleInfos.Count}"); _roleInfos = roleInfos; } private void OnClickSelectCharacter(RoleInfo roleInfo) { - Logger.Log($"OnClickSelectCharacter {roleInfo.name}"); + BMLogger.Log($"OnClickSelectCharacter {roleInfo.name}"); UnityGameSession.SelectRoleAsync(roleInfo, OnSelectRoleComplete); } @@ -131,7 +131,7 @@ namespace BrewMonster.UI { await Task.Delay(2000); // Request all known packages: 0=Inventory,1=Equipment,2=Task - UnityGameSession.RequestAllInventoriesAsync(() => { Logger.Log("Sent Inventory Detail Requests (all packs)"); }, 0, 1, 2); + UnityGameSession.RequestAllInventoriesAsync(() => { BMLogger.Log("Sent Inventory Detail Requests (all packs)"); }, 0, 1, 2); await Task.Delay(2000); UnityGameSession.c2s_CmdGetAllData(true, true, false);