WIP metadata
This commit is contained in:
parent
f21d4df854
commit
d47eb1a3ca
@ -23,6 +23,7 @@ let readItem (reader : RowReader) =
|
||||
{ TargetStat = stat ; Effect = fx }
|
||||
{ Item.Id = reader.int "id"
|
||||
Item.Name = reader.string "name"
|
||||
Item.Description = reader.string "description"
|
||||
Item.IconUrl = reader.string "icon"
|
||||
Item.Symbol = reader.string "symbol"
|
||||
Item.Type =
|
||||
@ -56,7 +57,7 @@ let getPlayerInventory (did : uint64) =
|
||||
|> Sql.connect
|
||||
|> Sql.parameters [ "did", Sql.string (string did) ]
|
||||
|> Sql.query """
|
||||
SELECT ii.id,ii.symbol,name,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
SELECT ii.id,ii.symbol,name,description,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
attack_power,defense_power,class_name,max_stack,mods
|
||||
FROM inventory_item
|
||||
JOIN item ii on inventory_item.item_id = ii.id
|
||||
@ -92,7 +93,7 @@ let getStoreItems (channelId : uint64) =
|
||||
|> Sql.connect
|
||||
|> Sql.parameters [ "cid", Sql.string (string channelId) ]
|
||||
|> Sql.query """
|
||||
SELECT i.id,i.symbol,name,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
SELECT i.id,i.symbol,name,description,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
attack_power,defense_power,class_name,max_stack,mods
|
||||
FROM store_item
|
||||
JOIN store st on store_item.store_id = st.id
|
||||
@ -106,7 +107,7 @@ let getWeapons () =
|
||||
connStr
|
||||
|> Sql.connect
|
||||
|> Sql.query """
|
||||
SELECT i.id,i.symbol,name,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
SELECT i.id,i.symbol,name,description,icon,category,buy_price,sell_price,rate_limit,expiration,drop_chance,can_trade,can_consume,
|
||||
attack_power,defense_power,class_name,max_stack,mods
|
||||
FROM item WHERE category = 'Hack' OR symbol = 'Shield'
|
||||
"""
|
||||
|
@ -132,6 +132,7 @@ let (|CanStack|_|) itemAttrs = itemAttrs |> List.tryPick (function Stackable
|
||||
type Item = {
|
||||
Id : int
|
||||
Name : string
|
||||
Description : string
|
||||
Type : ItemType
|
||||
Symbol : string
|
||||
IconUrl : string
|
||||
|
@ -162,8 +162,9 @@ let purchaseItemEmbed (item : Item) =
|
||||
embed.Title <- $"Purchased {item.Name}"
|
||||
match item.Type with
|
||||
| ItemType.Jpeg ->
|
||||
if item.Symbol = "RAFFLE" then
|
||||
if item.Symbol.Contains "RAFFLE" then
|
||||
embed.Description <- $"Congratulations! You are in the draw for the {item.Name}. The winner will be announced shortly"
|
||||
embed.ImageUrl <- item.Description
|
||||
else
|
||||
embed.Description <- $"Congratulations! You own the rights to the {item.Name} NFT. Please create a ticket in the support channel and we will transfer to your wallet"
|
||||
| _ -> embed.Description <- $"Purchased {item.Name}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user