summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-16 20:10:25 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-02-16 20:10:25 +0000
commit222233014303fe4054ecbbe5d22ea92c6c573ef1 (patch)
treeb731dac117e3c52555547db37d9009be87b116e1 /src/map/clif.c
parent8c73f381454d08de7399a44cbd480e22e1a8ff1a (diff)
downloadhercules-222233014303fe4054ecbbe5d22ea92c6c573ef1.tar.gz
hercules-222233014303fe4054ecbbe5d22ea92c6c573ef1.tar.bz2
hercules-222233014303fe4054ecbbe5d22ea92c6c573ef1.tar.xz
hercules-222233014303fe4054ecbbe5d22ea92c6c573ef1.zip
Removed some useless svn:ignore properties.
Fixed a compilation problem. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12211 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 8600d520a..209f32e0b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -12137,23 +12137,12 @@ static int packetdb_readdb(void)
ln++;
continue;
}
- 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)
- { //If we are updating a function, we need to zero up the previous one. [Skotlex]
- for(i=0;i<=MAX_PACKET_DB;i++){
- if (packet_db[packet_ver][i].func == clif_parse_func[j].func)
- {
- memset(&packet_db[packet_ver][i], 0, sizeof(struct s_packet_db));
- break;
- }
- }
- }
- packet_db[packet_ver][cmd].func = clif_parse_func[j].func;
- break;
- }
- }
+
+ // look up processing function by name
+ ARR_FIND( 0, ARRAYLENGTH(clif_parse_func), j, clif_parse_func[j].name != NULL && strcmp(str[2],clif_parse_func[j].name)==0 );
+ if( j < ARRAYLENGTH(clif_parse_func) )
+ packet_db[packet_ver][cmd].func = clif_parse_func[j].func;
+
// set the identifying cmd for the packet_db version
if (strcmp(str[2],"wanttoconnection")==0)
clif_config.connect_cmd[packet_ver] = cmd;