Comments (4)
The only way to fetch detailed data of other players is with the ViewPlayer
command. Thats how the game itself does it for guild members, hall of fame entries, arena battles and so on. All just use the ViewPlayer
command in the game. The data fetched should contain all data the game has about the player (equipment, attributes, album count, fortress, etc.).
If I remember correctly, the value for the portal count the server sends is bad/wrong in some cases and I prefered to have no value, instead of a wrong value, so I commented that part of the parsing out until I know what makes the game send a wrong value:
sf-api/src/gamestate/social.rs
Line 307 in abbb899
If you need that value, I can check up on that problem again and make sure that value gets parsed correctly
from sf-api.
Yes, because you can use the ViewPlayer
command with the player_id, or the username. As a result, there also has to be a way to get the fetched result from the gamestate with the player_id and the username. Both of these ways are provides with the lookup_name()
and lookup_pid()
methods on OtherPlayers. If the underlying fields were public, you could easily create situations, where the lookup is no longer in sync with the vec, that contains the players and thus return you the wrong result when calling the lookup methods
from sf-api.
Thanks! Everything is resolved now. I'll take a look at the portal too maybe I'll figure something out.
from sf-api.
Thanks! That helped a lot!
Btw, is there any reason for
sf-api/src/gamestate/social.rs
Line 54 in abbb899
from sf-api.
Related Issues (20)
- error message on starting quest HOT 1
- Why is OtherPlayers.other_players private? HOT 1
- Add more get() functions for stuff, that is in arrays
- Use an actual testing framework to test this
- Better attribute and other array debug
- Add Hall of Knights parsing
- Understand/Explain/Fix portal enemy level
- Explain some of the interactions/limits of commands
- Fix fight parsing
- Add all events
- LIghtdungeon x ShadowDungeon iteration HOT 4
- issue FightLightDungeon { name: dungeon, use_mushroom: false }) uses mushrooms HOT 2
- dungeons.get_light(dungeon_name) sometimes crashes HOT 3
- unlocking dungeon HOT 2
- unintutitive names of variable in FortressRessources HOT 1
- missing commands for pets HOT 1
- dungeon fight commands missing? HOT 1
- idlegame update HOT 2
- Crash on login because of sfgames server bar response HOT 1
- Hellevator attack? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sf-api.