当前位置:首页>>魔兽单机>>正文
模拟器假人自动回复信息系统-参考
2013-07-05 17:14:05 作者:网络 来源: 浏览次数:0
摘要:模拟器假人自动回复信息系统-mangos参考
 Index: ChatHandler.cpp
===================================================================
--- ChatHandler.cpp (revision 113)
+++ ChatHandler.cpp (working copy)
@@ -28,6 +28,7 @@
 #include "ChannelMgr.h"
 #include "Group.h"
 #include "Guild.h"
+#include "Config/ConfigEnv.h"//假人回化系统
 #include "ObjectAccessor.h"
 #include "ScriptCalls.h"
 #include "Player.h"
@@ -190,7 +191,28 @@
             Player *player = objmgr.GetPlayer(to.c_str());
             uint32 tSecurity = GetSecurity();
             uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
-            if(!player || tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers())
+ if(!player)
+ {
+ //GetPlayer()->Whisper(msg, lang,player->GetGUID());
+        std::string DummyPlayerAutoWhisper_1= sConfig.GetStringDefault("DummyPlayerAutoWhisper.1","");
+        std::string DummyPlayerAutoWhisper_2= sConfig.GetStringDefault("DummyPlayerAutoWhisper.2","");
+        std::string DummyPlayerAutoWhisper_3= sConfig.GetStringDefault("DummyPlayerAutoWhisper.3","");
+                std::string str ="";
+ switch ( rand()%3 )
+ {
+ case 0: str += DummyPlayerAutoWhisper_1;
+ break;
+ case 1: str += DummyPlayerAutoWhisper_2;
+ break;
+ case 2: str += DummyPlayerAutoWhisper_3;
+ break;
+ }
+ str += "|r";
+ sWorld.SendWorldTextCn(str.c_str(), NULL);
+ return;
+
+ }
+            if(tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers())
             {
                 WorldPacket data(SMSG_CHAT_PLAYER_NOT_FOUND, (to.size()+1));
                 data<<to;
 


相关报道:

[关闭] [返回顶部]


  返回首页 | 最新资讯 | 资源下载 | 魔兽图片 | 单机文档 | 技术攻略 | 玩家视频
备案号:蜀ICP备2024062380号-1
免责声明:本网站为热爱怀旧WOW的玩家们建立的魔兽世界资料网站,仅供交流和学习使用,非盈利和商用.如有侵权之处,请联系我们,我们会在24小时内确认删除侵权内容,谢谢合作。
Copyright © 2024 - 2024 WOWAII.COM Corporation, All Rights Reserved

机器人国度