mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
refactor: add isInWorld() and replace 119 inline state+socket checks
Add GameHandler::isInWorld() helper that encapsulates the repeated 'state == IN_WORLD && socket' guard. Replace 99 negative checks and 20 positive checks across game_handler.cpp, plus fix 2 remaining C-style casts.
This commit is contained in:
parent
56f8f5c592
commit
e4194b1fc0
2 changed files with 122 additions and 121 deletions
|
|
@ -172,6 +172,7 @@ public:
|
|||
* Check if connected to world server
|
||||
*/
|
||||
bool isConnected() const;
|
||||
bool isInWorld() const { return state == WorldState::IN_WORLD && socket; }
|
||||
|
||||
/**
|
||||
* Get current connection state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue