Skip to content
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

Inventory items reapearing in Backpack after log out/in #1076

Closed
Warloxx01 opened this issue Oct 25, 2018 · 8 comments
Closed

Inventory items reapearing in Backpack after log out/in #1076

Warloxx01 opened this issue Oct 25, 2018 · 8 comments
Assignees

Comments

@Warloxx01
Copy link

Warloxx01 commented Oct 25, 2018

Bug Report or Feature Request (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request

Repro steps.

I got the latest ACE Build. deleted the old Database. Installed the latest 16PY v0.0.20. Created my Player account created my Charactor got teleported out to Holtburg with my started gear ( Academy coat, 2x oil, Starter wand, bread, Letter, book, and so on. I lifestoned and went to drop the junk on the Town Crier.
Dropped the Bread, Coat, Oils Letter and so on on the Town Crier. I kept the Tapers, Scarab, ust and Blue Gem. Ran down and grabbed a Faran Robe and went back to the LS. Logged out and back in and I got the Bread, Calling Stone (Originally given to the Society Agent) letter and book back in my backpack. I did this experiment because I had the same issue appear with the last player I was working with testing things. It put the Harvester Pincer and the heal kits as well as the ring and C note back in my pack. Even though I had done the Quest the day before, Logged out wne tot work did my daily running and so on. ( I also had left the server running after the quest) I never shut it down. It was running for like 15 Hours straight. Sorry to babble. BTW it started with the Completed issue fix that stated something about and many more fixs. Sorry I can't remember what number it was, I think it was the one before the Lugian fix.

The log given by the failure.

Desired functionality.

Mention any other details that might be useful.

@Mag-nus
Copy link
Member

Mag-nus commented Oct 26, 2018

To clarify.

Items you give to the town crier reappear on your character.

Can you test that items dropped on the landblock do not reappear on your character?

@Mag-nus Mag-nus self-assigned this Oct 26, 2018
@Warloxx01
Copy link
Author

If I drop them on them on the Quest giver( if quest item ) or Town Crier they reappear in my inventory. They also reappear if dropped on the ground. Odd thing is, if dropped on the ground. When you log back in They are back in your inventory and on the ground, here is the odd part, if you Click on the item on the ground the Corresponding item in your backpack Highlights. Also if you Double click the item on the ground you can not pick it up. You have to drag it to your inventory. Then you have two of the same items.

@Mag-nus
Copy link
Member

Mag-nus commented Oct 27, 2018

Can you test #1078, i think it has the fix.

@Warloxx01
Copy link
Author

Warloxx01 commented Oct 27, 2018

Okay, Kinda works, if i give items to the town crier it appears to work correctly now, But... If I drop the item on the ground, it is removed from the Inventory. But if I log out and back in, it is back in my inventory and also on the ground. I cant pick it up but if I click on it on the ground it Highlights in my Inventory. I can no longer drag and drop it from the ground to my pack and get 2 of the same item (that changed), but if I drop the item from my back pack on the town crier... THEN I can pick up the item on the ground... Also I now get this in the Server window..

2018-10-27`` 12:17:04,762 ERROR: SaveBiota failed with exception: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> MySql.Data.MySqlClient.MySqlException: Cannot add or update a child row: a foreign key constraint fails (ace_shard.`biota_properties_bool`, CONSTRAINT `wcid_bool` FOREIGN KEY (`object_Id`) REFERENCES `biota` (`id`) ON DELETE CASCADE) ---> MySql.Data.MySqlClient.MySqlException: Cannot add or update a child row: a foreign key constraint fails (`ace_shard`.`biota_properties_bool`, CONSTRAINT `wcid_bool` FOREIGN KEY (`object_Id`) REFERENCES `biota` (`id`) ON DELETE CASCADE)
at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\Core\ResultSet.cs:line 44
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.MySqlDataReader.ActivateResultSet(ResultSet resultSet) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 93
at MySql.Data.MySqlClient.MySqlDataReader.ReadFirstResultSetAsync(IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 328
at MySql.Data.MySqlClient.MySqlDataReader.CreateAsync(MySqlCommand command, CommandBehavior behavior, IOBehavior ioBehavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlDataReader.cs:line 313
at MySqlConnector.Core.TextCommandExecutor.ExecuteReaderAsync(String commandText, MySqlParameterCollection parameterCollection, CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in C:\projects\mysqlconnector\src\MySqlConnector\Core\TextCommandExecutor.cs:line 73
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\mysqlconnector\src\MySqlConnector\MySql.Data.MySqlClient\MySqlCommand.cs:line 168
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(DbContext _, ValueTuple`2 parameters)
at Pomelo.EntityFrameworkCore.MySql.Storage.Internal.MySqlExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(IEnumerable`1 commandBatches, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(IReadOnlyList`1 entriesToSave)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Boolean acceptAllChangesOnSuccess)
at Microsoft.EntityFrameworkCore.DbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
at ACE.Database.ShardDatabase.SaveBiota(Biota biota, ReaderWriterLockSlim rwLock) in C:\Users\Warloxx\Downloads\AC Stuff\6) Server\ACE-master\Source\ACE.Database\ShardDatabase.cs:line 203

@Warloxx01
Copy link
Author

Warloxx01 commented Oct 27, 2018

OK, WOW, If I double click the item on the ground once nothing happens, but if I double click it twice ( im using s ring) it equips it from the ground and moves the one in my back pack to my finger location. But leaves the ring on the ground. if I remove the ring from my finger and then re-equip it again from my pack and then remove it again. The ring on the ground disappears.

@Mag-nus
Copy link
Member

Mag-nus commented Oct 27, 2018

I think I know what the drop item bug is. I'll push a fix later.

@Mag-nus
Copy link
Member

Mag-nus commented Oct 28, 2018

Ok, i just pushed what I believe is the fix.

It's possible you may have some items that have been corrupted between the drop/give. The client won't let you give or drop these items. Not even sure you can drop them on a TC. I'll have to look into how we solve this later.

Now, when you drop and give an item, the item is saved to the database. It was done this way before a recent change, but, I removed that to avoid a performance hit. They must be added back for now until I can figure out how to update just the ContainerId and WielderId properties for efficiency.

@Mag-nus
Copy link
Member

Mag-nus commented Oct 30, 2018

I believe #1081 addresses the issues you messaged me about.

@Mag-nus Mag-nus closed this as completed Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants