Skip to content

Commit

Permalink
Merge pull request #5 from SCHREDDO/releases/1.0.0
Browse files Browse the repository at this point in the history
Releases/1.0.0
  • Loading branch information
SCHREDDO authored Mar 26, 2019
2 parents c63ffa5 + 2044ed3 commit 432a2ce
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
## = 1.0.0 March 26th 2019 =
### Added
- add language support for english
- new settings (path: settings) command: languarge
- new damage (path: dmg) command: reset
- new damage (path: dmg) command: delete
## = 0.5.0-alpha March 25th 2019 =
### Added
- new base setting: check_chatlog_active
Expand Down
16 changes: 16 additions & 0 deletions COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
|[help](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-help)|shows commands and paths||
|[bye](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-bye)|close NerdyAion||
|[create](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-create)|create a dmg chatlog pointer|dmg|
|[reset](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-reset)|reset the dmg chatlog pointer x|dmg|
|[delete](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-delete)|delete the dmg chatlog pointer x|dmg|
|[show](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-show)|shows dmg informations from pointer x|dmg|
|[copy](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-copy)|copy dmg informations from pointer x|dmg|
|[show](https://github.com/SCHREDDO/NerdyAion-Aion-Tool-Manager/blob/master/COMMANDS.md#command-show)|list of settings|settings|
Expand Down Expand Up @@ -67,6 +69,20 @@ create <pointer name>
```
Arguments:
- `pointer name` the pointer name
## Command "reset"
Reset the pointer `<pointer name>`.
```console
reset <pointer name>
```
Arguments:
- `pointer name` the pointer name
## Command "delete"
Delete the pointer `<pointer name>`.
```console
delete <pointer name>
```
Arguments:
- `pointer name` the pointer name
## Command "list"
Shows all pointer.
```console
Expand Down
42 changes: 38 additions & 4 deletions NerdyAion/NerdyAion/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// Created By: Sebastian Lühnen
// Created On: 19.02.2019
// Last Edited On: 25.02.2019
// Last Edited On: 26.02.2019
// Language: C#
//
using System;
Expand Down Expand Up @@ -200,14 +200,48 @@ private static void DmgCommands(String[] command, String usedCommand)
{
if (!Analyzer.ContainsKey(command[1]))
{
Analyzer.Add(command[1], new LogAnalyzer(Settings.GetSetting("aion") + @"\Chat.log"));
Analyzer.Add(command[1], new LogAnalyzer(Settings.GetSetting("aion") + @"\Chat.log", Settings.GetSetting("languarge")));
}
else
{
Commands.ShowError("pointer \"" + command[1] + "\" already exists");
}
}
break;
case "reset":
if (command.Length < 2)
{
Commands.ShowError("unknown command \"" + usedCommand + "\"");
}
else
{
if (Analyzer.ContainsKey(command[1]))
{
Analyzer[command[1]] = new LogAnalyzer(Settings.GetSetting("aion") + @"\Chat.log", Settings.GetSetting("languarge"));
}
else
{
Commands.ShowError("pointer \"" + command[1] + "\" don't exists");
}
}
break;
case "delete":
if (command.Length < 2)
{
Commands.ShowError("unknown command \"" + usedCommand + "\"");
}
else
{
if (Analyzer.ContainsKey(command[1]))
{
Analyzer.Remove(command[1]);
}
else
{
Commands.ShowError("pointer \"" + command[1] + "\" don't exists");
}
}
break;
case "list":
Console.WriteLine("=== POINTER LIST ===");
foreach (KeyValuePair<String, LogAnalyzer> item in Analyzer)
Expand Down Expand Up @@ -235,7 +269,7 @@ private static void DmgCommands(String[] command, String usedCommand)
{
if (!item.Key.Equals(""))
{
if (item.Key == "ihr" || item.Key == "Ihr")
if (item.Key == "ihr" || item.Key == "Ihr" || item.Key == "you" || item.Key == "You")
{
player = Settings.GetSetting("player");
}
Expand Down Expand Up @@ -273,7 +307,7 @@ private static void DmgCommands(String[] command, String usedCommand)
{
if (!item.Key.Equals(""))
{
if (item.Key == "ihr" || item.Key == "Ihr")
if (item.Key == "ihr" || item.Key == "Ihr" || item.Key == "you" || item.Key == "You")
{
player = Settings.GetSetting("player");
}
Expand Down
153 changes: 149 additions & 4 deletions NerdyAion/NerdyAion/LogAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// Created By: Sebastian Lühnen
// Created On: 19.02.2019
// Last Edited On: 24.03.2019
// Last Edited On: 26.03.2019
// Language: C#
//
using System;
Expand Down Expand Up @@ -61,14 +61,14 @@ public Dictionary<String, String> SkillList
set { skillList = value; }
}

public LogAnalyzer(String logFilePath)
public LogAnalyzer(String logFilePath, String languarge = "DE")
{
Log = new LogReader(logFilePath);
AnalysisTemplates = new List<AnalysisTemplate>();
PlayerList = new Dictionary<string, Player>();
SkillList = new Dictionary<string, string>();

SetAnalysisTemplates();
SetAnalysisTemplates(languarge);
}

public void AnalyzeLog()
Expand Down Expand Up @@ -206,7 +206,22 @@ private String ByteArrayToString(byte[] data)
return text;
}

private void SetAnalysisTemplates()
private void SetAnalysisTemplates(String languarge)
{
switch (languarge)
{
case "DE":
AnalysisTemplatesDE();
break;
case "EN":
AnalysisTemplatesEN();
break;
default:
break;
}
}

private void AnalysisTemplatesDE()
{
AnalysisTemplate temp = null;

Expand Down Expand Up @@ -398,5 +413,135 @@ private void SetAnalysisTemplates()

AnalysisTemplates.Add(temp);
}

private void AnalysisTemplatesEN()
{
AnalysisTemplate temp = null;

//2019.03.26 18:01:35 : You received 113 damage from Poisonous Piton.
temp = new AnalysisTemplate();
temp.DamageEvent = true;
temp.DamageOverTime = false;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* received .* damage from .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventTarget>[^,]+) received (?<eventEffect>[^,]+) damage from (?<eventSource>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventTarget");
temp.AddVariable("eventEffect");
temp.AddVariable("eventSource");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:36 : You inflicted 0 damage on Flaming Piton and dispelled some of their magical buffs and debuffs by using Magic Explosion.
temp = new AnalysisTemplate();
temp.DamageEvent = true;
temp.DamageOverTime = false;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* inflicted .* damage on .* and .* by using .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventSource>[^,]+) inflicted (?<eventEffect>[^,]+) damage on (?<eventTarget>[^,]+) and (?<eventEffectExtra>[^,]+) by using (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventSource");
temp.AddVariable("eventEffect");
temp.AddVariable("eventTarget");
temp.AddVariable("eventEffectExtra");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:37 : Flaming Piton has inflicted 2.207 damage on you by using Destructive Strike.
temp = new AnalysisTemplate();
temp.DamageEvent = true;
temp.DamageOverTime = false;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* has inflicted .* damage on .* by using .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventSource>[^,]+) has inflicted (?<eventEffect>[^,]+) damage on (?<eventTarget>[^,]+) by using (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventSource");
temp.AddVariable("eventEffect");
temp.AddVariable("eventTarget");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:45 : You inflicted 26.150 damage on Flaming Piton by using Cyclone of Wrath.
temp = new AnalysisTemplate();
temp.DamageEvent = true;
temp.DamageOverTime = false;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* inflicted .* damage on .* by using .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventSource>[^,]+) inflicted (?<eventEffect>[^,]+) damage on (?<eventTarget>[^,]+) by using (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventSource");
temp.AddVariable("eventEffect");
temp.AddVariable("eventTarget");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:46 : Flaming Piton received 9.282 damage due to the effect of Erosion.
temp = new AnalysisTemplate();
temp.DamageEvent = true;
temp.DamageOverTime = true;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* received .* damage due to the effect of .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventTarget>[^,]+) received (?<eventEffect>[^,]+) damage due to the effect of (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventTarget");
temp.AddVariable("eventEffect");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:39 : You inflicted continuous damage on Flaming Piton by using Erosion.
temp = new AnalysisTemplate();
temp.DamageEvent = false;
temp.DamageOverTime = true;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* inflicted continuous damage on .* by using .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventSource>[^,]+) inflicted continuous damage on (?<eventTarget>[^,]+) by using (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventSource");
temp.AddVariable("eventTarget");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:54 : Vrajitoarea-Nerga used Flame Cage to inflict the continuous damage effect on Poisonous Piton.
temp = new AnalysisTemplate();
temp.DamageEvent = false;
temp.DamageOverTime = true;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* used .* to inflict the continuous damage effect on .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventSource>[^,]+) used (?<eventName>[^,]+) to inflict the continuous damage effect on (?<eventTarget>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventSource");
temp.AddVariable("eventName");
temp.AddVariable("eventTarget");

AnalysisTemplates.Add(temp);

//2019.03.26 18:01:54 : Exam Scarecrow received the Delayed Blast effect as you used Big Magma Eruption.
temp = new AnalysisTemplate();
temp.DamageEvent = false;
temp.DamageOverTime = true;
temp.CriticalHit = false;
temp.Strucktor = ".* : .* received the .* effect as .* used .*.";
temp.Template = @"(?<time>[^,]+) : (?<eventTarget>[^,]+) received the (?<event>[^,]+) effect as (?<eventSource>[^,]+) used (?<eventName>[^,]+).";
temp.CriticalIdentifier = "Critical Strike!";
temp.AddVariable("time");
temp.AddVariable("eventTarget");
temp.AddVariable("event");
temp.AddVariable("eventSource");
temp.AddVariable("eventName");

AnalysisTemplates.Add(temp);
}
}
}
2 changes: 1 addition & 1 deletion NerdyAion/NerdyAion/NerdyAion.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<MapFileExtensions>true</MapFileExtensions>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>0.5.0.0</ApplicationVersion>
<ApplicationVersion>1.0.0.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down
10 changes: 6 additions & 4 deletions NerdyAion/NerdyAion/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// Created By: Sebastian Lühnen
// Created On: 19.02.2019
// Last Edited On: 25.03.2019
// Last Edited On: 26.03.2019
// Language: C#
//
using System;
Expand All @@ -44,20 +44,22 @@ static void Main(string[] args)
if (!Commands.Settings.LoudSettings())
{
Commands.Settings.CreateSettingsFile();
Commands.Settings.AddSetting("version", "0.5.0-alpha", true, null);
Commands.Settings.AddSetting("version", "1.0.0", true, null);
Commands.Settings.AddSetting("aion", @"C:\Program Files\Gameforge\AION Free-To-Play");
Commands.Settings.AddSetting("player", "ich");
Commands.Settings.AddSetting("chatlog_active", "0");
Commands.Settings.AddSetting("languarge", "DE");
Commands.Settings.SaveSettings();
}
else
{
if (Commands.Settings.GetSetting("version") != "0.5.0-alpha")
if (Commands.Settings.GetSetting("version") != "1.0.0")
{
SettingsController temp = new SettingsController(System.AppDomain.CurrentDomain.BaseDirectory + @"\settings.txt", false);
temp.AddSetting("version", "0.5.0-alpha", true, null);
temp.AddSetting("version", "1.0.0", true, null);
temp.AddSetting("aion", @"C:\Program Files\Gameforge\AION Free-To-Play");
temp.AddSetting("check_chatlog_active", "0");
temp.AddSetting("languarge", "DE");

foreach (Setting item in Commands.Settings.GetAllSettings())
{
Expand Down
4 changes: 2 additions & 2 deletions NerdyAion/NerdyAion/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.5.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit 432a2ce

Please sign in to comment.