Issue information

Issue ID
#2557
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Dec 20, 2008 8:03
Last Post
Hercules Elf Bot
Apr 19, 2012 10:18
Confirmation
N/A

Hercules Elf Bot - Dec 20, 2008 8:03

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

This bug occurs in certain condition.

CODE
        case BL_PET:
        {
            struct pet_data *pd = (TBL_PET*)src;
            if( battle_config.pet_attack_exp_to_master && pd->msd )
            {
                char_id = pd->msd->status.char_id;
                damage = (damage*battle_config.pet_attack_exp_rate)/100; //Modify logged damage accordingly.
            }
            //Let mobs retaliate against the pet's master [Skotlex]
            if( pd->msd && damage )
                md->attacked_id = pd->msd->bl.id;
            break;
        }


We can see that if battle_config.pet_attack_exp_rate was set to 0, the damaged monster would not shift its attacked_id to the pet's master, which means it would keep being attacked without attacking back!

I reproduced this by creating a Poring with 5000000 HP and hade client A attack it, the Poring attacked back. Then Client B (who have a pet with full intimacy) attacked it until his pet attacked. Then client A logged out. The Poring would attack nobody!

Hercules Elf Bot - Jan 4, 2012 5:06

Originally posted by [b]Ind[/b]
was fixed in a previous eA revision