-
Contributor
IPlayerSkill rune names as enumeration?
Has anybody compiled IPlayerSkill rune names as enumeration for their own convenience?
I kind of tired writing code like this:
Code:
var skill = Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Crusader_Condemn);
if (skill != null)
{
switch (skill.Rune)
{
case 1: // Vacuum
case 4: // Shattering Explosion
paint(PowerDecoratorHelper, 20f);
break;
default:
paint(PowerDecoratorHelper, 15f);
break;
}
}
or
Code:
if (Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Necromancer_Frailty)?.Rune == 4 ||
Hud.Game.Me.Powers.GetUsedSkill(Hud.Sno.SnoPowers.Necromancer_Devour)?.Rune == 3)
{
var helperRadius = 15f + (Hud.Game.Me.Stats.PickupRange / 2f);
paint(PowerDecoratorHelper, helperRadius);
}
and AFAIK there is now way to access all skill runes unless they are used by the player.
-
it can't be an enum, because there are multiple values (so value 4 could have lots of names)
Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...
-
Contributor
Originally Posted by
KillerJohn
it can't be an enum, because there are multiple values (so value 4 could have lots of names)
My wording was bad, I was thinking something along these lines:
Code:
namespace Turbo.Plugins.User
{
public abstract class Runes
{
public abstract class Barbarian
{
public static byte AncientSpear_None = 0;
public static byte AncientSpear_Ranseur = 1;
public static byte AncientSpear_Harpoon = 2;
public static byte AncientSpear_JaggedEdge = 3;
public static byte AncientSpear_BoulderToss = 4;
public static byte AncientSpear_RageFlip = 5;
public static byte Avalanche_None = 0;
public static byte Avalanche_Rune1 = 1;
public static byte Avalanche_Rune2 = 2;
public static byte Avalanche_Rune3 = 3;
public static byte Avalanche_Rune4 = 4;
public static byte Avalanche_Rune5 = 5;
}
public abstract class Crusader
{
public static byte SteedCharge_None = 0;
public static byte SteedCharge_Rune1 = 1;
public static byte SteedCharge_Rune2 = 2;
public static byte SteedCharge_Rune3 = 3;
public static byte SteedCharge_Rune4 = 4;
public static byte SteedCharge_Rune5 = 5;
public static byte SweepAttack_None = 0;
public static byte SweepAttack_BlazingSweep = 1;
public static byte SweepAttack_TripAttack = 2;
public static byte SweepAttack_HolyShock = 3;
public static byte SweepAttack_GatheringSweep = 4;
public static byte SweepAttack_InspiringSweep = 5;
}
}
}
so you can refer a rune like:
Code:
var rune = Runes.Barbarian.AncientSpear_Ranseur;
OFC this has to be a community effort as rune names and values can not be found from D3 binaries, or can they?
Preferably namespace could be Turbo.Plugins.Default when work has been finished.
But the skeleton code is easy to generate if there is interest to have something like this for our convenience.
-
Savvy ? 🐒
Originally Posted by
JarJarD3
OFC this has to be a community effort as rune names and values can not be found from D3 binaries, or can they?.
Well, most of the D3 data is available 'publicly'.
Originally Posted by
JarJarD3
Preferably namespace could be Turbo.Plugins.Default when work has been finished..
I'm pretty sure KJ will find a better way than me...
Originally Posted by
JarJarD3
But the skeleton code is easy to generate if there is interest to have something like this for our convenience.
Sure, there is the code :
JackCeparouCompass/HeroClassSkillRunes.cs at 51b57758389b77dbda6b96db346bd3ffed425be2 . JackCeparou/JackCeparouCompass . GitHub
Some facts :
- data : d3planner
- code generation : crappy AF (& private atm)
- generated code license : WTFPL
-
Post Thanks / Like - 1 Thanks
JarJarD3 (1 members gave Thanks to JackCeparou for this useful post)
-
Contributor
Originally Posted by
JackCeparou
Jack, I should have checked your extensions first!