Skip to content
Browse files

Add folder, fix started project in VS2010

  • Loading branch information...
1 parent 4a21e65 commit 6999252af4a916d97e81eadabbdaf21b4091e76d @Konctantin Konctantin committed May 11, 2010
View
0 SpellWork/DBC.cs → SpellWork/DBC/DBC.cs
File renamed without changes.
View
3 SpellWork/DBCReader.cs → SpellWork/DBC/DBCReader.cs
@@ -3,6 +3,7 @@
using System.IO;
using System.Collections.Generic;
using System.Runtime.InteropServices;
+using System.Reflection;
namespace SpellWork
{
@@ -22,7 +23,7 @@ static class DBCReader
if (!header.IsDBC)
throw new SpellWorkException("{0} is not DBC files", fileName);
if (header.RecordSize != size)
- throw new SpellWorkException("Size of row in DBC file ({0}) != size of DBC struct ({1}) in DBC: {3}", header.RecordSize, size, fileName);
+ throw new SpellWorkException("Size of row in DBC file ({0}) != size of DBC struct ({1}) in DBC: {2}", header.RecordSize, size, fileName);
// read dbc data
for (int r = 0; r < header.RecordsCount; ++r)
View
8 SpellWork/Structure.cs → SpellWork/DBC/Structure.cs
@@ -294,11 +294,11 @@ public string Range
if (RangeIndex == 0 || !DBC.SpellRange.ContainsKey(RangeIndex))
return String.Empty;
- var q = DBC.SpellRange[RangeIndex];
+ var range = DBC.SpellRange[RangeIndex];
StringBuilder sb = new StringBuilder();
- sb.AppendFormatLine("SpellRange: (Id {0}) \"{1}\":", q.ID, q.Description1);
- sb.AppendFormatLine(" MinRange = {0}, MinRangeFriendly = {1}", q.MinRange, q.MinRangeFriendly);
- sb.AppendFormatLine(" MaxRange = {0}, MaxRangeFriendly = {1}", q.MaxRange, q.MaxRangeFriendly);
+ sb.AppendFormatLine("SpellRange: (Id {0}) \"{1}\":", range.ID, range.Description1);
+ sb.AppendFormatLine(" MinRange = {0}, MinRangeFriendly = {1}", range.MinRange, range.MinRangeFriendly);
+ sb.AppendFormatLine(" MaxRange = {0}, MaxRangeFriendly = {1}", range.MaxRange, range.MaxRangeFriendly);
return sb.ToString();
}
View
0 SpellWork/MySQLConnenct.cs → SpellWork/DataBase/MySQLConnenct.cs
File renamed without changes.
View
2 SpellWork/Extensions.cs → SpellWork/Extensions/Extensions.cs
@@ -321,7 +321,7 @@ public static void SetFlags(this CheckedListBox _clb, Type type, String remove)
{
dt.Rows.Add(new object[]
{
- str,
+ str.Name,
String.Format("({0:000}) {1}", i, str.Name)
});
i++;
View
0 SpellWork/RichTextBoxExtensions.cs → ...lWork/Extensions/RichTextBoxExtensions.cs
File renamed without changes.
View
6 SpellWork/SpellWorkException.cs → SpellWork/Extensions/SpellWorkException.cs
@@ -12,9 +12,9 @@ public class SpellWorkException : Exception
public SpellWorkException(string message, params object[] arg0)
: base(String.Format(message, arg0))
{
- MessageBox.Show(String.Format(message, arg0),
- String.Format("{0} ERROR", DBC.VERSION),
- MessageBoxButtons.OK,
+ MessageBox.Show(String.Format(message, arg0),
+ String.Format("{0} ERROR", DBC.VERSION),
+ MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
View
0 SpellWork/FormAboutBox.Designer.cs → SpellWork/Forms/FormAboutBox.Designer.cs
File renamed without changes.
View
0 SpellWork/FormAboutBox.cs → SpellWork/Forms/FormAboutBox.cs
File renamed without changes.
View
0 SpellWork/FormAboutBox.resx → SpellWork/Forms/FormAboutBox.resx
File renamed without changes.
View
0 SpellWork/FormCalculateFlags.Designer.cs → ...Work/Forms/FormCalculateFlags.Designer.cs
File renamed without changes.
View
0 SpellWork/FormCalculateFlags.cs → SpellWork/Forms/FormCalculateFlags.cs
File renamed without changes.
View
0 SpellWork/FormCalculateFlags.resx → SpellWork/Forms/FormCalculateFlags.resx
File renamed without changes.
View
0 SpellWork/FormMain.Designer.cs → SpellWork/Forms/FormMain.Designer.cs
File renamed without changes.
View
13 SpellWork/FormMain.cs → SpellWork/Forms/FormMain.cs
@@ -6,6 +6,9 @@
using System.IO;
using System.Text;
using System.Linq.Expressions;
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
namespace SpellWork
{
@@ -601,13 +604,15 @@ private void _bAdditionalSearch_Click(object sender, EventArgs e)
}
form.Dispose();
}
-
+ IEnumerable spell;
+ object obj;
private void _tbAdvansedFilter1Val_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
- {
- // TODO: implement advansed filter
- //var res = DBC.Spell.Where(Func, )
+ {
+ spell = DBC.SpellDuration.Values.Where(n => n.GetType().GetField("ID").GetValue(n).ToUInt32() == 5);
+
+ obj = DBC.SpellDuration.Values.Select(n => n.GetType().GetField("ID").GetValue(n));
}
}
}
View
0 SpellWork/FormMain.resx → SpellWork/Forms/FormMain.resx
File renamed without changes.
View
0 SpellWork/FormSearch.Designer.cs → SpellWork/Forms/FormSearch.Designer.cs
File renamed without changes.
View
0 SpellWork/FormSearch.cs → SpellWork/Forms/FormSearch.cs
File renamed without changes.
View
0 SpellWork/FormSearch.resx → SpellWork/Forms/FormSearch.resx
File renamed without changes.
View
0 SpellWork/FormSettings.Designer.cs → SpellWork/Forms/FormSettings.Designer.cs
File renamed without changes.
View
0 SpellWork/FormSettings.cs → SpellWork/Forms/FormSettings.cs
File renamed without changes.
View
0 SpellWork/FormSettings.resx → SpellWork/Forms/FormSettings.resx
File renamed without changes.
View
13 SpellWork/Loader.cs
@@ -8,8 +8,6 @@ namespace SpellWork
{
class Loader
{
- static Dictionary<uint, string> nullStringDict = null;
-
public Loader(bool thread)
{
DBC.Spell = DBCReader.ReadDBC<SpellEntry>(DBC._SpellStrings);
@@ -24,12 +22,13 @@ public Loader(bool thread)
private void RunOther()
{
- DBC.SpellRadius = DBCReader.ReadDBC<SpellRadiusEntry>(nullStringDict);
- DBC.SpellRange = DBCReader.ReadDBC<SpellRangeEntry>(DBC._SpellRangeStrings);
- DBC.SpellDuration = DBCReader.ReadDBC<SpellDurationEntry>(nullStringDict);
- DBC.SkillLineAbility = DBCReader.ReadDBC<SkillLineAbilityEntry>(nullStringDict);
DBC.SkillLine = DBCReader.ReadDBC<SkillLineEntry>(DBC._SkillLineStrings);
- DBC.SpellCastTimes = DBCReader.ReadDBC<SpellCastTimesEntry>(nullStringDict);
+ DBC.SpellRange = DBCReader.ReadDBC<SpellRangeEntry>(DBC._SpellRangeStrings);
+
+ DBC.SpellDuration = DBCReader.ReadDBC<SpellDurationEntry>(null);
+ DBC.SkillLineAbility = DBCReader.ReadDBC<SkillLineAbilityEntry>(null);
+ DBC.SpellRadius = DBCReader.ReadDBC<SpellRadiusEntry>(null);
+ DBC.SpellCastTimes = DBCReader.ReadDBC<SpellCastTimesEntry>(null);
}
private LocalesDBC DetectedLocale
View
0 SpellWork/ProcInfo.cs → SpellWork/Spell/ProcInfo.cs
File renamed without changes.
View
0 SpellWork/SpellCompare.cs → SpellWork/Spell/SpellCompare.cs
File renamed without changes.
View
0 SpellWork/SpellEnums.cs → SpellWork/Spell/SpellEnums.cs
File renamed without changes.
View
3 SpellWork/SpellInfo.cs → SpellWork/Spell/SpellInfo.cs
@@ -289,7 +289,7 @@ select new
if (DBC.Spell.ContainsKey(tsId))
{
var trigger = DBC.Spell[tsId];
- sb.SetStyle(Color.DarkGreen, FontStyle.Bold);
+ sb.SetStyle(Color.Blue, FontStyle.Bold);
sb.AppendFormatLine(" Trigger spell ({0}) {1}. Chance = {2}", tsId, trigger.SpellNameRank, spell.ProcChance);
sb.SetStyle(FontStyle.Italic);
sb.AppendFormatLineIfNotNull(" Description: {0}", trigger.Description);
@@ -384,5 +384,6 @@ static void AppendItemInfo(RichTextBox sb, SpellEntry spell)
sb.AppendFormatLine(@" {0} - {1} {2} ", item.Entry, name, desc);
}
}
+
}
}
View
53 SpellWork/SpellWork.csproj
@@ -79,61 +79,62 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="FormAboutBox.cs">
+ <Compile Include="Forms\FormAboutBox.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="FormAboutBox.Designer.cs">
+ <Compile Include="Forms\FormAboutBox.Designer.cs">
<DependentUpon>FormAboutBox.cs</DependentUpon>
</Compile>
- <Compile Include="DBC.cs" />
- <Compile Include="DBCReader.cs" />
- <Compile Include="FormCalculateFlags.cs">
+ <Compile Include="DBC\DBC.cs" />
+ <Compile Include="DBC\DBCReader.cs" />
+ <Compile Include="Forms\FormCalculateFlags.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="FormCalculateFlags.Designer.cs">
+ <Compile Include="Forms\FormCalculateFlags.Designer.cs">
<DependentUpon>FormCalculateFlags.cs</DependentUpon>
</Compile>
- <Compile Include="FormSearch.cs">
+ <Compile Include="Forms\FormSearch.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="FormSearch.Designer.cs">
+ <Compile Include="Forms\FormSearch.Designer.cs">
<DependentUpon>FormSearch.cs</DependentUpon>
</Compile>
<Compile Include="Loader.cs" />
- <Compile Include="ProcInfo.cs">
+ <Compile Include="Spell\ProcInfo.cs">
</Compile>
- <Compile Include="RichTextBoxExtensions.cs" />
- <Compile Include="Extensions.cs" />
- <Compile Include="MySQLConnenct.cs" />
- <Compile Include="FormSettings.cs">
+ <Compile Include="Extensions\RichTextBoxExtensions.cs" />
+ <Compile Include="Extensions\Extensions.cs" />
+ <Compile Include="DataBase\MySQLConnenct.cs" />
+ <Compile Include="Forms\FormSettings.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="FormSettings.Designer.cs">
+ <Compile Include="Forms\FormSettings.Designer.cs">
<DependentUpon>FormSettings.cs</DependentUpon>
</Compile>
- <Compile Include="SpellCompare.cs" />
- <Compile Include="SpellWorkException.cs" />
- <Compile Include="Structure.cs" />
- <Compile Include="SpellInfo.cs" />
- <Compile Include="SpellEnums.cs" />
- <Compile Include="FormMain.cs">
+ <Compile Include="Spell\SpellCompare.cs" />
+ <Compile Include="Extensions\SpellWorkException.cs">
+ </Compile>
+ <Compile Include="DBC\Structure.cs" />
+ <Compile Include="Spell\SpellInfo.cs" />
+ <Compile Include="Spell\SpellEnums.cs" />
+ <Compile Include="Forms\FormMain.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="FormMain.Designer.cs">
+ <Compile Include="Forms\FormMain.Designer.cs">
<DependentUpon>FormMain.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="FormAboutBox.resx">
+ <EmbeddedResource Include="Forms\FormAboutBox.resx">
<DependentUpon>FormAboutBox.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="FormCalculateFlags.resx">
+ <EmbeddedResource Include="Forms\FormCalculateFlags.resx">
<DependentUpon>FormCalculateFlags.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="FormSearch.resx">
+ <EmbeddedResource Include="Forms\FormSearch.resx">
<DependentUpon>FormSearch.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="FormMain.resx">
+ <EmbeddedResource Include="Forms\FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
@@ -142,7 +143,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="FormSettings.resx">
+ <EmbeddedResource Include="Forms\FormSettings.resx">
<DependentUpon>FormSettings.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
View
BIN SpellWork/bin/Release/SpellWork.exe
Binary file not shown.
View
0 SpellWork_VS2010.sln → SpellWork_VC2010.sln
File renamed without changes.
View
0 SpellWork.sln → SpellWork_VS2008.sln
File renamed without changes.

0 comments on commit 6999252

Please sign in to comment.
Something went wrong with that request. Please try again.