feat: add characters

This commit is contained in:
2026-07-10 00:56:03 +03:30
parent da6df0328f
commit fe0b63083c
19 changed files with 635 additions and 92 deletions
+5 -4
View File
@@ -75,13 +75,14 @@ func (g gameSettler) RecordGameResult(userID int64, won bool) {
g.eco.AddTournamentPoints(context.Background(), userID, won)
}
// PlayerProfile سکه، نشانِ رتبه، آواتار و قابِ بازیکن را برای نمایش سرِ میز برمی‌گرداند.
func (g gameSettler) PlayerProfile(userID int64) (int64, string, string, string) {
// PlayerProfile سکه، نشانِ رتبه، آواتار، قاب و شخصیتِ آواتارِ بازیکن را برای نمایشِ
// سرِ میز برمی‌گرداند.
func (g gameSettler) PlayerProfile(userID int64) (int64, string, string, string, string) {
p, err := g.eco.GetProfile(context.Background(), userID)
if err != nil || p == nil {
return 0, "", "", ""
return 0, "", "", "", ""
}
return p.Coins, p.RankTier, p.Avatar, p.SelectedFrame
return p.Coins, p.RankTier, p.Avatar, p.SelectedFrame, p.SelectedAvatarImg
}
// ChargeTicket یک بلیت برای بُرِ مجدد مصرف می‌کند (خطا اگر بلیت کافی نباشد).