This commit is contained in:
Enrico Marconi 2020-10-18 11:03:02 +02:00
parent f6692aee74
commit 80b863da3b

View File

@ -269,8 +269,7 @@ impl StateExt for State {
});
match &msg.chat_type {
comp::ChatType::Online(_)
| comp::ChatType::Offline(_)
comp::ChatType::Offline(_)
| comp::ChatType::CommandInfo
| comp::ChatType::CommandError
| comp::ChatType::Loot
@ -279,6 +278,18 @@ impl StateExt for State {
| comp::ChatType::World(_) => {
self.notify_registered_clients(ServerGeneral::ChatMsg(resolved_msg))
},
comp::ChatType::Online(u) => {
for (client, uid) in (
&mut ecs.write_storage::<Client>(),
&ecs.read_storage::<Uid>(),
)
.join()
{
if uid != u {
client.send_msg(ServerGeneral::ChatMsg(resolved_msg.clone()));
}
}
},
comp::ChatType::Tell(u, t) => {
for (client, uid) in (
&mut ecs.write_storage::<Client>(),