You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package mihoyo
import (
"GenshinImpact/global"
"GenshinImpact/thirdpart"
"fmt"
"strconv"
)
func BeginWorkDay() {
note, err := GetGenshinDailyNote(global.MiCookie, global.MiUid, global.MiServer)
if err != nil {
fmt.Println(err.Error())
thirdpart.SendWechat("请求米哈游服务器失败:" + err.Error())
}
if note.CurrentResin >= global.NoticeResinLimit {
thirdpart.SendWechat("树脂达到限制:" + strconv.Itoa(note.CurrentResin))
NoticeTransformer(note)
NoticeHomeCoin(note)
}
if !note.IsExtraTaskRewardReceived {
if note.FinishedTaskNum < 4 {
thirdpart.SendWechat("今日委托任务未完成")
} else {
thirdpart.SendWechat("今日委托奖励未领取")
}
NoticeTransformer(note)
NoticeHomeCoin(note)
}
}
func BeginWorkEnd() {
note, err := GetGenshinDailyNote(global.MiCookie, global.MiUid, global.MiServer)
if err != nil {
fmt.Println(err.Error())
thirdpart.SendWechat("请求米哈游服务器失败:" + err.Error())
}
if note.CurrentResin >= global.NoticeResinLimit {
thirdpart.SendWechat("树脂达到限制:" + strconv.Itoa(note.CurrentResin))
NoticeTransformer(note)
NoticeHomeCoin(note)
}
if !note.IsExtraTaskRewardReceived {
if note.FinishedTaskNum < 4 {
thirdpart.SendWechat("今日委托任务未完成")
} else {
thirdpart.SendWechat("今日委托奖励未领取")
}
NoticeTransformer(note)
NoticeHomeCoin(note)
}
//周末再统计boss周本信息
NoticeWeeklyBoos(note)
}
func NoticeHomeCoin(note *GenshinDailyNote) {
if note.CurrentHomeCoin >= global.NoticeHomeCoinLimit {
thirdpart.SendWechat("洞天宝钱达到限制:" + strconv.Itoa(note.CurrentHomeCoin))
}
}
func NoticeWeeklyBoos(note *GenshinDailyNote) {
if note.RemainResinDiscountNum > 0 {
thirdpart.SendWechat("本周BOOS未刷完剩余" + strconv.Itoa(note.RemainResinDiscountNum) + "次")
}
}
func NoticeTransformer(note *GenshinDailyNote) {
if note.Transformer.RecTime.Reached {
thirdpart.SendWechat("参量质变仪已就绪")
}
}