1
This commit is contained in:
parent
ab8794a31f
commit
8effa1fd7a
@ -29,6 +29,10 @@ void Player::Init()
|
||||
myself.base_data.account_id.size()
|
||||
);
|
||||
NotifyOnline();
|
||||
#ifdef DEBUG
|
||||
red_point_flags_ = 1;
|
||||
SyncRedPoint();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Player::UnInit()
|
||||
@ -870,3 +874,10 @@ void Player::SyncOtherFriend()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SyncRedPoint()
|
||||
{
|
||||
cs::SMUpdateRedPointNotify notifymsg;
|
||||
notifymsg.set_red_point_flags(red_point_flags_);
|
||||
SendMsg(notifymsg);
|
||||
}
|
||||
|
@ -116,12 +116,14 @@ private:
|
||||
::google::protobuf::Message& msg);
|
||||
void InternalUpdateUserInfo();
|
||||
void SyncOtherFriend();
|
||||
void SyncRedPoint();
|
||||
|
||||
private:
|
||||
bool dirty_ = false;
|
||||
timer_list* dirty_timer_ = nullptr;
|
||||
timer_list* update_user_info_timer_ = nullptr;
|
||||
long long last_apply_idx_ = 0;
|
||||
int red_point_flags_ = 0;
|
||||
|
||||
std::map<std::string, Friend*> friend_hash_;
|
||||
std::map<long long, FriendApply*> apply_hash_;
|
||||
|
@ -65,4 +65,5 @@ enum SMMessageId_e
|
||||
_SMCustomMsgNotify = 503;
|
||||
_SMUserTempCustomDataUpdate = 504;
|
||||
_SMDeleteFriendNotify = 505;
|
||||
_SMUpdateRedPointNotify = 507;
|
||||
}
|
||||
|
@ -375,3 +375,9 @@ message SMUserTempCustomDataUpdate
|
||||
optional string account_id = 1; //账号id
|
||||
optional MFUserTempCustomData temp_custom_data = 2; //用户临时自定义数据
|
||||
}
|
||||
|
||||
//更新红点信息
|
||||
message SMUpdateRedPointNotify
|
||||
{
|
||||
optional int32 red_point_flags = 1; //红点信息 1<<0: 好友申请
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user