diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-19 16:27:14 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-19 16:27:14 +0000 |
commit | ae6dd8b98622e572f6c4b7712199d31cf2f9a4ea (patch) | |
tree | 31c3fa69a0492b0d05001ea3051597036852109b /src/map/mob.c | |
parent | a554c06fd91bbdc0879da51637f1a3f531b41036 (diff) | |
download | hercules-ae6dd8b98622e572f6c4b7712199d31cf2f9a4ea.tar.gz hercules-ae6dd8b98622e572f6c4b7712199d31cf2f9a4ea.tar.bz2 hercules-ae6dd8b98622e572f6c4b7712199d31cf2f9a4ea.tar.xz hercules-ae6dd8b98622e572f6c4b7712199d31cf2f9a4ea.zip |
- Fixed loginlog definition in main.sql, thanks to Tempesta
- Likely fixed the mob-skill random picking behaviour causing infinite loops sometimes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6658 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index bdbab5cf8..e9c60b179 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2570,7 +2570,7 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) struct mob_skill *ms;
struct block_list *fbl = NULL; //Friend bl, which can either be a BL_PC or BL_MOB depending on the situation. [Skotlex]
struct mob_data *fmd = NULL;
- int i,j;
+ int i,n;
nullpo_retr (0, md);
nullpo_retr (0, ms = md->db->skill);
@@ -2582,8 +2582,8 @@ int mobskill_use(struct mob_data *md, unsigned int tick, int event) return 0; //Skill act delay only affects non-event skills.
//Pick a random starting position and loop from that.
- j = rand()%md->db->maxskill;
- for (i = j+1; i != j; i++) {
+ i = rand()%md->db->maxskill;
+ for (n = 0; n < md->db->maxskill; i++, n++) {
int c2, flag = 0;
if (i == md->db->maxskill)
|