diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-06-19 03:13:48 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-06-19 03:13:48 -0300 |
| commit | bd3a6a04601749cbde007eaabf803fb602ee2783 (patch) | |
| tree | 476b89932627aa73ad88de22d37e4617bbdb1795 /src/operate.cc | |
| parent | e5b8aadd493b8b5df4ed661f2491de33d634b001 (diff) | |
| download | game-bd3a6a04601749cbde007eaabf803fb602ee2783.tar.gz game-bd3a6a04601749cbde007eaabf803fb602ee2783.zip | |
beginning of `communication.cc`
Diffstat (limited to 'src/operate.cc')
| -rw-r--r-- | src/operate.cc | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/operate.cc b/src/operate.cc index 7dc1fef..aa061a8 100644 --- a/src/operate.cc +++ b/src/operate.cc @@ -2393,12 +2393,7 @@ void Talk(uint32 CreatureID, int Mode, const char *Addressee, const char *Text, uint32 StatementID = LogCommunication(CreatureID, Mode, 0, Text); TConnection *Connection = GetFirstConnection(); while(Connection != NULL){ - // TODO(fusion): Same as `AdvanceGame`. Definitely some inlined - // function to check whether the connection is in a valid state. - if(Connection->State == CONNECTION_LOGIN - || Connection->State == CONNECTION_GAME - || Connection->State == CONNECTION_DEAD - || Connection->State == CONNECTION_LOGOUT){ + if(Connection->Live()){ SendTalk(Connection, LogListener(StatementID, Connection->GetPlayer()), Creature->Name, Mode, Text, 0); @@ -2409,11 +2404,7 @@ void Talk(uint32 CreatureID, int Mode, const char *Addressee, const char *Text, }else if(Mode == TALK_ANONYMOUS_BROADCAST){ TConnection *Connection = GetFirstConnection(); while(Connection != NULL){ - // TODO(fusion): Same as above. - if(Connection->State == CONNECTION_LOGIN - || Connection->State == CONNECTION_GAME - || Connection->State == CONNECTION_DEAD - || Connection->State == CONNECTION_LOGOUT){ + if(Connection->Live()){ SendMessage(Connection, TALK_ADMIN_MESSAGE, Text); } |
