summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-12 15:21:22 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-12 15:21:22 -0400
commitea528aef3470c5829c5f2c887b0be104f5adeafb (patch)
treed5fb76caac567d22c50964b34194d7e283ed2133 /src
parentf9df1a84b4486eefc65fb91287c2c399531e5b37 (diff)
downloadtmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.gz
tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.bz2
tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.tar.xz
tmwa-ea528aef3470c5829c5f2c887b0be104f5adeafb.zip
add undefined_gat check for SenWho::ALL_SAMEMAP
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.cpp17
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);
+ }
}
}
}