Issue information

Issue ID
#2258
Status
Fixed
Severity
Medium
Started
Hercules Elf Bot
Sep 23, 2008 14:00
Last Post
Hercules Elf Bot
Sep 23, 2008 14:00
Confirmation
N/A

Hercules Elf Bot - Sep 23, 2008 14:00

Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=2258

There is something I found in the mob lazy ai code.
CODE
        if( map[md->bl.m].users>0 ){
            // Since PC is in the same map, somewhat better negligent processing is carried out.

            // It sometimes moves.
            if(rand()%1000<MOB_LAZYMOVEPERC(md))
                mob_randomwalk(md,tick);
            else if(rand()%1000<MOB_LAZYSKILLPERC) //Chance to do a mob's idle skill.
                mobskill_use(md, tick, -1);
            // MOB which is not not the summons MOB but BOSS, either sometimes reboils.
            // People don't want this, it seems custom, noone can prove it....
//            else if( rand()%1000<MOB_LAZYWARPPERC
//                && (md->spawn && !md->spawn->x && !md->spawn->y)
//                && !md->target_id && !(mode&MD_BOSS))
//                unit_warp(&md->bl,-1,-1,-1,0);
        }else{
            // Since PC is not even in the same map, suitable processing is carried out even if it takes.

            // MOB which is not BOSS which is not Summons MOB, either -- a case -- sometimes -- leaping
            if( rand()%1000<MOB_LAZYWARPPERC
                && (md->spawn && !md->spawn->x && !md->spawn->y)
                && !(mode&MD_BOSS))
                unit_warp(&md->bl,-1,-1,-1,0);
        }
this says that, when there are no players on the map, every mob will try to teleport every second at a 2% chance. A practical experiment showed that from 100 porings, 10 teleported in less then a minute. This basically means that it's impossible to "clean up" a map because once you leave, any path you clear will get filled almost instantly. I strongly suggest tracing the history of this change, and verifying if it's official.