diff --git a/Dice/DiceAttrVar.cpp b/Dice/DiceAttrVar.cpp index 98779b57..704c2665 100644 --- a/Dice/DiceAttrVar.cpp +++ b/Dice/DiceAttrVar.cpp @@ -326,6 +326,8 @@ AttrVar AttrVar::operator+(const AttrVar& other) { return (sum == (int)sum) ? (int)sum : ((sum == (long long)sum) ? (long long)sum : sum); } + else if (type == Type::Text || other.type == Type::Text) + return to_str() + other.to_str(); return other ? AttrVar() : *this; } diff --git a/Dice/DiceEvent.cpp b/Dice/DiceEvent.cpp index 71e79c34..6f8c7dbb 100644 --- a/Dice/DiceEvent.cpp +++ b/Dice/DiceEvent.cpp @@ -3378,6 +3378,9 @@ int DiceEvent::InnerOrder() { if (is_empty("show"))replyMsg("strPcNewEmptyCard"); else replyMsg("strPcNewCardShow"); } + else { + set("char", strPC); + } } else if (strOption == "build") { string strPC{ strip(filter_CQcode(readRest(), fromChat.gid))}; @@ -3387,6 +3390,9 @@ int DiceEvent::InnerOrder() { set("char", pc->getName()); replyMsg("strPcCardBuild"); } + else { + set("char", strPC); + } } else if (strOption == "list") { set("show",pl.listCard()); @@ -3397,6 +3403,7 @@ int DiceEvent::InnerOrder() { string& strPC{ (at("new_name") = strip(filter_CQcode(readRest(),fromChat.gid))).text}; set("old_name",pl[fromChat.gid]->getName()); if (!(resno = pl.renameCard(get_str("old_name"), strPC)))replyMsg("strPcCardRename"); + else set("char", strPC); } else if (strOption == "del") { set("char",strip(readRest()));