diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-05-12 15:21:22 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-05-12 15:21:22 -0400 |
commit | ea528aef3470c5829c5f2c887b0be104f5adeafb (patch) | |
tree | d5fb76caac567d22c50964b34194d7e283ed2133 | |
parent | f9df1a84b4486eefc65fb91287c2c399531e5b37 (diff) | |
download | tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.gz tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.bz2 tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.xz tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.zip |
add undefined_gat check for SenWho::ALL_SAMEMAP
-rw-r--r-- | src/map/clif.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index bd7f4ef..d4b16a7 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -305,16 +305,19 @@ int clif_send(const Buffer& buf, dumb_ptr<block_list> bl, SendWho type, ClientVe } break; case SendWho::ALL_SAMEMAP: // 同じマップの全クライアントに送信 - for (io::FD i : iter_fds()) + if (bl->bl_m != borrow(undefined_gat)) { - Session *s = get_session(i); - if (!s) - continue; - dumb_ptr<map_session_data> sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s->session_data.get())); - if (sd && sd->state.auth && !sd->state.connect_new && sd->bl_m == bl->bl_m) + for (io::FD i : iter_fds()) { + Session *s = get_session(i); + if (!s) + continue; + dumb_ptr<map_session_data> sd = dumb_ptr<map_session_data>(static_cast<map_session_data *>(s->session_data.get())); + if (sd && sd->state.auth && !sd->state.connect_new && sd->bl_m == bl->bl_m) { - send_buffer(s, buf); + { + send_buffer(s, buf); + } } } } |