Fix for low-level: pokememes with same name can be added to hand
This commit is contained in:
parent
68c5852ee5
commit
010a2395bf
@ -175,7 +175,7 @@ func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Playe
|
|||||||
pkName = strings.Replace(pkName, " ⭐", "", 1)
|
pkName = strings.Replace(pkName, " ⭐", "", 1)
|
||||||
pkName = strings.TrimSuffix(pkName, " ")
|
pkName = strings.TrimSuffix(pkName, " ")
|
||||||
pkName = strings.Split(pkName, "⃣ ")[1]
|
pkName = strings.Split(pkName, "⃣ ")[1]
|
||||||
pokememes[pkName] = pkAttack
|
pokememes[strconv.Itoa(pi)+"_"+pkName] = pkAttack
|
||||||
powerInt += c.Statistics.GetPoints(pkAttack)
|
powerInt += c.Statistics.GetPoints(pkAttack)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -284,7 +284,9 @@ func (u *Users) ParseProfile(update *tgbotapi.Update, playerRaw *dbmapping.Playe
|
|||||||
return "fail"
|
return "fail"
|
||||||
}
|
}
|
||||||
|
|
||||||
for meme, attack := range pokememes {
|
for n_meme, attack := range pokememes {
|
||||||
|
memeAry := strings.Split(n_meme, "_")
|
||||||
|
meme := memeAry[1]
|
||||||
rarity := "common"
|
rarity := "common"
|
||||||
if strings.HasPrefix(meme, "🔸") {
|
if strings.HasPrefix(meme, "🔸") {
|
||||||
rarity = "rare"
|
rarity = "rare"
|
||||||
|
Reference in New Issue
Block a user