1
This commit is contained in:
parent
c4fc5922e8
commit
30ceefe6cf
@ -47,6 +47,7 @@ void Player::Init()
|
|||||||
if (App::Instance()->IsTimeToReset(role_data.last_save_time)) {
|
if (App::Instance()->IsTimeToReset(role_data.last_save_time)) {
|
||||||
OnDailyReset();
|
OnDailyReset();
|
||||||
}
|
}
|
||||||
|
RecalcRedPoint();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UnInit()
|
void Player::UnInit()
|
||||||
@ -1062,7 +1063,36 @@ void Player::OnDailyReset()
|
|||||||
|
|
||||||
void Player::RecalcRedPoint()
|
void Player::RecalcRedPoint()
|
||||||
{
|
{
|
||||||
|
auto on_ok =
|
||||||
|
[] (a8::XParams& param, const f8::DataSet* data_set)
|
||||||
|
{
|
||||||
|
Player* hum = PlayerMgr::Instance()->GetPlayerByAccountId(param.sender.GetString());
|
||||||
|
if (hum) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
auto on_error =
|
||||||
|
[] (a8::XParams& param, int error_code, const std::string& error_msg)
|
||||||
|
{
|
||||||
|
};
|
||||||
|
|
||||||
|
a8::XObject conn_info = DBEngine::Instance()->GetConnInfo(myself.crc32_code);
|
||||||
|
DBEngine::Instance()->ExecAsyncQuery
|
||||||
|
(
|
||||||
|
conn_info,
|
||||||
|
"SELECT idx, applyid, target_id, sender_id, sender_nickname, "
|
||||||
|
" sender_avatar_url, sender_sex, sender_data_version1, "
|
||||||
|
" sender_user_value1, sender_user_value2, sender_user_value3, status "
|
||||||
|
"FROM friend_apply WHERE idx > %d AND target_id='%s' AND status=0;",
|
||||||
|
{
|
||||||
|
last_apply_idx_,
|
||||||
|
myself.base_data.account_id
|
||||||
|
},
|
||||||
|
a8::XParams()
|
||||||
|
.SetSender(myself.base_data.account_id),
|
||||||
|
on_ok,
|
||||||
|
on_error,
|
||||||
|
myself.crc32_code
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::ClearApplyByIdx(long long idx)
|
void Player::ClearApplyByIdx(long long idx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user