forked from noxious/server
fuk it
This commit is contained in:
@ -2,6 +2,7 @@ import { Server } from 'socket.io'
|
||||
import { TSocket } from '../../../../utilities/types'
|
||||
import { Sprite } from '@prisma/client'
|
||||
import SpriteRepository from '../../../../repositories/spriteRepository'
|
||||
import CharacterManager from '../../../../managers/characterManager'
|
||||
|
||||
interface IPayload {}
|
||||
|
||||
@ -12,8 +13,9 @@ interface IPayload {}
|
||||
*/
|
||||
export default function (socket: TSocket, io: Server) {
|
||||
socket.on('gm:sprite:list', async (data: any, callback: (response: Sprite[]) => void) => {
|
||||
if (socket.character?.role !== 'gm') {
|
||||
console.log(`---Character #${socket.character?.id} is not a game master.`)
|
||||
const character = CharacterManager.getCharacterFromSocket(socket);
|
||||
if (character?.role !== 'gm') {
|
||||
console.log(`---Character #${character?.id} is not a game master.`)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user