-
Member
How do I detect when the rift guardian is killed? [SOLVED]
Hey, I've been working on a nephalem rift timer, and it's been going really well. I can detect when a rift ends, and when the portal is gone, however I can't detect when the rift guardian is killed. Right now I have some detection where I check for nearby enemies, which works sometimes. Is there a solid way to do this?
Last edited by TheDiscordian; 02-05-2019 at 06:48 PM.
Reason: Solved
-
Contributor
There is IMonsterKilledHandler for that purpose, I guess.
RG is propably monster.Rarity == ActorRarity.Boss or monster.SnoMonster.Priority == MonsterPriority.boss bu that should be easy to find out?
Check StandardMonsterPlugin and RiftPlugin code.
Last edited by JarJarD3; 02-05-2019 at 03:40 AM.
Reason: Added RiftPlugin
-
Post Thanks / Like - 1 Thanks
TheDiscordian (1 members gave Thanks to JarJarD3 for this useful post)
-
Savvy ? 🐒
-
Post Thanks / Like - 1 Thanks
TheDiscordian (1 members gave Thanks to JackCeparou for this useful post)
-
Contributor
Looking from my old code it seems that nephalem rfit is closed when
Hud.Game.SpecialArea == SpecialArea.None
and in previous frame it was
Hud.Game.SpecialArea == SpecialArea.Rift
But my code was interested in total time spent in rifts that includes collecting loot and upgrading gems and I outputted my times to THUD debug log and kept in in tail on secondary monitor.
Code:
>>>>: NEW GAME
Area: T13: Rift
Time: T13: Rift = 3:45
LOOT: T13: Rift Gold +73,6 M CraftMats +33 Gems +8 BloodShard +199 DeathsBreath +26 in 4:23 avg 4:23 of 1
Area: T13: Rift Level 01
Area: 80: GreaterRift
Time: 80: GreaterRift = 5:28
LOOT: 80: GreaterRift Gold +1,5 M CraftMats +50 Gems +3 BloodShard +367 in 6:15 avg 6:15 of 1
-
Post Thanks / Like - 1 Thanks
TheDiscordian (1 members gave Thanks to JarJarD3 for this useful post)
-
Member
I think it actually switches from SpecialArea.Rift after the guardian appears, I could have tested it out incorrectly.
Thanks for your replies guys! I'll be testing a few things out and hopefully have something to post which integrates with the default RiftPlugin.
Edit: Just tested again, definitely changes when guardian is killed.
Last edited by TheDiscordian; 02-05-2019 at 04:43 PM.
-
Member
Alright this is what I came up with, time to clean up my changes and whatnot. This support thread is solved! 
PHP Code:
public void OnMonsterKilled(IMonster monster)
{
if (NephalemRiftStartTime > 0 && Hud.Game.RiftPercentage >= 100 && monster.SnoMonster.Priority == MonsterPriority.boss)
{
NephalemRiftTotalTime = Hud.Game.CurrentGameTick - NephalemRiftStartTime;
NephalemRiftStartTime = 0;
}
}