Explorar el Código

implement MC prios and trials no reserve

master
peter hace 5 años
padre
commit
3671f11749
Se han modificado 2 ficheros con 21 adiciones y 3 borrados
  1. 2
    0
      src/backend/Components/Raid/RaidManager.ts
  2. 19
    3
      test/backendTest.ts

+ 2
- 0
src/backend/Components/Raid/RaidManager.ts Ver fichero

289
             .select('*', 's.id as id')
289
             .select('*', 's.id as id')
290
             .join('raids as r', 's.raidid', '=', 'r.id')
290
             .join('raids as r', 's.raidid', '=', 'r.id')
291
             .join('characters as c', 's.characterid', '=', 'c.id')
291
             .join('characters as c', 's.characterid', '=', 'c.id')
292
+            .join('users as u', 'u.id', '=' ,'c.userid')
292
             .join(raidInDb.tier + 'tokens as t', 't.characterid', '=', 'c.id')
293
             .join(raidInDb.tier + 'tokens as t', 't.characterid', '=', 'c.id')
293
             .join('items as i', 'i.itemname', '=', 't.itemname')
294
             .join('items as i', 'i.itemname', '=', 't.itemname')
294
             .where({
295
             .where({
295
                 'r.id': raid.id,
296
                 'r.id': raid.id,
296
             })
297
             })
297
             .andWhere(function () {
298
             .andWhere(function () {
299
+                this.whereNotIn('u.rank', ['Trial', 'Guest'])
298
                 this.whereNotNull('t.signupid')
300
                 this.whereNotNull('t.signupid')
299
             })
301
             })
300
 
302
 

+ 19
- 3
test/backendTest.ts Ver fichero

73
         class: 'Druid',
73
         class: 'Druid',
74
         race: 'Night Elf',
74
         race: 'Night Elf',
75
         spec: 'Restoration',
75
         spec: 'Restoration',
76
-        rank: 'Raider'
76
+        rank: 'Trial'
77
     }, {
77
     }, {
78
         name: 'Dagger',
78
         name: 'Dagger',
79
         race: 'Dwarf',
79
         race: 'Dwarf',
259
             })
259
             })
260
         }
260
         }
261
 
261
 
262
-
263
         Promise.all([
262
         Promise.all([
263
+            makePrio(
264
+                'Quick Strike Ring',
265
+                { class: 'Warrior', specname: 'Fury' },
266
+                undefined, 2, "str-to-ap bias"
267
+            ),
268
+            makePrio(
269
+                'Quick Strike Ring',
270
+                { class: 'Druid', specname: 'Feral (DPS)' },
271
+                undefined, 2, "str-to-ap bias"
272
+            ),
273
+
274
+            makePrio(
275
+                'Band of Accuria',
276
+                { class: 'Warrior', specname: 'Protection' },
277
+                undefined, 2, "hit bias"
278
+            ),
279
+
264
             makePrio(
280
             makePrio(
265
                 'Bracers of Arcane Accuracy',
281
                 'Bracers of Arcane Accuracy',
266
                 { class: 'Warlock', specname: 'Demonology' },
282
                 { class: 'Warlock', specname: 'Demonology' },
507
             makePrio(
523
             makePrio(
508
                 'Cloak of Draconic Might',
524
                 'Cloak of Draconic Might',
509
                 { class: 'Druid', specname: 'Feral (DPS)' },
525
                 { class: 'Druid', specname: 'Feral (DPS)' },
510
-                undefined, 1, "str-to-ap bias"
526
+                undefined, 3, "str-to-ap + agi-to-ap bias"
511
             ),
527
             ),
512
         ]).then(() => {
528
         ]).then(() => {
513
             const user = Object.values(users)[0]
529
             const user = Object.values(users)[0]

Loading…
Cancelar
Guardar