Removed if check since character is always in a map
This commit is contained in:
parent
562935c6e8
commit
67984f3e89
@ -38,13 +38,11 @@ class MapCharacter {
|
||||
await this.savePosition()
|
||||
|
||||
// Leave map and remove from manager
|
||||
if (this.character.map) {
|
||||
socket.leave(this.character.map.id)
|
||||
MapManager.removeCharacter(this.character.id)
|
||||
|
||||
// Notify map players
|
||||
io.in(this.character.map.id).emit(SocketEvent.MAP_CHARACTER_LEAVE, this.character.id)
|
||||
}
|
||||
|
||||
// Notify all players
|
||||
io.emit(SocketEvent.CHARACTER_DISCONNECT, this.character.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user