diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-18 08:04:53 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-18 08:04:53 +0000 |
commit | e8d7a95f9416c67242db5e06fd1743c8f28b3b08 (patch) | |
tree | a31a379d1f2e3af7eede623407b4cc0a25b43383 /src/map/clif.c | |
parent | 5f6a6a2557a90573a504b541a3234f0dc566bf6a (diff) | |
download | hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.gz hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.bz2 hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.tar.xz hercules-e8d7a95f9416c67242db5e06fd1743c8f28b3b08.zip |
Some code cleaning...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11505 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 1e3bcca1f..de0031fb7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8152,7 +8152,7 @@ void check_fake_id(int fd, struct map_session_data *sd, int target_id) memset(WPACKETP(0), 0, packet_len(0x95)); WPACKETW(0) = 0x95; WPACKETL(2) = server_fake_mob_id; - fake_mob = fake_mob_list[(sd->bl.m + sd->fd + sd->status.char_id) % (sizeof(fake_mob_list) / sizeof(fake_mob_list[0]))]; // never same mob + fake_mob = fake_mob_list[(sd->bl.m + sd->fd + sd->status.char_id) % ARRAYLENGTH(fake_mob_list)]; // never same mob if (!mobdb_checkid(fake_mob)) fake_mob = 1002; // poring (default) strncpy(WPACKETP(6), mob_db[fake_mob].name, 24); @@ -11775,7 +11775,7 @@ static int packetdb_readdb(void) // initialize packet_db[SERVER] from hardcoded packet_len_table[] values memset(packet_db,0,sizeof(packet_db)); - for( i = 0; i < sizeof(packet_len_table)/sizeof(packet_len_table[0]); ++i ) + for( i = 0; i < ARRAYLENGTH(packet_len_table); ++i ) packet_len(i) = packet_len_table[i]; sprintf(line, "%s/packet_db.txt", db_path); @@ -11868,7 +11868,7 @@ static int packetdb_readdb(void) ln++; continue; } - for(j=0;j<sizeof(clif_parse_func)/sizeof(clif_parse_func[0]);j++){ + for(j=0;j<ARRAYLENGTH(clif_parse_func);j++){ if(clif_parse_func[j].name != NULL && strcmp(str[2],clif_parse_func[j].name)==0) { if (packet_db[packet_ver][cmd].func != clif_parse_func[j].func) |