1
This commit is contained in:
commit
6995184d29
@ -44,6 +44,10 @@ void Player::Init()
|
|||||||
},
|
},
|
||||||
&timer_attacher.timer_list_
|
&timer_attacher.timer_list_
|
||||||
);
|
);
|
||||||
|
#ifdef DEBUG
|
||||||
|
red_point_flags_ = 1;
|
||||||
|
SyncRedPoint();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::UnInit()
|
void Player::UnInit()
|
||||||
@ -994,3 +998,10 @@ bool Player::CanAddFriend(const std::string& account_id)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::SyncRedPoint()
|
||||||
|
{
|
||||||
|
cs::SMUpdateRedPointNotify notifymsg;
|
||||||
|
notifymsg.set_red_point_flags(red_point_flags_);
|
||||||
|
SendMsg(notifymsg);
|
||||||
|
}
|
||||||
|
@ -127,6 +127,7 @@ private:
|
|||||||
void OnFriendAgreeEvent(Event& event);
|
void OnFriendAgreeEvent(Event& event);
|
||||||
void OnFriendDeleteEvent(Event& event);
|
void OnFriendDeleteEvent(Event& event);
|
||||||
bool CanAddFriend(const std::string& account_id);
|
bool CanAddFriend(const std::string& account_id);
|
||||||
|
void SyncRedPoint();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool dirty_ = false;
|
bool dirty_ = false;
|
||||||
@ -137,6 +138,7 @@ private:
|
|||||||
long long curr_max_event_idx_ = 0;
|
long long curr_max_event_idx_ = 0;
|
||||||
long long last_run_tick_ = 0;
|
long long last_run_tick_ = 0;
|
||||||
std::map<long long, Event> event_hash_;
|
std::map<long long, Event> event_hash_;
|
||||||
|
int red_point_flags_ = 0;
|
||||||
|
|
||||||
std::map<std::string, Friend*> friend_hash_;
|
std::map<std::string, Friend*> friend_hash_;
|
||||||
std::map<long long, FriendApply*> apply_hash_;
|
std::map<long long, FriendApply*> apply_hash_;
|
||||||
|
@ -64,4 +64,5 @@ enum SMMessageId_e
|
|||||||
_SMUserTempCustomDataUpdate = 504;
|
_SMUserTempCustomDataUpdate = 504;
|
||||||
_SMDeleteFriendNotify = 505;
|
_SMDeleteFriendNotify = 505;
|
||||||
_SMUpdateAccountInfo = 506;
|
_SMUpdateAccountInfo = 506;
|
||||||
|
_SMUpdateRedPointNotify = 507;
|
||||||
}
|
}
|
||||||
|
@ -376,3 +376,9 @@ message SMUpdateAccountInfo
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新红点信息
|
||||||
|
message SMUpdateRedPointNotify
|
||||||
|
{
|
||||||
|
optional int32 red_point_flags = 1; //红点信息 1<<0: 好友申请
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user