Ejemplo n.º 1
0
        private void SendContent(string content)
        {
            var cur = DateTime.Now;
            var c   = cur - _lastTalkTime;

            if (c.TotalMilliseconds < TalkCycle)
            {
                YxMessageTip.Show("慢点,频率太快了!!!");
                return;
            }
            _lastTalkTime = cur;
            // todo 类型
            // 世界、队伍、私聊、系统、喇叭
            // [05:55][世界]玩家:内容
            YxChatManager.SendChatContent(content);

            //普通内容格式
            //     /chat 类型 内容 [from] [to]
        }
Ejemplo n.º 2
0
        private void SendContent(string content)
        {
            var cur = DateTime.Now;
            var c   = cur - _lastTalkTime;

            if (c.TotalMilliseconds < TalkCycle)
            {
                YxMessageTip.Show("慢点,频率太快了!!!");
                return;
            }
            _lastTalkTime = cur;
            if (Type == ExpType.Normal)
            {
                YxChatManager.SendChatContent(string.Format("/{0} {1}", YxChatManager.ChatCmd.Exp, content));
                return;
            }
            if (AttackIndex == -1)
            {
                return;
            }
            YxChatManager.SendChatContent(string.Format("/{0} {1} {2}", YxChatManager.ChatCmd.HeadExp, content, AttackIndex));
        }