public static void OnSCID_CMD_NTF_FRIEND_LOGIN_STATUS(CSPkg msg) { Singleton <EventRouter> .GetInstance().BroadCastEvent <CSPkg>("Friend_Login_NTF", msg); SCPKG_CMD_NTF_FRIEND_LOGIN_STATUS stNtfFriendLoginStatus = msg.stPkgData.stNtfFriendLoginStatus; CFriendModel.FriendType type = (stNtfFriendLoginStatus.bFriendType != 1) ? CFriendModel.FriendType.SNS : CFriendModel.FriendType.GameFriend; bool flag = stNtfFriendLoginStatus.bLoginStatus == 0; Singleton <EventRouter> .GetInstance().BroadCastEvent <CFriendModel.FriendType, ulong, uint, bool>("Chat_Friend_Online_Change", type, stNtfFriendLoginStatus.stUin.ullUid, stNtfFriendLoginStatus.stUin.dwLogicWorldId, flag); }
private void On_Friend_Login_NTF(CSPkg msg) { SCPKG_CMD_NTF_FRIEND_LOGIN_STATUS stNtfFriendLoginStatus = msg.stPkgData.stNtfFriendLoginStatus; CFriendModel.FriendType type = (stNtfFriendLoginStatus.bFriendType != 1) ? CFriendModel.FriendType.SNS : CFriendModel.FriendType.GameFriend; COMDT_FRIEND_INFO comdt_friend_info = Singleton <CFriendContoller> .GetInstance().model.GetInfo(type, stNtfFriendLoginStatus.stUin); if (comdt_friend_info != null) { CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); if (masterRoleInfo != null) { comdt_friend_info.bIsOnline = stNtfFriendLoginStatus.bLoginStatus; comdt_friend_info.dwLastLoginTime = (uint)masterRoleInfo.getCurrentTimeSinceLogin(); Singleton <CFriendContoller> .GetInstance().model.SortGameFriend(); if ((this.view != null) && this.view.IsActive()) { this.view.Refresh(); } } } }