Bug: You don't receive credit when triggering a creature update.
lewpar opened this issue ยท 12 comments
Current Behaviour
When you trigger a creature update (ModifyCreatureAttributes(Creature* creature)
) the creatures damage requirement resets for the player, this resets back to 50% of the creatures health even if you have already done damage to the creature.
If you have done more than 50% of the creatures HP in damage when this occurs and then finish killing the creature you will not get credit as you have not met the damage requirement.
Forgive me if this is not how the system works but this is what I have observed while testing which makes me believe calling creature->ResetPlayerDamageReq();
on L2857
is the culprit.
Expected Behaviour
You should receive credit for the creatures you have damaged.
Steps to reproduce the problem
- Enter a dungeon (I tested stockades)
- Damage a creature to below 50%
- Force a ModifyCreatureAttributes update (I level my player from 20 to 25)
- Finish off the creature
- Observe no credit
Extra Notes
No response
AC rev. hash/commit
AzerothCore #bdba972
AutoBalance #db19dfc
Operating system
Windows 11 x64
Custom changes or Modules
No other modules.
One way I would fix this is to track what the players previous damage requirement was before the change and apply that damage % to the new damage requirement. I'm unsure if this would totally fix this issue but it makes sense in my head.
We're experiencing this issue on our servers currently, this has taken some time to isolate but we've had over 15 reports of dungeon scaled bosses producing no loot or kill credit after the auto balance overhaul went live on our server.
The truth is that I have used the module very little. I studied the code from above, but if this currently happens, it should be reviewed. It's a big module, and it has many configurations and customizations.
I (think) my PR should fix this. If you've done the damage threshold before it scales, it'll subtract it back out, if you haven't, it'll scale it back down. I (think) my math should be about correct.
I (think) my PR should fix this. If you've done the damage threshold before it scales, it'll subtract it back out, if you haven't, it'll scale it back down. I (think) my math should be about correct.
The code looks good, can you comment here again when it's merged? Thanks!
Actually, I think it's scaling the wrong way. Right idea, just slightly wrong numbers.
Since if you level up, the creatures would scale to higher health, so playerDamageRequired
should get tweaked slightly higher. Right now my PR is tweaking downward. I'll have to run some more tests
Latest commit should be good.
@OverlordQ thanks for your work i'm applying this and testing it currently.
Do you know in the end if it is solved with the last pull request? To be able to merge the changes.
Should know in the next day or so once our players report it ๐
Ok, if they report it then we'll try to get it approved. Keep me posted.
So far so good, we'll give it a full day to be sure.
I believe this has fixed it, we're yet to have any reports of loot issues but i'll mention it if we do.