blueboy / portal

This portal repo is for development purposes only
http://github.com/blueboy/portal
GNU General Public License v2.0
27 stars 24 forks source link

loot bug #6

Closed kennumen closed 12 years ago

kennumen commented 12 years ago

Not all corpses are looted. This is more obvious with quest loots (if some bots have finished the quest, it only requires one bot not to loot to be obvious), but can happen with any mob.

New-ai, right before skillbot merge (ok, I guess we could use a versioning system - too bad git doesn't autoincrement): https://github.com/blueboy/portal/commit/2015c33168c5d2ba66e8d6fa8e001ae1bad4ebd2

Easy steps to reproduce bug:

Best guess - loot corpse table gets deleted somewhere in the middle, at random per bot. Just a feeling, but the healer felt particularly susceptible to this issue.

blueboy commented 12 years ago

I have seen situations where corpses have been left unlooted. The reason for this are unclear. o bots may have been distracted by further combat and as you say the loot table then gets cleared. o ownership of loot. If you kill a member of the mob without help from bots they will not try to loot your booty. I haven't tried reproducing the issue as you suggest yet, but I will and post my findings.

kennumen commented 12 years ago

Solid ideas, but...

blueboy commented 12 years ago

I think I have a solution to this issue.

I managed to reproduce the looting issue in Westfall where there are several 'mobs' available to attack. Frequently corpses were left with money and needed quest items in. I traced the cause to some code that had been added as a anti-cheat.

 if (!wo || GetMaster()->GetDistance(wo) > float(m_mgr->m_confCollectDistanceMax))
 {
     m_lootCurrent = ObjectGuid();
     return;
 }

The assumption with the above code is that the player will also attack along with the party of bots. If the player (GetMaster()) is too far from the corpse, it will not be looted.Once I commented out this code, all corpses were looted as expected.

I will be pushing a fix shortly.

Hope this helps

kennumen commented 12 years ago

Tested, still some issues with looting but I don't believe it actually relates to any looting code - looks more like bot(s) are paused. Consider this issue closed.