public void sendfriendlist(FriendProxy.FriendType ft) { Variant variant = new Variant(); variant["buddy_cmd"] = (uint)ft; this.sendRPC(170u, variant); }
public void onfriendinfo(Variant data) { debug.Log("好友信息:" + data.dump()); FriendProxy.FriendType friendType = FriendProxy.FriendType.NON; bool flag = data.ContainsKey("res"); if (flag) { int @int = data["res"]._int; bool flag2 = @int > 0; if (flag2) { friendType = (FriendProxy.FriendType)@int; } else { Globle.err_output(@int); } } switch (friendType) { case FriendProxy.FriendType.FRIEND: this.setBuddy(data); this.setBlackList(data); this.setEnemyList(data); break; case FriendProxy.FriendType.ADD_FRIEND: flytxt.instance.fly("好友申请已发送,等待对方同意。", 0, default(Color), null); break; case FriendProxy.FriendType.AGREEAPPLYFRIEND: this.setAgreeAplyFriend(data); break; case FriendProxy.FriendType.BLACKLIST: this.receiveAddToBlackList(data); break; case FriendProxy.FriendType.REFUSEADDFRIEND: this.setRefuseAddFriend(data); break; case FriendProxy.FriendType.DELETEFRIEND: this.setDeleteFriend(data); break; case FriendProxy.FriendType.REMOVEBLACKLIST: this.setRemoveBlackList(data); break; case FriendProxy.FriendType.ENEMYPOSTION: this.setEnemyPostion(data); break; case FriendProxy.FriendType.SHOWTARGETINFO: base.dispatchEvent(GameEvent.Create(FriendProxy.EVENT_LOOKFRIEND, this, data, false)); break; case FriendProxy.FriendType.DELETEENEMY: this.setDeleteEnemy(data); break; case FriendProxy.FriendType.ONLINERECOMMEND: this.RecommendFriend(data); break; case FriendProxy.FriendType.RECEIVEAPPLYFRIEND: this.ReceiveApplyFriend(data); break; case FriendProxy.FriendType.RECEIVEENEMY: this.setReceiveEnemy(data); break; case FriendProxy.FriendType.BEREFUSE: this.setBeRefuse(data); break; } }