implement loot system feedback
This commit is contained in:
@@ -102,6 +102,13 @@ implements TableDefinitionExporter, IAdmin {
|
||||
private startWebsocket(){
|
||||
this.rpcServer = new RPCServer(20000, [
|
||||
...this.frontworkComponents,
|
||||
{
|
||||
name: "debug",
|
||||
exportRPCs: () => [{
|
||||
name: 'dumpDb',
|
||||
call: async (table) => await this.knex(table).select('*')
|
||||
}]
|
||||
}
|
||||
], {
|
||||
visibility: '0.0.0.0'
|
||||
})
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Item, Character, SRToken, SRPriority, Spec } from "../../Types/Types"
|
||||
import { Item, Character, SRToken, SRPriority, Spec, Signup } from "../../Types/Types"
|
||||
|
||||
export class IItemManager{
|
||||
getItems: () => Promise<Item[]>
|
||||
fetchItem: (name:string) => Promise<Item>
|
||||
buyToken: (usertoken: string, charactername:string, itemname:string) => Promise<(SRToken & Character & Item) | void>
|
||||
buyToken: (usertoken: string, charactername:string, itemname:string, signup:Signup) => Promise<(SRToken & Character & Item) | void>
|
||||
setPriority: (itemname:string, priority: any) => Promise<void>
|
||||
calculatePriorities: (itemname: string, character:Character) => Promise<number>
|
||||
deletePriority: (priority:SRPriority) => Promise<void>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { T1, T2 } from "../../Types/Items";
|
||||
import { T1, T2, allItems, _Tiers } from "../../Types/Items";
|
||||
import { Inject, Injectable } from "../../Injector/ServiceDecorator";
|
||||
import { ItemManagerFeatureIfc, ItemManagerIfc } from "./RPCInterface";
|
||||
import { FrontworkComponent } from "../../Types/FrontworkComponent";
|
||||
import { TableDefinitionExporter } from "../../Types/Interfaces";
|
||||
import { TableDefiniton, Item, User, Character, SRToken, SRPriority, Spec } from "../../Types/Types";
|
||||
import { TableDefiniton, Item, User, Character, SRToken, SRPriority, Spec, Signup } from "../../Types/Types";
|
||||
import { IAdmin } from "../../Admin/Interface";
|
||||
import { IItemManager } from "./Interface";
|
||||
import { getLogger } from "log4js";
|
||||
@@ -87,19 +87,21 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
{
|
||||
name: 'tokens',
|
||||
tableBuilder: (table) => {
|
||||
table.primary(['characterid', 'itemid'])
|
||||
table.primary(['characterid', 'itemname'])
|
||||
table.integer("characterid")
|
||||
table.foreign("characterid").references("id").inTable('characters')
|
||||
table.integer("itemid")
|
||||
table.foreign("itemid").references("id").inTable('items')
|
||||
table.string("itemname")
|
||||
table.foreign("itemname").references("itemname").inTable('items')
|
||||
table.string("signupid").nullable()
|
||||
table.foreign("signupid").references("id").inTable('signups').onDelete('SET NULL')
|
||||
table.integer("level").defaultTo(1)
|
||||
}
|
||||
},{
|
||||
name: 'priorities',
|
||||
tableBuilder: (table) => {
|
||||
table.increments('id').primary()
|
||||
table.integer('itemid')
|
||||
table.foreign('itemid').references('id').inTable('items')
|
||||
table.string('itemname')
|
||||
table.foreign('itemname').references('itemname').inTable('items')
|
||||
table.string('race').nullable()
|
||||
table.integer('specid').nullable()
|
||||
table.foreign('specid').references('id').inTable('specs')
|
||||
@@ -109,17 +111,17 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
},{
|
||||
name: 'items',
|
||||
tableBuilder: (table) => {
|
||||
table.increments("id").primary()
|
||||
table.string('itemname').unique().notNullable()
|
||||
table.string('itemname').unique().notNullable().primary()
|
||||
table.string('iconname').notNullable()
|
||||
table.string('url').notNullable()
|
||||
table.string('quality').defaultTo('Epic').notNullable()
|
||||
table.boolean('hidden').defaultTo(false).notNullable()
|
||||
table.enu('tier', _Tiers).notNullable()
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
buyToken = async (usertoken: string, charactername:string, itemname:string): Promise<(SRToken & Character & Item) | void> => {
|
||||
buyToken = async (usertoken: string, charactername:string, itemname:string, signup: Signup): Promise<(SRToken & Character & Item) | void> => {
|
||||
const record = this.userManager.getUserRecordByToken(usertoken)
|
||||
const character = await this.character.getCharacterByName(charactername)
|
||||
|
||||
@@ -131,30 +133,62 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
const currency = await this.userManager.getCurrency(record.user)
|
||||
if(currency < 1) return
|
||||
|
||||
const existingToken = await this.getToken(character, item)
|
||||
const shadowTokens = await this.getTokens(character, false)
|
||||
const activeTokens = await this.getTokens(character, true)
|
||||
|
||||
await this.userManager.decrementCurrency(record.user, 1)
|
||||
const modifier = await this.calculatePriorities(itemname, character)
|
||||
|
||||
if(!existingToken){
|
||||
const modifier = await this.calculatePriorities(itemname, character)
|
||||
await this.admin.knex('tokens').insert({
|
||||
characterid: character.id,
|
||||
itemid: item.id,
|
||||
level: 1+modifier
|
||||
})
|
||||
}else{
|
||||
await this.admin.knex('tokens').where({
|
||||
characterid: character.id,
|
||||
itemid: item.id
|
||||
}).increment('level')
|
||||
//tokens with deleted signups
|
||||
if(shadowTokens.length > 0){
|
||||
//token for current item
|
||||
const matchingtoken = shadowTokens.find(token => token.itemname === itemname)
|
||||
if(matchingtoken){
|
||||
//update signupid and increment level
|
||||
|
||||
console.log("delete shadow tokens");
|
||||
|
||||
await this.admin
|
||||
.knex('tokens')
|
||||
.update({
|
||||
signupid: signup.id,
|
||||
level: matchingtoken.level+1
|
||||
})
|
||||
.where({
|
||||
characterid: character.id,
|
||||
itemname: item.itemname
|
||||
})
|
||||
return await this.getToken(character, item)
|
||||
}
|
||||
}
|
||||
|
||||
const matchingtoken = activeTokens.find(token => token.itemname === itemname)
|
||||
if(matchingtoken){
|
||||
//power up token
|
||||
await this.admin
|
||||
.knex('tokens')
|
||||
.increment('level')
|
||||
.where({
|
||||
signupid: signup.id,
|
||||
characterid: character.id,
|
||||
itemname: item.itemname
|
||||
})
|
||||
}else{
|
||||
await this.admin
|
||||
.knex('tokens')
|
||||
.insert({
|
||||
characterid: character.id,
|
||||
itemname: item.itemname,
|
||||
level: 1+modifier,
|
||||
signupid: signup.id
|
||||
})
|
||||
}
|
||||
return await this.getToken(character, item)
|
||||
}
|
||||
|
||||
getAllPriorities = async() :Promise<(SRPriority & Spec & Item)[]> => this.admin
|
||||
.knex('priorities as p')
|
||||
.join('items as i', 'p.itemid', '=', 'i.id')
|
||||
.join('items as i', 'p.itemname', '=', 'i.itemname')
|
||||
.leftJoin('specs as s', 'p.specid', '=', 's.id')
|
||||
.select('*')
|
||||
|
||||
@@ -170,24 +204,24 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
await this.admin
|
||||
.knex('priorities')
|
||||
.insert(<SRPriority>{
|
||||
itemid: item.id,
|
||||
itemname: item.itemname,
|
||||
...priority
|
||||
})
|
||||
}
|
||||
|
||||
getPriorities = async(itemname:string) : Promise<SRPriority[]> => {
|
||||
const item = await this.getItem(itemname)
|
||||
|
||||
return await this.admin.knex('priorities')
|
||||
.where('itemid', '=', item.id)
|
||||
return await this.admin
|
||||
.knex('priorities as p')
|
||||
.where('p.itemname', '=', itemname)
|
||||
.select('*')
|
||||
}
|
||||
|
||||
calculatePriorities = async (itemname: string, character:Character):Promise<number>=> {
|
||||
const rules : SRPriority[] = await this.admin.knex('priorities as p')
|
||||
const rules : SRPriority[] = await this.admin
|
||||
.knex('priorities as p')
|
||||
.select('*')
|
||||
.join('items as i', 'i.id', '=', 'p.itemid')
|
||||
.where('itemname', '=', itemname)
|
||||
.join('items as i', 'i.itemname', '=', 'p.itemname')
|
||||
.where('p.itemname', '=', itemname)
|
||||
|
||||
return rules.map(rule => {
|
||||
if(rule.specid && rule.race){
|
||||
@@ -219,28 +253,37 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
.knex('tokens as t')
|
||||
.select('*')
|
||||
.join('characters as c', 'c.id', '=', 't.characterid')
|
||||
.join('items as i', 'i.id', '=', 't.itemid')
|
||||
.join('items as i', 'i.itemname', '=', 't.itemname')
|
||||
.where({
|
||||
characterid: character.id,
|
||||
itemid: item.id
|
||||
"i.itemname": item.itemname
|
||||
})
|
||||
.first()
|
||||
}
|
||||
|
||||
getTokens = async (character:Character) : Promise<(SRToken & Character & Item)[]> => {
|
||||
getTokens = async (character:Character, valid=true) : Promise<(SRToken & Character & Item)[]> => {
|
||||
return await this.admin
|
||||
.knex('tokens as t')
|
||||
.select('*')
|
||||
.select('*')
|
||||
.join('characters as c', 'c.id', '=', 't.characterid')
|
||||
.join('items as i', 'i.id', '=', 't.itemid')
|
||||
.join('items as i', 'i.itemname', '=', 't.itemname')
|
||||
.where({
|
||||
characterid: character.id,
|
||||
})
|
||||
.andWhere(function(){
|
||||
if(valid){
|
||||
this.whereNotNull('t.signupid')
|
||||
}else{
|
||||
this.whereNull('t.signupid')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
countItems = async() :Promise<number> => {
|
||||
const count = await this.admin.knex('items').count('*');
|
||||
const count = await this.admin
|
||||
.knex('items')
|
||||
.count('*');
|
||||
|
||||
return <number>count[0]['count(*)']
|
||||
}
|
||||
|
||||
@@ -249,20 +292,24 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
|
||||
if(this.initialized) return
|
||||
this.initialized = true
|
||||
|
||||
const allItems = [...T1, ...T2]
|
||||
const itemTiers = allItems
|
||||
|
||||
const countCache = await this.countItems()
|
||||
getLogger('ItemManager').debug('Checking items, got: ',countCache, 'expected: ', allItems.length)
|
||||
|
||||
if(countCache != allItems.length){
|
||||
const items:Item[] = await Promise.all(allItems.map((i) => this.fetchItem(i)))
|
||||
try{
|
||||
await this.admin
|
||||
.knex('items')
|
||||
.insert(items)
|
||||
}catch(e){
|
||||
getLogger('ItemManager').debug("Skipping item insertion")
|
||||
}
|
||||
if(countCache != Object.values(itemTiers).flat().length){
|
||||
await Promise.all(
|
||||
Object.entries(itemTiers)
|
||||
.map((kv) => Promise.all(
|
||||
kv[1].map(i => this.fetchItem(i)
|
||||
.then(item => this.admin
|
||||
.knex('items')
|
||||
.insert({
|
||||
tier: kv[0],
|
||||
...item
|
||||
})
|
||||
))
|
||||
))
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Raid, Signup, Character, RaidData } from "../../Types/Types"
|
||||
import { Raid, Signup, Character, RaidData, User, Spec } from "../../Types/Types"
|
||||
|
||||
export class IRaidManager{
|
||||
getRaids: () => Promise<Raid[]>
|
||||
createRaid: (raid:Raid) => Promise<any>
|
||||
addSignup: (signup: Signup) => Promise<any>
|
||||
removeSignup: (signup: Signup) => Promise<any>
|
||||
getSignups: (raid:Raid) => Promise<Signup[]>
|
||||
getSignups: (raid:Raid) => Promise<(Signup & Character & Spec & User)[]>
|
||||
sign: (userToken: string, character:Character, raid:Raid, late:boolean) => Promise<any>
|
||||
unsign: (userToken: string, character:Character, raid:Raid,) => Promise<any>
|
||||
archiveRaid: (raid:Raid) => Promise<RaidData>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Inject, Injectable } from "../../Injector/ServiceDecorator";
|
||||
import { RaidManagerIfc, RaidManagerFeatureIfc } from "./RPCInterface";
|
||||
import { FrontworkComponent } from "../../Types/FrontworkComponent";
|
||||
import { TableDefiniton, Signup, Raid, Character, RaidData, Spec, SRToken, Item } from "../../Types/Types";
|
||||
import { TableDefiniton, Signup, Raid, Character, RaidData, Spec, SRToken, Item, User } from "../../Types/Types";
|
||||
import { IAdmin } from "../../Admin/Interface";
|
||||
import { IRaidManager } from "./Interface";
|
||||
import { IUserManager } from "../User/Interface";
|
||||
import { ICharacterManager } from "../Character/Interface";
|
||||
import { _Tiers } from "../../Types/Items";
|
||||
|
||||
@Injectable(IRaidManager)
|
||||
export class RaidManager
|
||||
@@ -59,6 +60,7 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
table.string('description').notNullable()
|
||||
table.string('title').notNullable()
|
||||
table.integer('size').defaultTo(40)
|
||||
table.enu('tier', _Tiers).defaultTo(null as any)
|
||||
}
|
||||
},{
|
||||
name: 'archive',
|
||||
@@ -69,7 +71,8 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
},{
|
||||
name: 'signups',
|
||||
tableBuilder: (table) => {
|
||||
table.primary(['raidid', 'characterid'])
|
||||
table.increments('id').primary()
|
||||
table.unique(['raidid', 'characterid'])
|
||||
table.integer('raidid')
|
||||
table.foreign('raidid').references('id').inTable('raids').onDelete('CASCADE')
|
||||
table.integer('characterid')
|
||||
@@ -95,7 +98,7 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
raid_id: signup.raidid,
|
||||
character_id: signup.characterid
|
||||
})
|
||||
.delete()
|
||||
.del()
|
||||
|
||||
getRaids = async () : Promise<Raid[]> => {
|
||||
|
||||
@@ -116,7 +119,6 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
|
||||
startRaid = async (raid:Raid) : Promise<RaidData> => {
|
||||
const archived = await this.archiveRaid(raid)
|
||||
|
||||
delete archived.participants.late
|
||||
|
||||
const giveCurrency = async (b: Character) => {
|
||||
@@ -138,8 +140,17 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
.insert({
|
||||
id:raidData.id,
|
||||
raiddata: JSON.stringify(raidData)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
await Promise.all(
|
||||
Object.values(raidData.participants).flat().flatMap((signup) => this.admin
|
||||
.knex('tokens')
|
||||
.where({
|
||||
characterid: signup.characterid,
|
||||
signupid: null
|
||||
})
|
||||
.del()
|
||||
))
|
||||
|
||||
await this.admin.knex('raids')
|
||||
.where('id', '=', raid.id)
|
||||
@@ -175,17 +186,17 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
getRaidData = async (raid:Raid) : Promise<RaidData> => {
|
||||
const ret = {
|
||||
participants:{
|
||||
Druid: <(Character&Spec)[]>[],
|
||||
Hunter: <(Character&Spec)[]>[],
|
||||
Mage: <(Character&Spec)[]>[],
|
||||
Paladin: <(Character&Spec)[]>[],
|
||||
Priest: <(Character&Spec)[]>[],
|
||||
Rogue: <(Character&Spec)[]>[],
|
||||
Shaman: <(Character&Spec)[]>[],
|
||||
Warlock: <(Character&Spec)[]>[],
|
||||
Warrior: <(Character&Spec)[]>[],
|
||||
late: <(Character&Spec)[]>[],
|
||||
bench: <(Character&Spec)[]>[],
|
||||
Druid: <(Signup&Character&Spec)[]>[],
|
||||
Hunter: <(Signup&Character&Spec)[]>[],
|
||||
Mage: <(Signup&Character&Spec)[]>[],
|
||||
Paladin: <(Signup&Character&Spec)[]>[],
|
||||
Priest: <(Signup&Character&Spec)[]>[],
|
||||
Rogue: <(Signup&Character&Spec)[]>[],
|
||||
Shaman: <(Signup&Character&Spec)[]>[],
|
||||
Warlock: <(Signup&Character&Spec)[]>[],
|
||||
Warrior: <(Signup&Character&Spec)[]>[],
|
||||
late: <(Signup&Character&Spec)[]>[],
|
||||
bench: <(Signup&Character&Spec)[]>[],
|
||||
},
|
||||
tokens:{}
|
||||
}
|
||||
@@ -205,9 +216,9 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
.where('id','=',raid.id)
|
||||
.first()
|
||||
|
||||
const characterData: (Character & Spec & Signup)[] = await this.admin
|
||||
const characterData: (Signup & Character & Spec)[] = await this.admin
|
||||
.knex('signups as s')
|
||||
.select('characterid as id', 'charactername', 'class', 'specname', 'race', 'userid', 'benched', 'late', 'raidid', 'characterid')
|
||||
.select('s.id as id', 'charactername', 'class', 'specname', 'race', 'userid', 'benched', 'late', 'raidid', 'characterid')
|
||||
.join('raids as r', 's.raidid','=','r.id')
|
||||
.join('characters as c', 's.characterid','=','c.id')
|
||||
.join('users as u', 'c.userid','=','u.id')
|
||||
@@ -228,12 +239,15 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
|
||||
const tokenData: (Character & SRToken & Item)[] = await this.admin
|
||||
.knex('signups as s')
|
||||
.select('*')
|
||||
.select('*', 's.id as id')
|
||||
.join('raids as r', 's.raidid','=','r.id')
|
||||
.where('r.id','=',raid.id)
|
||||
.andWhere(function(){
|
||||
this.whereNotNull('t.signupid')
|
||||
})
|
||||
.join('characters as c', 's.characterid','=','c.id')
|
||||
.join('tokens as t', 't.characterid','=','c.id')
|
||||
.join('items as i', 'i.id','=','t.itemid')
|
||||
.join('items as i', 'i.itemname','=','t.itemname')
|
||||
|
||||
tokenData.forEach(data => {
|
||||
if(!ret.tokens[data.itemname])
|
||||
@@ -246,12 +260,12 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
}
|
||||
}
|
||||
|
||||
getSignups = async (raid:Raid) : Promise<Signup[]> => await this.admin
|
||||
.knex('signups')
|
||||
getSignups = async (raid:Raid) : Promise<(Signup & Character & Spec & User)[]> => await this.admin
|
||||
.knex('signups as si')
|
||||
.join('characters as c', 'c.id', '=', 'characterid')
|
||||
.join('specs as s', 's.id', '=', 'specid')
|
||||
.join('users as u', 'u.id', '=', 'userid')
|
||||
.select('*')
|
||||
.select('*','si.id as id')
|
||||
.where('raidid', '=', raid.id!)
|
||||
|
||||
sign = async (usertoken:string, character:Character, raid:Raid, late:boolean) => {
|
||||
@@ -286,6 +300,15 @@ implements FrontworkComponent<RaidManagerIfc, RaidManagerFeatureIfc>, IRaidManag
|
||||
late: late
|
||||
})
|
||||
}
|
||||
|
||||
return await this.admin
|
||||
.knex('signups')
|
||||
.select('*')
|
||||
.where({
|
||||
raidid: raid.id!,
|
||||
characterid: character.id!,
|
||||
})
|
||||
.first()
|
||||
}
|
||||
|
||||
unsign = async (usertoken:string, character:Character, raid:Raid) => {
|
||||
|
||||
@@ -118,14 +118,13 @@ implements FrontworkComponent<UserManagerIfc, UserManagerFeatureIfc>, IUserManag
|
||||
initialize = async () => {
|
||||
this.exporters = [this.guild, this.item, this.raid, this.character]
|
||||
//set up permissions
|
||||
getLogger('UserManager').debug('inserting permissions')
|
||||
getLogger('UserManager').debug('setting up permissions')
|
||||
|
||||
await Promise.all(
|
||||
[this, ...this.exporters].flatMap(exp => exp.exportRPCFeatures().map(async (feature) => {
|
||||
try{
|
||||
await this.admin.knex.insert({ rpcname: feature.name }).into('rpcpermissions')
|
||||
}catch(e){
|
||||
getLogger('UserManager').debug(feature.name);
|
||||
}
|
||||
})))
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
export type Tiers = "MC" | 'BWL' | 'ZG' | 'AQ20' | 'AQ40' | 'Naxx'
|
||||
export const _Tiers = ["MC", 'BWL', 'ZG', 'AQ20', 'AQ40', 'Naxx']
|
||||
|
||||
export const T1 = [
|
||||
"Robe of Volatile Power",
|
||||
"Salamander Scale Pants",
|
||||
@@ -132,4 +135,17 @@ export const T2:string[] = [
|
||||
"Draconic Avenger",
|
||||
"Interlaced Shadow Jerkin",
|
||||
"Ringo's Blizzard Boots"
|
||||
]
|
||||
]
|
||||
|
||||
export type AllItems = {
|
||||
[tier in Tiers] : string[]
|
||||
}
|
||||
|
||||
export const allItems : AllItems = {
|
||||
MC: T1,
|
||||
BWL: T2,
|
||||
ZG:[],
|
||||
AQ20: [],
|
||||
AQ40: [],
|
||||
Naxx: []
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { CharacterManagerIfc, CharacterManagerFeatureIfc } from "../Components/C
|
||||
import { ItemManagerFeatureIfc, ItemManagerIfc } from "../Components/Item/RPCInterface";
|
||||
import { GuildManagerFeatureIfc, GuildManagerIfc } from "../Components/Guild/RPCInterface";
|
||||
import { ShoutboxIfc } from "../Components/Shoutbox/RPCInterface";
|
||||
import { Tiers } from "./Items";
|
||||
|
||||
export type FrontcraftIfc = RaidManagerIfc
|
||||
& UserManagerIfc
|
||||
@@ -49,10 +50,10 @@ export type RPCPermission = {
|
||||
|
||||
export type RaidData = Raid & {
|
||||
participants: {
|
||||
[clazz in Class] : (Character & Spec)[]
|
||||
[clazz in Class] : (Signup & Character & Spec)[]
|
||||
} & {
|
||||
late: (Character & Spec)[]
|
||||
bench: (Character & Spec)[]
|
||||
late: (Signup & Character & Spec)[]
|
||||
bench: (Signup & Character & Spec)[]
|
||||
}
|
||||
tokens: {
|
||||
[itemname in string]: (Character & SRToken & Item)[]
|
||||
@@ -60,8 +61,9 @@ export type RaidData = Raid & {
|
||||
}
|
||||
|
||||
export type SRToken = {
|
||||
signupid?:number
|
||||
characterid: number,
|
||||
itemid: number,
|
||||
itemname: string,
|
||||
level: number
|
||||
}
|
||||
|
||||
@@ -69,18 +71,18 @@ export type SRPriority = {
|
||||
id?:number
|
||||
race?:Race
|
||||
specid?:number,
|
||||
itemid?:number,
|
||||
itemname?:string,
|
||||
description?:string,
|
||||
modifier:number
|
||||
}
|
||||
|
||||
export type Item = {
|
||||
id?:number
|
||||
itemname:string
|
||||
iconname:string
|
||||
url:string
|
||||
quality:string
|
||||
hidden:boolean
|
||||
tier: Tiers
|
||||
}
|
||||
|
||||
export type User = {
|
||||
@@ -98,9 +100,11 @@ export type Raid = {
|
||||
start: string
|
||||
signupcount?: number
|
||||
size: number
|
||||
tier: Tiers
|
||||
}
|
||||
|
||||
export type Signup = {
|
||||
id?:number
|
||||
raidid: number
|
||||
characterid: number
|
||||
benched: boolean
|
||||
|
||||
Reference in New Issue
Block a user