PDA

View Full Version : Bots pets making mobs poof with no corpse


Terethian2
03-03-2010, 04:22 PM
The bot pets is in the database, what is likely missing in the database that needs to be sourced to fix this issue?

It does not effect player pets, just the bot pets, if the bot pet get's the kill poof goes the corpse every time.

Derision
03-03-2010, 04:56 PM
I don't believe there is anything you can change in the database to fix this, a source code change is required:

In NPC:: Death, there is code to check if a Pet caused the most damage to the killed mob, in which case the owner of the pet gets the kill, however it appears another check is needed to see if the pet owner is a bot, in which case the bot's owner should be awarded the kill and hence the XP.

EDIT: Actually, the XP award is only one part of it, this conditional in attack.cpp, line 2082 is what probably needs altering to leave a corpse if a bot pet gets the kill:

if (!HasOwner() && class_ != MERCHANT && class_ != ADVENTUREMERCHANT && !GetSwarmInfo()
&& MerchantType == 0 && killer && (killer->IsClient() || (killer->HasOwner() && killer->GetOwner()->IsClient()) ||
(killer->IsNPC() && killer->CastToNPC()->GetSwarmInfo() && killer->CastToNPC()->GetSwarmInfo()->owner &&
killer->CastToNPC()->GetSwarmInfo()->owner->IsClient()))) {


It should be a simple fix. I don't have the time to test and commit it right now, but I'll get to it in a few days if no-one else does.

Terethian2
03-04-2010, 04:44 PM
At some point someone changed the standard compiled binary code for bots to goof up and cause this pet issue =(
(I think it started past two compiled bot binaries.)

I don't know how to compile and I really don't want to mess with it, I tried before and could not figure it out....

I would like to request a fix to a new compiled binary... ::cross fingers::