hdkv
/
i2_bot
Archived
1
Fork 0

Fix error, when user tries to print it's profile without weapon

master
Vladimir Hodakov 2018-02-20 22:58:13 +04:00
parent 6a681669ab
commit 48679e85eb
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ func (u *Users) ProfileMessage(update *tgbotapi.Update, playerRaw *dbmapping.Pla
message += "\n💲" + c.Statistics.GetPrintablePoints(profileRaw.Wealth)
message += " |💎" + strconv.Itoa(profileRaw.Crystalls)
message += " |⭕" + strconv.Itoa(profileRaw.Pokeballs)
message += "\n⚔Атака: " + c.Statistics.GetPrintablePoints(weapon.Power) + " + " + c.Statistics.GetPrintablePoints(attackPokememes) + "\n"
if weapon != nil {
message += "\n⚔Атака: " + c.Statistics.GetPrintablePoints(weapon.Power) + " + " + c.Statistics.GetPrintablePoints(attackPokememes) + "\n"
} else {
message += "\n⚔Атака: " + c.Statistics.GetPrintablePoints(attackPokememes) + "\n"
}
if profileRaw.WeaponID != 0 {
message += "\n🔫Оружие: " + weapon.Name + " " + c.Statistics.GetPrintablePoints(weapon.Power) + "⚔"