back_recharge
gaojie 2019-06-14 10:59:32 +08:00
parent fb1ec3aa66
commit e6b409644e
1 changed files with 9 additions and 11 deletions

View File

@ -200,25 +200,23 @@ public class FriendLogic {
*/
private void sendFriendInfoIndication(int uid,int inviteUid,int type) throws Exception {
boolean isOnline = OnlineUserManager.checkUidOnline(inviteUid);
if (isOnline){
if (isOnline) {
ISession session = OnlineUserManager.getSessionByUid(inviteUid);
PlayerInfoProto.sendFriendInfoIndication.Builder sendFriendInfoIndication = PlayerInfoProto.sendFriendInfoIndication.newBuilder();
sendFriendInfoIndication .setType(type);
if (type == 1){
sendFriendInfoIndication .setFriends(CBean2Proto.getFriendInfo(uid,null));
}
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.SEND_FRIEND_INFO_INDICATION_VALUE, sendFriendInfoIndication.build(), true);
sendFriendInfoIndication.setType(type);
sendFriendInfoIndication.setFriends(CBean2Proto.getFriendInfo(uid, null));
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.SEND_FRIEND_INFO_INDICATION_VALUE, sendFriendInfoIndication.build(), true);
}
}
//t推送赠送体力状态
private void sendFriendStatedication(int uid ,int inviteUid,int type) throws Exception {
private void sendFriendStatedication(int uid ,int inviteUid,int type) {
boolean isOnline = OnlineUserManager.checkUidOnline(inviteUid);
if (isOnline) {
ISession session = OnlineUserManager.getSessionByUid(inviteUid);
PlayerInfoProto.SendFriendStateIndication.Builder sendFriendStateIndication = PlayerInfoProto.SendFriendStateIndication.newBuilder();
sendFriendStateIndication.setType(type);
sendFriendStateIndication.setFriendId(uid);
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.SEND_FRIEND_INFO_INDICATION_VALUE, sendFriendStateIndication.build(), true);
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.SEND_FRIEND_STATE_INDICATION_VALUE, sendFriendStateIndication.build(), true);
}
}
@ -340,8 +338,8 @@ public class FriendLogic {
//删除好友清除赠送领取体力信息
private void delFriendInfo(int friendId, int uid, FriendManager friendManager, FriendManager friendManager1) {
friendManager1.delFriends(uid);
friendManager1.delGiveMap(friendId);
friendManager1.delHaveReward(friendId);
friendManager1.delGiveMap(uid);
friendManager1.delHaveReward(uid);
friendManager.delFriends(friendId);
friendManager.delGiveMap(friendId);
friendManager.delHaveReward(friendId);
@ -392,7 +390,7 @@ public class FriendLogic {
}
friendManager.updateGiveMap(friendUserId,1);
friendManager1.updateHaveRewardMap(uid,1);
sendFriendStatedication(uid,friendId,2);
sendFriendStatedication(uid,friendUserId,2);
}
}
MessageUtil.sendMessage(iSession, 1, msgId, null, true);