private bool CheckBagCapacity(UserInfo user, MailInfo info)
{
bool result = true;
if (null == user || null == user.ItemBag
|| null == info || null == info.m_Items) {
return result;
}
int ct = info.m_Items.Count;
int free = user.ItemBag.GetFreeCount();
if (ct > free) {
result = false;
}
NodeMessage opMsg = new NodeMessage(LobbyMessageDefine.Msg_LC_LackOfSpace, user.Guid);
Msg_LC_LackOfSpace protoData = new Msg_LC_LackOfSpace();
protoData.m_Succeed = result;
protoData.m_ReceiveNum = ct;
protoData.m_FreeNum = free;
protoData.m_MailGuid = info.m_MailGuid;
opMsg.m_ProtoData = protoData;
NodeMessageDispatcher.SendNodeMessage(user.NodeName, opMsg);
return result;
}