diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-08-02 04:54:11 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-08-02 04:54:11 +0800 |
commit | e900608cc45f33399b12f109548da515df82e723 (patch) | |
tree | 3669888c564fe0527650cccd92af744058290b4a /src/map/atcommand.c | |
parent | cca4271c9350203bffa2feeb753708f434b71d41 (diff) | |
parent | f780bc47486289acd70fee5dc4f34efca1440eaa (diff) | |
download | hercules-e900608cc45f33399b12f109548da515df82e723.tar.gz hercules-e900608cc45f33399b12f109548da515df82e723.tar.bz2 hercules-e900608cc45f33399b12f109548da515df82e723.tar.xz hercules-e900608cc45f33399b12f109548da515df82e723.zip |
Merge pull request #601 from 4144/hpmreduce
Reduce map server memory usage for 3 MB with loaded HPM
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2be990025..fb0b89381 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5244,11 +5244,11 @@ ACMD(skillid) { for (data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key)) { int idx = skill->get_index(DB->data2i(data)); - if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill->db[idx].desc, message, skillen) == 0) { - sprintf(atcmd_output, msg_fd(fd,1164), DB->data2i(data), skill->db[idx].desc, key.str); // skill %d: %s (%s) + if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill->dbs->db[idx].desc, message, skillen) == 0) { + sprintf(atcmd_output, msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str); // skill %d: %s (%s) clif->message(fd, atcmd_output); - } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill->db[idx].desc,message) ) ) { - snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd,1164), DB->data2i(data), skill->db[idx].desc, key.str); + } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill->dbs->db[idx].desc,message) ) ) { + snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str); found++; } } @@ -5376,7 +5376,7 @@ ACMD(skilltree) { { if( ent->need[j].id && pc->checkskill(sd,ent->need[j].id) < ent->need[j].lv) { - sprintf(atcmd_output, msg_fd(fd,1170), ent->need[j].lv, skill->db[ent->need[j].id].desc); // Player requires level %d of skill %s. + sprintf(atcmd_output, msg_fd(fd,1170), ent->need[j].lv, skill->dbs->db[ent->need[j].id].desc); // Player requires level %d of skill %s. clif->message(fd, atcmd_output); meets = 0; } @@ -9306,7 +9306,7 @@ ACMD(cddebug) { const struct TimerData *td = timer->get(cd->entry[i]->timer); if( !td || td->func != skill->blockpc_end ) { - clif->messages(fd,"Found invalid entry in slot %d for skill %s",i,skill->db[cd->entry[i]->skidx].name); + clif->messages(fd,"Found invalid entry in slot %d for skill %s",i,skill->dbs->db[cd->entry[i]->skidx].name); sd->blockskill[cd->entry[i]->skidx] = false; } } @@ -9316,7 +9316,7 @@ ACMD(cddebug) { if( !cd || (message && *message && !strcmpi(message,"reset")) ) { for(i = 0; i < MAX_SKILL; i++) { if( sd->blockskill[i] ) { - clif->messages(fd,"Found skill '%s', unblocking...",skill->db[i].name); + clif->messages(fd,"Found skill '%s', unblocking...",skill->dbs->db[i].name); sd->blockskill[i] = false; } } |