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:
Kelsi 2026-03-25 14:21:19 -07:00
parent 56f8f5c592
commit e4194b1fc0
2 changed files with 122 additions and 121 deletions

View file

@ -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