From f7e557ab71597ed4ee662c4c209d2b24b6180e9e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 26 May 2018 13:09:46 -0400 Subject: [PATCH] Core: Misc fixes --- Source/Framework/Networking/NetworkThread.cs | 6 ++++++ Source/Framework/Networking/SocketManager.cs | 6 +++--- Source/Game/Entities/AreaTrigger/AreaTrigger.cs | 2 +- Source/Game/Entities/Player/Player.Spells.cs | 3 +-- Source/WorldServer/WorldServer.conf.dist | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Source/Framework/Networking/NetworkThread.cs b/Source/Framework/Networking/NetworkThread.cs index 7d07c8191..84753b508 100644 --- a/Source/Framework/Networking/NetworkThread.cs +++ b/Source/Framework/Networking/NetworkThread.cs @@ -38,6 +38,12 @@ namespace Framework.Networking return true; } + public void Wait() + { + _thread.Join(); + _thread = null; + } + public int GetConnectionCount() { return _connections; diff --git a/Source/Framework/Networking/SocketManager.cs b/Source/Framework/Networking/SocketManager.cs index 3b4bbe1b0..12f2b5c28 100644 --- a/Source/Framework/Networking/SocketManager.cs +++ b/Source/Framework/Networking/SocketManager.cs @@ -65,9 +65,9 @@ namespace Framework.Networking void Wait() { - //if (_threadCount != 0) - //for (int i = 0; i < _threadCount; ++i) - //_threads[i].Wait(); + if (_threadCount != 0) + for (int i = 0; i < _threadCount; ++i) + _threads[i].Wait(); } public virtual void OnSocketOpen(Socket sock) diff --git a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs index 8ed856d63..323ee72e5 100644 --- a/Source/Game/Entities/AreaTrigger/AreaTrigger.cs +++ b/Source/Game/Entities/AreaTrigger/AreaTrigger.cs @@ -94,7 +94,7 @@ namespace Game.Entities Relocate(pos); if (!IsPositionValid()) { - Log.outError(LogFilter.AreaTrigger, "AreaTrigger (spell {0}) not created. Invalid coordinates (X: {0} Y: {1})", spell.Id, GetPositionX(), GetPositionY()); + Log.outError(LogFilter.AreaTrigger, $"AreaTrigger (spell {spell.Id}) not created. Invalid coordinates (X: {GetPositionX()} Y: {GetPositionY()})"); return false; } diff --git a/Source/Game/Entities/Player/Player.Spells.cs b/Source/Game/Entities/Player/Player.Spells.cs index 9e377028b..3afe5c43d 100644 --- a/Source/Game/Entities/Player/Player.Spells.cs +++ b/Source/Game/Entities/Player/Player.Spells.cs @@ -321,7 +321,7 @@ namespace Game.Entities { SpellInfo newInfo = Global.SpellMgr.GetSpellInfo(spellId); if (newInfo != null) - return base.GetCastSpellInfo(newInfo); + return GetCastSpellInfo(newInfo); } } @@ -2612,7 +2612,6 @@ namespace Game.Entities } } - // "the bodies of template functions must be made available in a header file" public void ApplySpellMod(uint spellId, SpellModOp op, ref T basevalue, Spell spell = null) { SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId); diff --git a/Source/WorldServer/WorldServer.conf.dist b/Source/WorldServer/WorldServer.conf.dist index 081859bb9..7aaefb90f 100644 --- a/Source/WorldServer/WorldServer.conf.dist +++ b/Source/WorldServer/WorldServer.conf.dist @@ -464,7 +464,7 @@ MaxCoreStuckTime = 0 AddonChannel = 1 # -# MapUpdate.Threads (NYI) +# MapUpdate.Threads # Description: Number of threads to update maps. # Default: 1