Fix error, when user tries to print it's profile without weapon
This commit is contained in:
parent
6a681669ab
commit
48679e85eb
@ -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)
|
||||
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) + "⚔"
|
||||
|
Reference in New Issue
Block a user