public void CheckActiveBounty()
{
//Check if active bounty is null.. and attempt to update again.
if (ActiveBounty == null && !FunkyGame.Hero.bIsInTown)
{
if (DateTime.Now.CompareTo(_lastAttemptedUpdateActiveBounty) > 0)
{
_lastAttemptedUpdateActiveBounty = DateTime.Now.AddSeconds(2.5);
UpdateActiveBounty();
if (ActiveBounty != null)
{//No Longer Null.. Do Full Refresh!
RefreshLevelChanged();
if (ActiveBountyChanged != null)
ActiveBountyChanged();
}
}
}
else if (ActiveBounty != null && (!FunkyGame.Hero.bIsInTown || ActiveBounty.QuestSNO == ADVENTUREMODE_GREATERRIFT_TRIAL || ActiveBounty.QuestSNO == ADVENTUREMODE_RIFTID))
{
if (ActiveBounty.QuestSNO == ADVENTUREMODE_RIFTID || ActiveBounty.QuestSNO == ADVENTUREMODE_GREATERRIFT_TRIAL)
{
if (DateTime.Now.CompareTo(_lastAttemptedUpdateActiveRift) > 0)
{
//Refresh every 10 seconds!
_lastAttemptedUpdateActiveRift = DateTime.Now.AddSeconds(10);
RefreshRiftLevelChange();
if (ActiveBountyChanged != null)
ActiveBountyChanged();
}
}
else if(CurrentBountyCacheEntry!=null && CurrentBountyCacheEntry.Type== BountyTypes.CursedEvent && DateTime.Now.Subtract(FunkyGame.Targeting.Cache.lastSeenCursedShrine).TotalMilliseconds <= (10000))
{
if (DateTime.Now.CompareTo(_lastAttemptedUpdateActiveBounty) > 0)
{
_lastAttemptedUpdateActiveBounty = DateTime.Now.AddSeconds(2.5);
int activebountysno = ActiveBounty.QuestSNO;
RefreshLevelChanged();
if ((ActiveBounty == null || ActiveBounty.QuestSNO != activebountysno) && ActiveBountyChanged != null)
ActiveBountyChanged();
}
}
}
}