/// <summary> /// 赠送 /// </summary> public void FriendGiveGL(PlayerIDName src_player_id, PropID item_id) { Player player = UnitManager.Instance.GetUnitByIdx(m_char_idx) as Player; if (player == null) { return; } if (!m_relations.ContainsKey(src_player_id.char_idx)) { return; } ss2c.RelationGive rep_msg = PacketPools.Get(ss2c.msg.RELATION_GIVE) as ss2c.RelationGive; rep_msg.player_id = src_player_id; rep_msg.item_id = item_id; ServerNetManager.Instance.SendProxy(player.client_uid, rep_msg); }
/// <summary> /// 赠送 /// </summary> private void OnRelationGive(PacketBase packet) { ss2c.RelationGive msg = packet as ss2c.RelationGive; System.Windows.Forms.MessageBox.Show("收到(" + msg.player_id.char_name + ")赠送的礼物", "提示", System.Windows.Forms.MessageBoxButtons.OK); }