feat: add frame

This commit is contained in:
2026-07-08 12:34:21 +03:30
parent 525cd554ef
commit b5420bac21
12 changed files with 280 additions and 13 deletions
+3
View File
@@ -169,6 +169,9 @@ func main() {
r.Get("/carpets", ecoH.Carpets)
r.Post("/shop/buy-carpet", ecoH.BuyCarpet)
r.Post("/shop/select-carpet", ecoH.SelectCarpet)
r.Get("/frames", ecoH.Frames)
r.Post("/shop/buy-frame", ecoH.BuyFrame)
r.Post("/shop/select-frame", ecoH.SelectFrame)
r.Post("/shop/purchase", ecoH.Purchase)
r.Post("/rewards/daily", ecoH.Daily)
r.Post("/rewards/ad", ecoH.AdReward)
+4 -4
View File
@@ -75,13 +75,13 @@ 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) {
// PlayerProfile سکه، نشانِ رتبه، آواتار و قابِ بازیکن را برای نمایش سرِ میز برمی‌گرداند.
func (g gameSettler) PlayerProfile(userID int64) (int64, 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
return p.Coins, p.RankTier, p.Avatar, p.SelectedFrame
}
// ChargeTicket یک بلیت برای بُرِ مجدد مصرف می‌کند (خطا اگر بلیت کافی نباشد).