-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release loot at end of HandleAutostoreLootItemOpcode #711
base: master
Are you sure you want to change the base?
Conversation
Resolve dup involving opening chests. Player can open a chest at the same time as forcing a logout or teleport (making player leave world) to restore contents of chest item. This forces the server to handle the looting of item.
Q: Can code in WorldSession::HandleLootMasterGiveOpcode which also has Loot::SendItem also be used to the same end? |
Probably, good catch. Someone could probably give themselves the item in a chestobject via masterloot and force a disconnect at the same time. I'd have to test though to confirm. It would have to be the last loot item in the loot table to force it's contents to repopulate. |
Can't replicate with masterloot but it may be a timing thing which isn't easy to replicate for this scenario. |
If lootable object can do loot roll for items, it will do this even if masterloot is on, this can be used to cause a onetime dup. Handing out the item via masterloot will not stop the active roll, which will also give the item once completed. (Only works for lootable objects such as chests that aren't assigned to any conditions + may affect more stuff)
oof the indenting or spacing is cooked and I don't know how to sort it out on github. Also another possible dup fixed. |
That one i dont think is valid. You still launch a roll during master loot if master looter isnt eligible for it. |
What scenario would be the case where masterloot isn't eligible? I guess if the masterlooter isn't present in the same map or online. Could a if no masterLooter variable check work instead? Not sure if that fits all scenarios though. |
Too far on kill, not in map. And i dont remember how below the threshold works for master looter. |
Ya this is one aspect I was thinking a no masterLooter check wouldn't catch too. |
Actually nvm, the
handles this, maybe just a
would work before the group loot roll out. |
oof I dont know how to work around the formatting using the browser as an editor with copy paste from visual. Sorry I've mega cooked the formatting on this pull request. |
Actually last commit doesn't work because it checks all players within the loop. 😖 |
Let me worry about the rest. It will take me some time to merge this, but ill do a bit of a review of the existing loot code at the same time, since adjusting loot code is a bit of a landmine. |
IIRC, that loot is assigned to someone just like in the group loot case. So for example if you're master looter for rare+ (blue+) items, and we kill say Onyxia and her loot would be assigned to 'me', then I can just take the backpack and sack of gems (common/green items) while you'll have to hand out the rest of the loot as master looter. At least that's how I tested it to be at one point in time (I think when 5.x was current, so still take it with a grain of salt for TBC/Classic). |
So below threshold round robin, above threshold master looter, and above threshold when ML wasnt in range, group loot |
🍰 Pullrequest
Resolve dup involving opening chests in inventory or chest objects. Player can open a chest at the same time as forcing a logout or teleport (making player leave world) to restore contents of chest item. This pull request forces the server to handle the looting of item.
I'm going through my repo changes and I'm pretty sure this was the only thing we needed to resolves the dupe from our end.
Tested in main repo as well to make sure it wasn't something from just our core.
To replicate - Open a chest item from inventory with autoloot enabled, whilst disconnecting or going through a portal. Timing has to be right.
Issues