diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4d955fa5..605c0f32 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -53,7 +53,7 @@ jobs: - name: Package Clear uses: actions/delete-package-versions@v4 with: - package-name: vcpkg-cmake_x64-windows + package-name: vcpkg-cmake-get-vars_x64-windows package-type: nuget min-versions-to-keep: 1 token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dice/DiceEvent.cpp b/Dice/DiceEvent.cpp index fe533dbe..19e3022c 100644 --- a/Dice/DiceEvent.cpp +++ b/Dice/DiceEvent.cpp @@ -71,7 +71,7 @@ AttrGetters MsgIndexs{ }}, {"grpAuth", idx_gAuth}, {"game", [](const AttrObject& obj) { - if (AttrVar game{sessions.get_if(*obj)}) { + if (AttrVar game{ sessions.get_if(*obj)} ) { return obj->at("game") = game; } return AttrVar(); @@ -4059,8 +4059,8 @@ int DiceEvent::InnerOrder() { } else if (size_t pos{ attr.find("的") }; pos != string::npos) { string strGenitive = attr.substr(0, pos); - if (PList[fromChat.uid].count(strGenitive)) { - pc = PList[fromChat.uid][strGenitive]; + if (pl.count(strGenitive)) { + pc = pl[strGenitive]; set("pc", pc->getName()); attr = attr.substr(pos + 2); } @@ -4168,8 +4168,8 @@ int DiceEvent::InnerOrder() { '=' || strLowerMessage[intMsgCnt] == ':')intMsgCnt++; //判定数值修改 if ((strLowerMessage[intMsgCnt] == '-' || strLowerMessage[intMsgCnt] == '+')) { - AttrVar& attr_old{ trans->at("old") = pc->get(attr_name) }; - RD Mod(attr_old.to_str() + readDice()); + trans->at("old") = pc->get(attr_name); + RD Mod(trans->get_str("old") + readDice()); if (int eno{ Mod.Roll() }; !eno) { trans->set("action", "+="); trans->set("expr", Mod.FormCompleteString()); diff --git a/Dice/DiceSchedule.cpp b/Dice/DiceSchedule.cpp index b6d6e668..754aa990 100644 --- a/Dice/DiceSchedule.cpp +++ b/Dice/DiceSchedule.cpp @@ -178,7 +178,7 @@ void DiceScheduler::end() { AttrVar DiceToday::getJrrp(long long uid) { if (UserInfo.count(uid) && UserInfo[uid]->has("jrrp")) - return UserInfo[uid]["jrrp"]; + return UserInfo[uid]->get("jrrp"); string frmdata = "QQ=" + to_string(console.DiceMaid) + "&v=20190114" + "&QueryQQ=" + to_string(uid); string res; if (Network::POST("http://api.kokona.tech:5555/jrrp", frmdata, "", res)) { @@ -191,7 +191,7 @@ AttrVar DiceToday::getJrrp(long long uid) { AnysTable{ {"res", res} } ), 0); } - return UserInfo[uid]["jrrp_local"]; + return UserInfo[uid]->get("jrrp_local"); } }