public void RefreshBountyQuestStates()
{
foreach (var bounty in CurrentBounties.Values)
{
var bountySNO = bounty.Info.QuestSNO;
var bountyState = bounty.Info.State;
if (!BountyQuestStates.ContainsKey(bountySNO))
{
BountyQuestStates.Add(bountySNO, bountyState);
}
else if (BountyQuestStates[bountySNO] != bountyState)
{
//Update State
BountyQuestStates[bountySNO] = bountyState;
//Check State?
if (bountyState == QuestState.Completed)
{
if (FunkyGame.CurrentStats != null)
{
FunkyGame.CurrentStats.BountiesCompleted++;
}
}
//Raise Event
if (OnBountyQuestStateChanged != null)
{
OnBountyQuestStateChanged(bountySNO, bountyState);
}
}
}
}