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