Issue information

Issue ID
#4359
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Jul 20, 2010 15:22
Last Post
Hercules Elf Bot
Jul 20, 2010 15:22
Confirmation
N/A

Hercules Elf Bot - Jul 20, 2010 15:22

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

I'd like to more ask why there's an attached player check on script.c:BUILDIN_FUNC(warpparty).

CODE
    sd=script_rid2sd(st);
    if( sd == NULL )
        return 0;

    // ...

    if(map[sd->bl.m].flag.noreturn || map[sd->bl.m].flag.nowarpto)
        return 0;


This code seems kind of useless to me. A bettter method would be to implement this (if it's necessary) in the for loop itself on each individual player.

CODE
        if( pc_isdead(pl_sd) )
            continue;

        if (map[pl_sd->bl.m].flag.noreturn || map[pl_sd->bl.m].flag.nowarpto)
            continue;


Not only would this remove the requirement for having an attached player to the warpparty command, but it also applies to all party members and not just the caller of the script (who may not even be in the party).