45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
|
//This code create by CodeEngine
|
|||
|
|
|||
|
using System;
|
|||
|
using Module.Log;
|
|||
|
using Google.ProtocolBuffers;
|
|||
|
using System.Collections;
|
|||
|
namespace SPacket.SocketInstance
|
|||
|
{
|
|||
|
public class GC_ADDFRIENDHandler : Ipacket
|
|||
|
{
|
|||
|
public uint Execute(PacketDistributed ipacket)
|
|||
|
{
|
|||
|
GC_ADDFRIEND packet = (GC_ADDFRIEND)ipacket;
|
|||
|
if (null == packet)
|
|||
|
return (uint)PACKET_EXE.PACKET_EXE_ERROR;
|
|||
|
|
|||
|
if (null != GameManager.gameManager.PlayerDataPool.FriendList)
|
|||
|
{
|
|||
|
Relation _relation = new Relation();
|
|||
|
_relation.Guid = packet.Guid;
|
|||
|
_relation.Name = packet.Name;
|
|||
|
_relation.Level = packet.Level;
|
|||
|
_relation.Profession = packet.Prof;
|
|||
|
_relation.CombatNum = packet.Combat;
|
|||
|
_relation.State = packet.State;
|
|||
|
_relation.TimeInfo = packet.TimeInfo;
|
|||
|
_relation.FriendPoint = packet.IntimacyDegree;
|
|||
|
|
|||
|
if (GameManager.gameManager.PlayerDataPool.FriendList.AddRelation(_relation))
|
|||
|
{
|
|||
|
if (Singleton<ObjManager>.Instance.MainPlayer != null)
|
|||
|
{
|
|||
|
Singleton<ObjManager>.Instance.MainPlayer.SendNoticMsg(false, "#{2393}");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//<2F><><EFBFBD>º<EFBFBD><C2BA>ѽ<EFBFBD><D1BD>棨<EFBFBD><E6A3A8><EFBFBD><EFBFBD>δ<EFBFBD><EFBFBD><F2BFAAA3><EFBFBD>UpdateFriendList<73><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if (null != GUIData.delFriendDataUpdate) GUIData.delFriendDataUpdate();
|
|||
|
|
|||
|
return (uint)PACKET_EXE.PACKET_EXE_CONTINUE;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|