diff options
author | wushin <pasekei@gmail.com> | 2015-09-27 22:27:18 -0500 |
---|---|---|
committer | wushin <pasekei@gmail.com> | 2015-09-27 22:27:18 -0500 |
commit | 8de5e363fca358fa0e7c91be83766698a3eebbb5 (patch) | |
tree | 7b7e959b6dfa6ac3081e6ae99efcc41930ff2512 /src/map/clif.cpp | |
parent | 27a6ccd14809eb1c497adc398ecbecd0c0bd3c98 (diff) | |
download | tmwa-8de5e363fca358fa0e7c91be83766698a3eebbb5.tar.gz tmwa-8de5e363fca358fa0e7c91be83766698a3eebbb5.tar.bz2 tmwa-8de5e363fca358fa0e7c91be83766698a3eebbb5.tar.xz tmwa-8de5e363fca358fa0e7c91be83766698a3eebbb5.zip |
bl could leave and cause clif_send to look for people on undefined.gat
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r-- | src/map/clif.cpp | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 49089d7..64e9939 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -324,18 +324,28 @@ int clif_send(const Buffer& buf, dumb_ptr<block_list> bl, SendWho type, short mi break; case SendWho::AREA: case SendWho::AREA_WOS: - map_foreachinarea(std::bind(clif_send_sub, ph::_1, buf, bl, type, min_version), - bl->bl_m, - bl->bl_x - AREA_SIZE, bl->bl_y - AREA_SIZE, - bl->bl_x + AREA_SIZE, bl->bl_y + AREA_SIZE, - BL::PC); + { + if (bl->bl_m != borrow(undefined_gat)) + { + map_foreachinarea(std::bind(clif_send_sub, ph::_1, buf, bl, type, min_version), + bl->bl_m, + bl->bl_x - AREA_SIZE, bl->bl_y - AREA_SIZE, + bl->bl_x + AREA_SIZE, bl->bl_y + AREA_SIZE, + BL::PC); + } + } break; case SendWho::AREA_CHAT_WOC: - map_foreachinarea(std::bind(clif_send_sub, ph::_1, buf, bl, SendWho::AREA_CHAT_WOC, min_version), - bl->bl_m, - bl->bl_x - (AREA_SIZE), bl->bl_y - (AREA_SIZE), - bl->bl_x + (AREA_SIZE), bl->bl_y + (AREA_SIZE), - BL::PC); + { + if (bl->bl_m != borrow(undefined_gat)) + { + map_foreachinarea(std::bind(clif_send_sub, ph::_1, buf, bl, SendWho::AREA_CHAT_WOC, min_version), + bl->bl_m, + bl->bl_x - (AREA_SIZE), bl->bl_y - (AREA_SIZE), + bl->bl_x + (AREA_SIZE), bl->bl_y + (AREA_SIZE), + BL::PC); + } + } break; case SendWho::PARTY_AREA: // 同じ画面内の全パーティーメンバに送信 |