1
0
forked from noxious/server

stash work

This commit is contained in:
2024-09-09 19:27:33 +02:00
parent 4aad54604d
commit d7f441d570
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,20 @@
import { ExtendedCharacter } from '../utilities/types'
import { Zone } from '@prisma/client'
class CharacterManager {
private characters!: ExtendedCharacter[];
constructor() {
}
public addCharacterToZone(character: ExtendedCharacter) {
this.characters = [...this.characters, character]
}
public getCharactersByZone(zone: Zone) {
return this.characters.filter(x => x.zoneId === zone.id);
}
}