hdkv
/
i2_bot
Archived
1
Fork 0

Fix for low-level: pokememes with same name can be added to hand

master
Vladimir Hodakov 2017-12-02 18:25:24 +04:00
parent 68c5852ee5
commit 010a2395bf
1 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,7 @@ func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Playe
pkName = strings.Replace(pkName, " ⭐", "", 1)
pkName = strings.TrimSuffix(pkName, " ")
pkName = strings.Split(pkName, "⃣ ")[1]
pokememes[pkName] = pkAttack
pokememes[strconv.Itoa(pi)+"_"+pkName] = pkAttack
powerInt += c.Statistics.GetPoints(pkAttack)
}
}
@ -284,7 +284,9 @@ func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Playe
return "fail"
}
for meme, attack := range pokememes {
for n_meme, attack := range pokememes {
memeAry := strings.Split(n_meme, "_")
meme := memeAry[1]
rarity := "common"
if strings.HasPrefix(meme, "🔸") {
rarity = "rare"