Skip to content

Dev - Fixed the loss of fort data#2241

Closed
SamuraiKal wants to merge 4 commits intoPokemonGoF:devfrom
SamuraiKal:dev
Closed

Dev - Fixed the loss of fort data#2241
SamuraiKal wants to merge 4 commits intoPokemonGoF:devfrom
SamuraiKal:dev

Conversation

@SamuraiKal
Copy link
Copy Markdown
Contributor

@SamuraiKal SamuraiKal commented Aug 1, 2016

Short Description: This fixes loss of fort data when the server returns no fort data.

It seems like the server is saving cycles/bandwidth by only returning fort data when there has been a change to forts in your cells. When it returns no forts, we currently replace our existing data with the empty data. This fixes that so we keep our fort data if the server returned no fort data. Wild/lured pokemon are still updated in any case.

Fixes:

  • If the server returns no fort data in the cell data, keep our existing fort data. (Web location data is still going to lose fort data, but the bot itself won't)
  • I removed duplicate code
  • Edited cluster log function to round to nearest meter

Known related Issues:
-#2184

forts = []
wild_pokemons = []
catchable_pokemons = []
fortspresent = False
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need this flag? Could we just check for len(forts)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried that first, it threw a get_item error.

@douglascamata
Copy link
Copy Markdown
Member

Also fix conflicts with dev branch, please.

@matheussampaio
Copy link
Copy Markdown
Contributor

matheussampaio commented Aug 1, 2016

@Abraxas000 One way to separate commits is (or remove commits from that branch) is using git rebase -i dev and change pick to drop. Be careful to not lose those commits.

@SamuraiKal
Copy link
Copy Markdown
Contributor Author

SamuraiKal commented Aug 1, 2016

Thanks all for the assistance! I'm used to using TFS so I'm still bumbling my way through the git processes.

@TheSavior The cluster change has been reverted and the conflict from the previous merge is resolved.

@SamuraiKal
Copy link
Copy Markdown
Contributor Author

This PR got very messy. I'm starting with a fresh fork and branching my edits so I won't have to deal with this again later. I'm sure there's a more elegant way to clean up my forked repo, but I've already spent too long trying to fix this xD

@SamuraiKal SamuraiKal closed this Aug 1, 2016
@SamuraiKal
Copy link
Copy Markdown
Contributor Author

New PR: #2269

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

Successfully merging this pull request may close these issues.

4 participants