AreaAudience should be refactored. The logic inside getBroadcastTargets() should be moved into Area#getBroadcastTargets() thereby making an Area broadcastable. In doing this the method should also be updated to return the area instance itself as well as the room instances.
When sending a message to an AreaAudience the area, all rooms in the area, all players in the area, and all NPCs in the area should receive the channelReceive event. As such the Area#getBroadcastTargets() should look something like:
AreaAudience
should be refactored. The logic insidegetBroadcastTargets()
should be moved intoArea#getBroadcastTargets()
thereby making anArea
broadcastable. In doing this the method should also be updated to return the area instance itself as well as the room instances.When sending a message to an AreaAudience the area, all rooms in the area, all players in the area, and all NPCs in the area should receive the
channelReceive
event. As such theArea#getBroadcastTargets()
should look something like: