Dont TP GM if already in given zone
This commit is contained in:
parent
5b2bea0dbe
commit
4a3a660f12
@ -49,6 +49,11 @@ export default class TeleportCommandEvent {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.socket.character.zoneId === zone.id) {
|
||||
this.socket.emit('notification', { title: 'Server message', message: 'You are already in that zone' })
|
||||
return
|
||||
}
|
||||
|
||||
// Remove character from current zone
|
||||
this.io.to(this.socket.character.zoneId.toString()).emit('zone:character:leave', this.socket.character.id)
|
||||
this.socket.leave(this.socket.character.zoneId.toString())
|
||||
|
Loading…
x
Reference in New Issue
Block a user