示例#1
0
文件: Mail.cs 项目: uvbs/CypherCore
        public MailSender(WorldObject sender, MailStationery stationery = MailStationery.Default)
        {
            m_stationery = stationery;
            switch (sender.GetTypeId())
            {
            case TypeId.Unit:
                m_messageType = MailMessageType.Creature;
                m_senderId    = sender.GetEntry();
                break;

            case TypeId.GameObject:
                m_messageType = MailMessageType.Gameobject;
                m_senderId    = sender.GetEntry();
                break;

            case TypeId.Player:
                m_messageType = MailMessageType.Normal;
                m_senderId    = sender.GetGUID().GetCounter();
                break;

            default:
                m_messageType = MailMessageType.Normal;
                m_senderId    = 0;                                  // will show mail from not existed player
                Log.outError(LogFilter.Server, "MailSender:MailSender - Mail have unexpected sender typeid ({0})", sender.GetTypeId());
                break;
            }
        }
示例#2
0
文件: Mail.cs 项目: uvbs/CypherCore
 public MailSender(MailMessageType messageType, ulong sender_guidlow_or_entry, MailStationery stationery = MailStationery.Default)
 {
     m_messageType = messageType;
     m_senderId    = sender_guidlow_or_entry;
     m_stationery  = stationery;
 }