-
Contributor
Originally Posted by
Someoneunimportant
Thanks
Great learning experience
All Ptr (Pointers) needs to be dereferenced (simply just read the pointer address)
I think the method looks something like this
Code:
public T Dereference<T>(int PtrAddress)
{
return Enigma.Engine.Current.Read<T>(PtrAddress)
}
-
Member
Is there any way to get the current time in the rift? As in, if you just start the rift, we know the clock is ticking, but I don't see a reference to that clock (I imagine it's in ticks instead? But I only see game ticks as available). Wild guess is it's a type of quest, and going to be buried somewhere in x168_Ptr_1104Bytes_Quests.
Last edited by Someoneunimportant; 02-27-2016 at 04:55 PM.
-
Contributor
Originally Posted by
Someoneunimportant
Is there any way to get the current time in the rift? As in, if you just start the rift, we know the clock is ticking, but I don't see a reference to that clock (I imagine it's in ticks instead? But I only see game ticks as available). Wild guess is it's a type of quest, and going to be buried somewhere in x168_Ptr_1104Bytes_Quests.
Code:
public void GetTimeLeft()
{
double TicksLeft = Enigma.D3.Engine.Current.ObjectManager.xA04_Ptr_TimedEvents.Dereference().x08_Count == 0 ? 0 :
(GameManager.Instance.GameTicks- Enigma.D3.Engine.Current.ObjectManager.xA04_Ptr_TimedEvents.Dereference().First()._x04) / 60d; // x.08 = stop x.04 = startime
TimeSpan Time = TimeSpan.FromSeconds(TicksLeft);
string TimeFormatted = String.Format("{0} {1}",
Time.Minutes == 0 ? "" : Time.Minutes + " MIN",
Time.Seconds == 0 ? "" : Time.Seconds + " SEC");
Extensions.Execute.UIThread(() =>
{
TimeLeft.Text = TimeFormatted;
});
}
-
Post Thanks / Like - 1 Thanks
-
Member
Don't know who you are, or how/what you use Enigma for, but you're incredibly helpful. I'd found a workaround using a combination ticks before, but this is much more straightforward.
-
Contributor
Originally Posted by
Someoneunimportant
Don't know who you are, or how/what you use Enigma for, but you're incredibly helpful. I'd found a workaround using a combination ticks before, but this is much more straightforward.
Np, we all need to start somewhere
This is what I am using EnigmaD3 for.
FindersKeepers
-
Member
Originally Posted by
Dolphe
Np, we all need to start somewhere
This is what I am using EnigmaD3 for.
FindersKeepers
Excellent project. I sent you a quick message as well!