summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-10-30 01:59:04 +0100
committerHaru <haru@dotalux.com>2017-11-05 18:30:44 +0100
commit09d5c20572424e7a92dff5cf560001278c6ffaa0 (patch)
treee9a1f3347e58b85f0cd6d9e39fbf986e1b08b16b /src/map/chrif.c
parent581f8c7393757ea70c4aaa64f6e20b57f74a32ae (diff)
downloadhercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.gz
hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.bz2
hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.tar.xz
hercules-09d5c20572424e7a92dff5cf560001278c6ffaa0.zip
Reduce confusion between skill IDs and skill DB indexes (part 2)
Remove MAX_SKILL in favor of MAX_SKILL_DB, when referring to the maximum skill DB index. This is opposed to MAX_SKILL_ID, the maximum skill ID. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 39aa046d7..96f144523 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1360,10 +1360,10 @@ void chrif_skillid2idx(int fd) {
if (!sockt->session_is_valid(fd))
return;
- WFIFOHEAD(fd,4 + (MAX_SKILL * 4));
+ WFIFOHEAD(fd,4 + (MAX_SKILL_DB * 4));
WFIFOW(fd,0) = 0x2b0b;
- for(i = 0; i < MAX_SKILL; i++) {
- if( skill->dbs->db[i].nameid ) {
+ for (i = 0; i < MAX_SKILL_DB; i++) {
+ if (skill->dbs->db[i].nameid != 0) {
WFIFOW(fd, 4 + (count*4)) = skill->dbs->db[i].nameid;
WFIFOW(fd, 6 + (count*4)) = i;
count++;