-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(niuniu): 出售牛牛 #1047
base: master
Are you sure you want to change the base?
feat(niuniu): 出售牛牛 #1047
Conversation
} | ||
money := wallet.GetWalletOf(uid) | ||
if money < 150 { | ||
ctx.SendChain(message.Text("赎牛牛需要150ATRI币,快去赚钱吧,目前仅有:", money, "个ATRI币")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ATRI币
不建议硬编码进去
可以用wallet.GetWalletName()
case niuniu > 15: | ||
money = int(niuniu * 10) | ||
message = randomChoice([]string{ | ||
fmt.Sprintf("你的牛牛已经离你而去了,你赚取了%d个ATRI币", money), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ATRI币
不建议硬编码进去
可以用wallet.GetWalletName()
err = errors.New("道具不存在") | ||
} | ||
if props == "伟哥" || props == "媚药" { | ||
err = errors.New("道具不能混着用哦") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得你直接return比较好🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没必要专门给第二个if判断return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你err最后不都被下面这个err = u.createUserInfoByProps(props);
覆盖了吗,那你上面这两个err的赋值不就没意义了
主要你ci没过
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
add:新玩法出售牛牛
fix:
1.注销牛牛需要atri币防止刷初始
2.增加赎牛牛触发机率
3.修改部分已知问题