Issue information

Issue ID
#4549
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Nov 13, 2010 12:24
Last Post
Hercules Elf Bot
Nov 13, 2010 12:24
Confirmation
N/A

Hercules Elf Bot - Nov 13, 2010 12:24

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

This issue was originally reported by Epoque in #athena. In r14381, a second, duplicate if-condition has been introduced, which serves no effect:
CODE
        if (!(nk&NK_NO_ELEFIX))  // 1st
        {
            if (!(nk&NK_NO_ELEFIX))  // 2nd
            {
                int ele_fix = tsd->subele[s_ele];
                for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)
                {
                    if(tsd->subele2[i].ele != s_ele) continue;
                    if(!(tsd->subele2[i].flag&md.flag&BF_WEAPONMASK &&
                         tsd->subele2[i].flag&md.flag&BF_RANGEMASK &&
                         tsd->subele2[i].flag&md.flag&BF_SKILLMASK))
                        continue;
                    ele_fix += tsd->subele2[i].rate;
                }
                cardfix=cardfix*(100-ele_fix)/100;
            }  // 2nd end
        }  // 1st end


2010-11-13doublebattle.diff (1.2K) removes the second if and unindents the enclosed code part.