private static RandomFortuneCache GetFortune(long QQNum) { return(RapidCacher.GetCache($"RandomFortune:{QQNum}", CommonUtil.UntilTommorow(), () => new RandomFortuneCache { QQNum = QQNum, FortuneValue = GetRandomFortune(), BlessName = string.Empty, BlessValue = 0 })); }
public bool TarotFortune(MsgInformationEx MsgDTO, object[] param) { var fortune = RapidCacher.GetCache($"TarotFortune:{MsgDTO.FromQQ}", CommonUtil.UntilTommorow(), GetRandTarotFortune); SendTarotFortune(MsgDTO, fortune); return(true); }
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); }
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); }
public string RandomCard(long FromQQ) { return(RapidCacher.GetCache($"TouhouCard:{FromQQ}", CommonUtil.UntilTommorow(), GetRandCard)); }