fuk it
This commit is contained in:
@ -2,6 +2,7 @@ import { Server } from 'socket.io'
|
||||
import { TSocket } from '../../../utilities/types'
|
||||
import ZoneRepository from '../../../repositories/zoneRepository'
|
||||
import { Zone } from '@prisma/client'
|
||||
import CharacterManager from '../../../managers/characterManager'
|
||||
|
||||
interface IPayload {
|
||||
zoneId: number
|
||||
@ -14,11 +15,12 @@ interface IPayload {
|
||||
*/
|
||||
export default function (socket: TSocket, io: Server) {
|
||||
socket.on('gm:zone_editor:zone:request', async (data: IPayload, callback: (response: Zone) => void) => {
|
||||
if (socket.character?.role !== 'gm') {
|
||||
const character = CharacterManager.getCharacterFromSocket(socket);
|
||||
if (character?.role !== 'gm') {
|
||||
return
|
||||
}
|
||||
|
||||
console.log(`---GM ${socket.character?.id} has requested zone via zone editor.`)
|
||||
console.log(`---GM ${character?.id} has requested zone via zone editor.`)
|
||||
|
||||
if (!data.zoneId) {
|
||||
console.log(`---Zone id not provided.`)
|
||||
|
Reference in New Issue
Block a user