summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-11-13 17:38:21 +0100
committerHaru <haru@dotalux.com>2018-11-13 17:38:21 +0100
commit35ee16dd3908c021752e439a4fe4ea9e83af9ec0 (patch)
treed0de667fae7b066a61d793fa8b1fa421718f70cc /src/map/clif.c
parent1e5df06b8a23ea13c3fc1b07339c261a77600bae (diff)
downloadhercules-35ee16dd3908c021752e439a4fe4ea9e83af9ec0.tar.gz
hercules-35ee16dd3908c021752e439a4fe4ea9e83af9ec0.tar.bz2
hercules-35ee16dd3908c021752e439a4fe4ea9e83af9ec0.tar.xz
hercules-35ee16dd3908c021752e439a4fe4ea9e83af9ec0.zip
Replace sd->channels with a VECTOR
This removes some shady array compaction code and prepares the ground for some further fixes. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 44cefcd7e..800b13833 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11083,8 +11083,8 @@ static void clif_parse_WisMessage(int fd, struct map_session_data *sd)
if (chan) {
int k;
- ARR_FIND(0, sd->channel_count, k, sd->channels[k] == chan);
- if (k < sd->channel_count || channel->join(chan, sd, "", true) == HCS_STATUS_OK) {
+ ARR_FIND(0, VECTOR_LENGTH(sd->channels), k, VECTOR_INDEX(sd->channels, k) == chan);
+ if (k < VECTOR_LENGTH(sd->channels) || channel->join(chan, sd, "", true) == HCS_STATUS_OK) {
channel->send(chan,sd,message);
} else {
clif->message(fd, msg_fd(fd,1402)); //You're not in that channel, type '@join <#channel_name>'