Ver código fonte

implement MC prios and trials no reserve

master
peter 5 anos atrás
pai
commit
3671f11749
2 arquivos alterados com 21 adições e 3 exclusões
  1. 2
    0
      src/backend/Components/Raid/RaidManager.ts
  2. 19
    3
      test/backendTest.ts

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

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

+ 19
- 3
test/backendTest.ts Ver arquivo

@@ -73,7 +73,7 @@ const testAccounts: protoAccount[] = [
73 73
         class: 'Druid',
74 74
         race: 'Night Elf',
75 75
         spec: 'Restoration',
76
-        rank: 'Raider'
76
+        rank: 'Trial'
77 77
     }, {
78 78
         name: 'Dagger',
79 79
         race: 'Dwarf',
@@ -259,8 +259,24 @@ describe('Frontcraft', () => {
259 259
             })
260 260
         }
261 261
 
262
-
263 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 280
             makePrio(
265 281
                 'Bracers of Arcane Accuracy',
266 282
                 { class: 'Warlock', specname: 'Demonology' },
@@ -507,7 +523,7 @@ describe('Frontcraft', () => {
507 523
             makePrio(
508 524
                 'Cloak of Draconic Might',
509 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 528
         ]).then(() => {
513 529
             const user = Object.values(users)[0]

Carregando…
Cancelar
Salvar