Skip to content

Commit

Permalink
Implemented spell value level scaling
Browse files Browse the repository at this point in the history
Todo: Cast times scaling
  • Loading branch information
Shauren committed Aug 15, 2012
1 parent 8265083 commit 09a1fb3
Show file tree
Hide file tree
Showing 15 changed files with 856 additions and 457 deletions.
11 changes: 11 additions & 0 deletions SpellWork/DBC/DBC.cs
Expand Up @@ -13,6 +13,7 @@ public static class DBC
{
public const string Version = "SpellWork 4.3.4 (15595)";
public const string DbcPath = @"dbc";
public const uint MaxLevel = 85;

public const int MaxDbcLocale = 16;
public const int MaxReagentCount = 8;
Expand All @@ -21,6 +22,7 @@ public static class DBC

public static DBCStorage<AreaGroupEntry> AreaGroup = new DBCStorage<AreaGroupEntry>();
public static DBCStorage<AreaTableEntry> AreaTable = new DBCStorage<AreaTableEntry>();
public static DBCStorage<gtSpellScalingEntry> gtSpellScaling = new DBCStorage<gtSpellScalingEntry>();
public static DBCStorage<OverrideSpellDataEntry> OverrideSpellData = new DBCStorage<OverrideSpellDataEntry>();
public static DBCStorage<ScreenEffectEntry> ScreenEffect = new DBCStorage<ScreenEffectEntry>();
public static DBCStorage<SkillLineAbilityEntry> SkillLineAbility = new DBCStorage<SkillLineAbilityEntry>();
Expand Down Expand Up @@ -91,10 +93,19 @@ public static void Load()
continue;

SpellInfoStore[effect.SpellId].Effects[effect.Index] = effect;
var scaling = SpellInfoStore[effect.SpellId].Scaling;
if (scaling != null)
{
effect.ScalingMultiplier = scaling.Multiplier[effect.Index];
effect.RandomPointsScalingMultiplier = scaling.RandomPointsMultiplier[effect.Index];
effect.ComboPointsScalingMultiplier = scaling.OtherMultiplier[effect.Index];
}
}
}

// DB
public static List<Item> ItemTemplate = new List<Item>();

public static uint SelectedLevel = MaxLevel;
}
}
7 changes: 7 additions & 0 deletions SpellWork/DBC/Structures/SpellEffectEntry.cs
Expand Up @@ -33,6 +33,13 @@ public sealed class SpellEffectEntry
public uint Index;
public uint Unk0;

[StoragePresence(StoragePresenceOption.Exclude)]
public float ScalingMultiplier;
[StoragePresence(StoragePresenceOption.Exclude)]
public float RandomPointsScalingMultiplier;
[StoragePresence(StoragePresenceOption.Exclude)]
public float ComboPointsScalingMultiplier;

public string MaxRadius
{
get
Expand Down
5 changes: 5 additions & 0 deletions SpellWork/DBC/Structures/SpellEntry.cs
Expand Up @@ -110,6 +110,11 @@ public SpellReagentsEntry Reagents
get { return SpellReagentsId != 0 && DBC.SpellReagents.ContainsKey(SpellReagentsId) ? DBC.SpellReagents[SpellReagentsId] : null; }
}

public SpellScalingEntry Scaling
{
get { return SpellScalingId != 0 && DBC.SpellScaling.ContainsKey(SpellScalingId) ? DBC.SpellScaling[SpellScalingId] : null; }
}

public SpellShapeshiftEntry Shapeshift
{
get { return SpellShapeshiftId != 0 && DBC.SpellShapeshift.ContainsKey(SpellShapeshiftId) ? DBC.SpellShapeshift[SpellShapeshiftId] : null; }
Expand Down
13 changes: 13 additions & 0 deletions SpellWork/DBC/Structures/gtSpellScalingEntry.cs
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SpellWork.DBC.Structures
{
public sealed class gtSpellScalingEntry
{
public uint Index;
public float Multiplier;
}
}
867 changes: 440 additions & 427 deletions SpellWork/Forms/FormMain.Designer.cs

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions SpellWork/Forms/FormMain.cs
Expand Up @@ -128,6 +128,30 @@ private static void TextBoxKeyPress(object sender, KeyPressEventArgs e)
e.Handled = true;
}

private void LevelScalingClick(object sender, EventArgs e)
{
var scalingForm = new FormSpellScaling();
var ret = scalingForm.ShowDialog(this);
if (ret == DialogResult.OK)
{
DBC.DBC.SelectedLevel = scalingForm.SelectedLevel;
switch (tabControl1.SelectedIndex)
{
case 0:
LvSpellListSelectedIndexChanged(null, null);
break;
case 1:
LvProcSpellListSelectedIndexChanged(null, null);
break;
case 2:
CompareFilterSpellTextChanged(null, null);
break;
case 3:
break;
}
}
}

#endregion

#region SPELL INFO PAGE
Expand Down
2 changes: 1 addition & 1 deletion SpellWork/Forms/FormMain.resx
Expand Up @@ -131,7 +131,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAY
DQAAAk1TRnQBSQFMAgEBBgEAASQBAAEkAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DQAAAk1TRnQBSQFMAgEBBgEAAUwBAAFMAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down
26 changes: 14 additions & 12 deletions SpellWork/Forms/FormSearch.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions SpellWork/Forms/FormSearch.resx
Expand Up @@ -112,12 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAUAICAAAAEACACoCAAAVgAAADAwAAABACAAqCUAAP4IAAAQEBAAAQAEACgBAACmLgAAEBAAAAEA
Expand Down
119 changes: 119 additions & 0 deletions SpellWork/Forms/FormSpellScaling.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 09a1fb3

Please sign in to comment.