Added code comment for #246
This commit is contained in:
@ -39,10 +39,10 @@ export default class ZoneUpdateEvent {
|
||||
) {}
|
||||
|
||||
public listen(): void {
|
||||
this.socket.on('gm:zone_editor:zone:update', this.handleZoneUpdate.bind(this))
|
||||
this.socket.on('gm:zone_editor:zone:update', this.handleEvent.bind(this))
|
||||
}
|
||||
|
||||
private async handleZoneUpdate(data: IPayload, callback: (response: Zone | null) => void): Promise<void> {
|
||||
private async handleEvent(data: IPayload, callback: (response: Zone | null) => void): Promise<void> {
|
||||
try {
|
||||
const character = await CharacterRepository.getById(this.socket.characterId as number)
|
||||
if (!character) {
|
||||
@ -146,6 +146,9 @@ export default class ZoneUpdateEvent {
|
||||
|
||||
callback(zone)
|
||||
|
||||
/**
|
||||
* @TODO #246: Reload zone for players who are currently in the zone
|
||||
*/
|
||||
zoneManager.unloadZone(data.zoneId)
|
||||
await zoneManager.loadZone(zone)
|
||||
} catch (error: any) {
|
||||
|
Reference in New Issue
Block a user