Hello, this might be usefull for cc developers.
Use something like
float currentresource = PrimaryResource;
and ull get the value of the resource your character currently has.
For dh PrimaryResource returns hatred, SecondaryResource returns disc.
Remember there is no SecondaryResource for classes beside dh, thats why i made it return -1 if actor != dh
Code:
public float PrimaryResource
{
get
{
int primary = (int)(Zeta.Internals.Actors.ActorAttributeType.ResourceCur) + (int)(ResourceValues.Parse(typeof(ResourceValues), ZetaDia.Me.ResourceTypePrimary.ToString()));
return (float) ZetaDia.Me.CommonData.GetAttribute<float>(primary);
}
}
public float SecondaryResource
{
get
{
if (ZetaDia.Me.ActorClass != ActorClass.DemonHunter) {return -1;} //because it only works for dh
int secondary = (int)(Zeta.Internals.Actors.ActorAttributeType.ResourceCur) + (int)(ResourceValues.Parse(typeof(ResourceValues), ZetaDia.Me.ResourceTypeSecondary.ToString()));
return (float) ZetaDia.Me.CommonData.GetAttribute<float>(secondary);
}
}
public enum ResourceValues : int
{
None = 0x0000,
Arcanum = 0x2000,
Fury = 0x3000,
Spirit = 0x4000,
Mana = 0x5000,
Hatred = 0x6000,
Discipline = 0x7000,
}
Use something like
float currentresource = PrimaryResource;
and ull get the value of the resource your character currently has.
For dh PrimaryResource returns hatred, SecondaryResource returns disc.
Remember there is no SecondaryResource for classes beside dh, thats why i made it return -1 if actor != dh