FileTarget.cs remove file limit; added HasFollower to QuestProgress.cs
This commit is contained in:
parent
6325e82502
commit
1118d8a785
@ -125,9 +125,9 @@ public class AnsiTarget : LogTarget
|
|||||||
{
|
{
|
||||||
Logger.Level.RenameAccountLog => new Style(Color.DarkSlateGray3),//
|
Logger.Level.RenameAccountLog => new Style(Color.DarkSlateGray3),//
|
||||||
Logger.Level.ChatMessage => new Style(Color.DarkSlateGray2),//
|
Logger.Level.ChatMessage => new Style(Color.DarkSlateGray2),//
|
||||||
Logger.Level.Debug => new Style(Color.Purple4),//
|
Logger.Level.Debug => new Style(Color.Olive),//
|
||||||
Logger.Level.MethodTrace => new Style(Color.Purple4_1),//
|
Logger.Level.MethodTrace => new Style(Color.Purple),//
|
||||||
Logger.Level.Trace => new Style(Color.Purple),//
|
Logger.Level.Trace => new Style(Color.BlueViolet),//
|
||||||
Logger.Level.Info => new Style(Color.White),
|
Logger.Level.Info => new Style(Color.White),
|
||||||
Logger.Level.Success => new Style(Color.Green3_1),
|
Logger.Level.Success => new Style(Color.Green3_1),
|
||||||
Logger.Level.Warn => new Style(Color.Yellow),//
|
Logger.Level.Warn => new Style(Color.Yellow),//
|
||||||
|
|||||||
@ -99,14 +99,8 @@ namespace DiIiS_NA.Core.Logging
|
|||||||
var timeStamp = this.IncludeTimeStamps ? "[" + DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss.fff") + "] " : "";
|
var timeStamp = this.IncludeTimeStamps ? "[" + DateTime.Now.ToString("dd.MM.yyyy HH:mm:ss.fff") + "] " : "";
|
||||||
if (!this._disposed) // make sure we're not disposed.
|
if (!this._disposed) // make sure we're not disposed.
|
||||||
{
|
{
|
||||||
if (this._fileStream.Length >= 20971520) //20 MB limit
|
this._logStream.WriteLine(
|
||||||
{
|
$"{timeStamp}[{level.ToString(),5}] [{logger}]: {message} - [Exception] {exception}");
|
||||||
System.IO.File.Move(this._filePath, string.Format("{0}.{1}", this._filePath, this._fileIndex));
|
|
||||||
this._fileIndex++;
|
|
||||||
this._fileStream = new FileStream(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read); // init the file stream.
|
|
||||||
this._logStream = new StreamWriter(this._fileStream) { AutoFlush = true }; // init the stream writer.
|
|
||||||
}
|
|
||||||
this._logStream.WriteLine(string.Format("{0}[{1}] [{2}]: {3} - [Exception] {4}", timeStamp, level.ToString().PadLeft(5), logger, message, exception));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -285,6 +285,11 @@ namespace DiIiS_NA.GameServer.GSSystem.QuestSystem
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasFollower(ActorSno sno)
|
||||||
|
{
|
||||||
|
return Game.Players.Values.First().Followers.Any(x => x.Value == sno);
|
||||||
|
}
|
||||||
|
|
||||||
public void AddFollower(World world, ActorSno sno)
|
public void AddFollower(World world, ActorSno sno)
|
||||||
{
|
{
|
||||||
if (Game.Players.Count > 0)
|
if (Game.Players.Count > 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
user.block.title