Serious Bug Report!!
5igm opened this issue · 11 comments
When Ancient Warfare is used for multi-player, there is a bug that players can use it to get items illegally. When creater open the gui of NPC, another same team player also can open the gui. Then, when the creator choose repack the NPC, the gui of the same team player will not close. Now, the second player can take the items in the gui out, and after npc is released again, the items in the gui of npc will not lose anything. It means players can use this bug get unlimited items.
Please Fix It! Thank you very much!
This is a bug that's been known for some time. One solution to this would be to remove the "Repack" button from all but Creative mode players' GUIs.
This is a feature I'd like for other reasons. Namely - preventing the ability to repack Priests, bringing them out only when an NPC has died. This is a rare occurrence in survival mode anyway, being that one can simply repack their NPCs at the first sign of danger and store them safely in a chest until the danger has passed.
Preferably, this change would be in the form of a config option, with the default option set to : NPC Repack button visible only in Creative = True
This, of course, would easily fix the duplication issue, but it would also have the added benefit of enabling a truly survival experience in Ancient Warfare2.
Well, removing the repack button for non-creative players is a separate thing, doesn't solve the issue at all for people who don't want that feature...
I can't think of a simple way to solve this, seems it would require a packet no matter what. I thought it would be simple to only allow one team player to open the NPC inventory at a time, which can easily be done by setting a flag in NpcBase#tryCommand, but then there is no way to return a "npc available to be interacted with again" once that player closes the GUI - short of sending a packet (from GuiNpcInventory#onGuiCloseRequested I would guess).
Thanks a lot, but is there a fixed version?
I found Ancient Warfare II did not upgrade for a long time. Is it been abondoned?
...
It's not fixed, I was just adding my person opinion that rather it wouldn't be so simple to fix (at least for me).
AW2 is not abandoned, not quite. Shadowmage (original creator) has abandoned it, but GotoLink is currently maintaining it. However it's on the back burner, GotoLink has a LOT of other mids to maintain. I have been interested in contributing, but my skills and time are also limited.
Let's see if GotoLink or another coder has a better idea compared to what I said.
Regarding the removal of the repack button completely (for non-creative players) - would this suit the needs of your server? Because that is an easy config feature that I could do. Remember that you can still order NPC's around with a command baton if they get stuck (I.e. you can ask them to follow you).
On 3 Jan 2016, 5igm [email protected] wrote:
Thanks a lot, but is there a fixed version?
I found Ancient Warfare II did not upgrade for a long time. Is it been
abondoned?
...
Reply to this email directly or view it on GitHub:
#427 (comment)
Sent with K-@ Mail - the evolution of emailing.
"Repack" command automatically set the entity "dead" flag.
Npc inventory is no longer valid to open past this point. See NpcInventory.
So related Container should close.
In SMP, the GUI closes for the person who clicked the repack command yes - but if another player opened the GUI before pressing the first player pressed repack, then the GUI does not close for them and they can still remove items.
Just tested this right now, it's been an issue for some time apparently.
On 4 Jan 2016, GotoLink [email protected] wrote:
"Repack" command automatically set the entity "dead" flag.
Npc inventory is no longer valid to open past this point. See
NpcInventory.
So related Container should close.
Reply to this email directly or view it on GitHub:
#427 (comment)
Sent with K-@ Mail - the evolution of emailing.
Right, ContainerEntityBase doesn't check if the entity is still valid.
Easy enough to fix.
Will that fix also fix all other inventories/GUI? There seems to be an issue with every block. Example the Warehouse. Any mod that lets you teleport away from the block, OR even easier railcart. If you set up rails to take you away from the warehouse, First you start to move awayin the cart, Then You open the GUI, the GUI will not close even when your far away.. This allows players to empty out the inventory of items, but not actually take the items from the warehouse. Creating an infinite Dupe. This works with all GUI from the mod.
Ha. I hadn't discovered that dupe glitch. Thank you. I'm not sure if that's ContainerEntityBase or ContainerBase. I think it's the latter - (beginning) at line 73?
Blocks inventory range is kinda related. Different rule, but same lack of implementation.
Fix coming soon.