[Friends] Correct order in frame handler

This commit is contained in:
momo5502 2017-01-31 18:20:16 +01:00
parent 5798de30be
commit 9b462469da

View File

@ -431,13 +431,18 @@ namespace Components
QuickPatch::OnFrame([]() QuickPatch::OnFrame([]()
{ {
static Utils::Time::Interval interval; static Utils::Time::Interval timeInterval;
static Utils::Time::Interval sortInterval; static Utils::Time::Interval sortInterval;
static Utils::Time::Interval stateInterval; static Utils::Time::Interval stateInterval;
if (interval.elapsed(2min)) if (*reinterpret_cast<bool*>(0x1AD5690)) // LiveStorage_DoWeHaveStats
{ {
interval.update(); Friends::UpdateRank();
}
if (timeInterval.elapsed(2min))
{
timeInterval.update();
Friends::UpdateTimeStamp(); Friends::UpdateTimeStamp();
Friends::UpdateState(); Friends::UpdateState();
} }
@ -455,7 +460,7 @@ namespace Components
if(sortInterval.elapsed(3s)) if(sortInterval.elapsed(3s))
{ {
stateInterval.update(); sortInterval.update();
if (Friends::TriggerSort) if (Friends::TriggerSort)
{ {
@ -463,11 +468,6 @@ namespace Components
Friends::SortList(true); Friends::SortList(true);
} }
} }
if(*reinterpret_cast<bool*>(0x1AD5690)) // LiveStorage_DoWeHaveStats
{
Friends::UpdateRank();
}
}); });
UIFeeder::Add(6.0f, Friends::GetFriendCount, Friends::GetFriendText, Friends::SelectFriend); UIFeeder::Add(6.0f, Friends::GetFriendCount, Friends::GetFriendText, Friends::SelectFriend);