Beispiel #1
0
 private static RandomFortuneCache GetFortune(long QQNum)
 {
     return(RapidCacher.GetCache($"RandomFortune:{QQNum}", CommonUtil.UntilTommorow(),
                                 () => new RandomFortuneCache {
         QQNum = QQNum, FortuneValue = GetRandomFortune(), BlessName = string.Empty, BlessValue = 0
     }));
 }
Beispiel #2
0
        public bool TarotFortune(MsgInformationEx MsgDTO, object[] param)
        {
            var fortune = RapidCacher.GetCache($"TarotFortune:{MsgDTO.FromQQ}", CommonUtil.UntilTommorow(), GetRandTarotFortune);

            SendTarotFortune(MsgDTO, fortune);
            return(true);
        }
Beispiel #3
0
        public bool RandomMajFortune(MsgInformationEx MsgDTO, object[] param)
        {
            var fortune = RapidCacher.GetCache($"MajFortune:{MsgDTO.FromQQ}", CommonUtil.UntilTommorow(), () => NewFortune(MsgDTO.FromQQ));
            var msg     = "今日麻将运势:" + $"\r\n整体运势:{Utility.LevelToStars(fortune.FortuneStar)} " + $"\r\n吉位:{fortune.Position} "
                          + $"\r\n牌运:{fortune.Kind} " + $"\r\n代表人物:{fortune.CharactorName} "
                          + $"\r\n{CodeApi.Code_Image(fortune.CharactorPath)}";

            MsgSender.PushMsg(MsgDTO, msg);
            return(true);
        }
Beispiel #4
0
        public bool RandomFortune(MsgInformationEx MsgDTO, object[] param)
        {
            var funtune = RapidCacher.GetCache($"RandomFortune:{MsgDTO.FromQQ}", CommonUtil.UntilTommorow(),
                                               () => new RandomFortuneCache {
                QQNum = MsgDTO.FromQQ, FortuneValue = GetRandomFortune(), BlessName = string.Empty, BlessValue = 0
            });

            ShowRandFortune(MsgDTO, funtune);
            return(true);
        }
Beispiel #5
0
 private static void SetFortune(RandomFortuneCache fortune)
 {
     RapidCacher.SetCache($"RandomFortune:{fortune.QQNum}", fortune, CommonUtil.UntilTommorow());
 }
Beispiel #6
0
 public string RandomCard(long FromQQ)
 {
     return(RapidCacher.GetCache($"TouhouCard:{FromQQ}", CommonUtil.UntilTommorow(), GetRandCard));
 }