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

Character Database is not updated automatically #271

Closed
broxen opened this issue Mar 12, 2018 · 1 comment
Closed

Character Database is not updated automatically #271

broxen opened this issue Mar 12, 2018 · 1 comment
Labels
enhancement Enhancement to server functionality.

Comments

@broxen
Copy link
Collaborator

broxen commented Mar 12, 2018

Expected behavior

Character Dbase should update periodically (perhaps on the MapEvent::CharacterUpdate, or World Update?)

Actual behavior/symptoms

Currently the only way to update your character in the database is to use the slash command /save or /charupdate

@broxen
Copy link
Collaborator Author

broxen commented Mar 12, 2018

I have commented code in World Update, but it's commented out, because it hangs the client when multiple entities are logged in.

@broxen broxen added the enhancement Enhancement to server functionality. label Apr 7, 2018
@broxen broxen added this to the Version 0.5: The Unsilencer milestone Apr 30, 2018
eos428 pushed a commit to eos428/Segs that referenced this issue May 12, 2018
WorldSimulation.cpp

- In World::update, inside the for loop with entities, update the player characters every n seconds (in this case, 5 secs)
- charUpdateDb(e) is a placeholder atm

Entity.cpp and .h
- Added a function to check the if the player has a valid DbStoreFlag

To-do and/or wishlists:
- (To confirm with others) Call GameDbSyncContext::performUpdate based on the DbStoreFlag, and put the required data into the structs as parameters
- Modify slashCommand.cpp so that they actually update the database
eos428 pushed a commit to eos428/Segs that referenced this issue May 17, 2018
In GameDbSyncEvents.h, I changed my structs' m_id to uint64_t, since Entity::GetAccountId returns uint64_t as well.
And I tried to make GameDbSyncService closer to WorldSimulation
eos428 pushed a commit to eos428/Segs that referenced this issue May 17, 2018
Minor update attempting to remove Wnarrowing warnings/errors
eos428 pushed a commit to eos428/Segs that referenced this issue May 18, 2018
- In GameDBSyncService.cpp, changed how entity.m_db_store_flags is checked to update things (Well, that was a learning experience on bitwise operations)
- In MapInstance.cpp, added m_sync_service->activate() on MapInstance::start and call m_sync_service->on_update_timer on the same way m_world->update is called
@broxen broxen closed this as completed in 8be4a5f May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to server functionality.
Projects
None yet
Development

No branches or pull requests

1 participant