diff options
author | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-29 22:52:10 +0000 |
---|---|---|
committer | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-04-29 22:52:10 +0000 |
commit | efc39a408c225e1f030b1d21938ad7004b65af96 (patch) | |
tree | c7a5a9a7e19d82dd0663d31969c2bb47964f9545 /src/map/mob.c | |
parent | cb54f6e503c6160eb5896088f04dcb75860ef153 (diff) | |
download | hercules-efc39a408c225e1f030b1d21938ad7004b65af96.tar.gz hercules-efc39a408c225e1f030b1d21938ad7004b65af96.tar.bz2 hercules-efc39a408c225e1f030b1d21938ad7004b65af96.tar.xz hercules-efc39a408c225e1f030b1d21938ad7004b65af96.zip |
- Updated the unit engine to cache attacker count rather than utilise CPU intensive block iterations
- This update removes two unofficial settings, nothing that will go amiss
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16011 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 3e8df661f..8318d492f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1293,7 +1293,7 @@ int mob_unlocktarget(struct mob_data *md, unsigned int tick) } if (md->target_id) { md->target_id=0; - md->ud.target = 0; + unit_set_target(&md->ud, 0); } return 0; } @@ -3082,11 +3082,11 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) case MSC_SLAVELT: // slave < num flag = (mob_countslave(&md->bl) < c2 ); break; case MSC_ATTACKPCGT: // attack pc > num - flag = (unit_counttargeted(&md->bl, 0) > c2); break; + flag = (unit_counttargeted(&md->bl) > c2); break; case MSC_SLAVELE: // slave <= num flag = (mob_countslave(&md->bl) <= c2 ); break; case MSC_ATTACKPCGE: // attack pc >= num - flag = (unit_counttargeted(&md->bl, 0) >= c2); break; + flag = (unit_counttargeted(&md->bl) >= c2); break; case MSC_AFTERSKILL: flag = (md->ud.skillid == c2); break; case MSC_RUDEATTACKED: @@ -3096,7 +3096,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) case MSC_MASTERHPLTMAXRATE: flag = ((fbl = mob_getmasterhpltmaxrate(md, ms[i].cond2)) != NULL); break; case MSC_MASTERATTACKED: - flag = (md->master_id > 0 && (fbl=map_id2bl(md->master_id)) && unit_counttargeted(fbl, 0) > 0); break; + flag = (md->master_id > 0 && (fbl=map_id2bl(md->master_id)) && unit_counttargeted(fbl) > 0); break; case MSC_ALCHEMIST: flag = (md->state.alchemist); break; |