[代码]增加控制台的 聊天记录 功能

[代码]增加控制台的 聊天记录 功能
Index: C: / ascent svn / src / game / ChatHandler.cpp
===================================================================
---  C: / ascent svn / src / game / ChatHandler.cpp    (revision  1033 )
+++  C: / ascent svn / src / game / ChatHandler.cpp    (working copy)
@@ 
- 159 , 7   + 159 , 7  @@
             {
                 pGroup
-> SendPacketToAll(data);
             }
-              // sLog.outString("[party] %s: %s", _player->GetName(), msg.c_str());
+             sLog.outString( " [party] %s: %s " , _player -> GetName(), msg.c_str());
             delete data;
             pMsg
= msg.c_str();
             pMisc
= 0 ;
@@ 
- 188 , 7   + 188 , 8  @@
                         data2 
<<  uint32(C_R_DONT_HAVE_PERMISSION);
                         SendPacket(
& data2);
                     }
-                 }
+                     sLog.outString( " [gld:%s] %s: %s " , pGuild -> GetGuildName().c_str(), _player -> GetName(), msg.c_str());
+                 } 
             }
             pMsg
= msg.c_str();
             pMisc
= 0 ;
@@ 
- 216 , 6   + 217 , 7  @@
                         data2 
<<  uint32(C_R_DONT_HAVE_PERMISSION);
                         SendPacket(
& data2);
                     }
+                     sLog.outString( " [off:%s] %s: %s " , pGuild -> GetGuildName().c_str(), _player -> GetName(), msg.c_str());
                 }
             }
             pMsg
= msg.c_str();
@@ 
- 323 , 7   + 325 , 7  @@
             
if (chn) 
                 chn
-> Say(GetPlayer(),msg.c_str());
 
-              // sLog.outString("[%s] %s: %s", channel.c_str(), _player->GetName(), msg.c_str());
+             sLog.outString( " [chn:%s] %s: %s " , channel.c_str(), _player -> GetName(), msg.c_str());
             pMsg
= msg.c_str();
             pMisc
= channel.c_str();

你可能感兴趣的:([代码]增加控制台的 聊天记录 功能)