1
This commit is contained in:
parent
08f9d0d191
commit
b570f177a9
@ -198,6 +198,7 @@ void DBHelper::SetEventStatus(long long idx,
|
|||||||
|
|
||||||
void DBHelper::ShuaOfflineUsers(Player* hum)
|
void DBHelper::ShuaOfflineUsers(Player* hum)
|
||||||
{
|
{
|
||||||
|
++shua_users_offline_times;
|
||||||
std::set<std::string>& exclude_account_ids = hum->GetExcludeAccountIds();
|
std::set<std::string>& exclude_account_ids = hum->GetExcludeAccountIds();
|
||||||
if (cache_users_hash.size() < 500 && !exclude_account_ids.empty()) {
|
if (cache_users_hash.size() < 500 && !exclude_account_ids.empty()) {
|
||||||
std::string fmtstr = "'',";
|
std::string fmtstr = "'',";
|
||||||
|
@ -40,6 +40,7 @@ class DBHelper : public a8::Singleton<DBHelper>
|
|||||||
public:
|
public:
|
||||||
std::map<std::string, cs::MFUserInfo*> cache_users_hash;
|
std::map<std::string, cs::MFUserInfo*> cache_users_hash;
|
||||||
std::vector<cs::MFUserInfo*> cache_users_list;
|
std::vector<cs::MFUserInfo*> cache_users_list;
|
||||||
|
long long shua_users_offline_times = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void Player::Init()
|
|||||||
RefreshFriendData();
|
RefreshFriendData();
|
||||||
NotifyOnline();
|
NotifyOnline();
|
||||||
#if 1
|
#if 1
|
||||||
if (DBHelper::Instance()->cache_users_hash.size() <= 20) {
|
if (DBHelper::Instance()->shua_users_offline_times <= 1) {
|
||||||
DBHelper::Instance()->ShuaOfflineUsers(this);
|
DBHelper::Instance()->ShuaOfflineUsers(this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user