Added getting the CellID in the constructor method.#722
Added getting the CellID in the constructor method.#722yaakov-h merged 3 commits intoSteamRE:masterfrom ADustyOldMuffin:default-cellid-login-methods
Conversation
|
Creating a new configuration and then immediately using it's values is fairly pointless, as it doesn't give the consumer of the library any chance to configure it. Inside SteamUser, where we use the values from A better approach would be where we use the values at this line: logon.Body.cell_id = details.CellID;to either check for the magic value zero and then use the configuration instead, or to make the value on the logon.Body.cell_id = details.CellID ?? Client.Configuration.CellID; |
This will set a default value if none has been set for CellID inside of the login details.
Codecov Report
@@ Coverage Diff @@
## master #722 +/- ##
==========================================
+ Coverage 22.63% 22.69% +0.05%
==========================================
Files 93 93
Lines 9568 9572 +4
Branches 795 795
==========================================
+ Hits 2166 2172 +6
+ Misses 7270 7268 -2
Partials 132 132
Continue to review full report at Codecov.
|
|
I figured it was simpler than what I was doing to get the configuration, embarrassed I missed where to access it. Thanks for the help! |
|
Thanks! |
closes #690
This is my first contribution so I'm still getting used to the project so any constructive criticism is welcome!
All I did was instantiate a configuration in the
LogOnDetailsandAnonymousLogOnDetailsconstructors and grab the CellID and set it. Let me know if I should've set the default value elsewhere or if there's a better way to do this.