diff --git a/.gitignore b/.gitignore index c9cf4afa..7426f713 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,8 @@ 3part/behaviac-3.6.40 3part/3part.rar php/phpcode -bin +bin/Debug +bin/Release obj lib php diff --git a/bin/close.sh b/bin/close.sh new file mode 100644 index 00000000..7bff5ace --- /dev/null +++ b/bin/close.sh @@ -0,0 +1,17 @@ +#!/bin/bash +path="$(cd $(dirname $0); pwd)" +pids=`ps -elf|grep node|grep -v grep|awk '{print $4}'` +function stop_pid() { + for pid in ${pids} + do + proname=`ls -l /proc/${pid}|grep exe|awk '{print $11}'` + if [[ ${proname} == ${path}/node ]];then + kill -9 ${pid} + echo "kill -9 ${pid}"; + + fi + done + echo "Stop Server PID is Success " +} + +stop_pid diff --git a/tools/start_server/1.txt b/bin/cmd.txt similarity index 96% rename from tools/start_server/1.txt rename to bin/cmd.txt index 4fc78200..11f78e5f 100644 --- a/tools/start_server/1.txt +++ b/bin/cmd.txt @@ -6,4 +6,4 @@ TESTS 2000 C /time TESTS 2000 C /time TESTS 2000 C /time TESTS 2000 C /chat 1 2 china -START +START \ No newline at end of file diff --git a/tools/start_server/kill.bat b/bin/kill.bat similarity index 100% rename from tools/start_server/kill.bat rename to bin/kill.bat diff --git a/bin/start.sh b/bin/start.sh new file mode 100644 index 00000000..f550c125 --- /dev/null +++ b/bin/start.sh @@ -0,0 +1,8 @@ +CURRENT_DIR=`pwd` +nohup $CURRENT_DIR/node actor 1 1 > /dev/null 2>&1 & +nohup $CURRENT_DIR/node game 1 1 > /dev/null 2>&1 & +nohup $CURRENT_DIR/node db 1 1 > /dev/null 2>&1 & +nohup $CURRENT_DIR/node login 1 1 > /dev/null 2>&1 & +nohup $CURRENT_DIR/node gateway 1 1 > /dev/null 2>&1 & +nohup $CURRENT_DIR/node world 1 1 > /dev/null 2>&1 & +echo Done! diff --git a/bin/start_rebot.sh b/bin/start_rebot.sh new file mode 100644 index 00000000..4a7283ed --- /dev/null +++ b/bin/start_rebot.sh @@ -0,0 +1 @@ + ./node robot 1 1 libo 1 1 \ No newline at end of file diff --git a/tools/rename_node.bat b/bin/win_rename_node.bat similarity index 93% rename from tools/rename_node.bat rename to bin/win_rename_node.bat index 20610183..a1bb09f1 100644 --- a/tools/rename_node.bat +++ b/bin/win_rename_node.bat @@ -1,4 +1,3 @@ -cd ../bin/Debug/ xcopy node.exe node_actor.exe /y xcopy node.exe node_game.exe /y xcopy node.exe node_db.exe /y diff --git a/bin/win_start_client_1.bat b/bin/win_start_client_1.bat new file mode 100644 index 00000000..127afaf9 --- /dev/null +++ b/bin/win_start_client_1.bat @@ -0,0 +1,4 @@ +start node_robot robot 1 1 libo 1 1 +#start node_robot robot 1 1 wac 1 1 +#start node_robot robot 1 1 libo 1 1999 +#start node_robot robot 1 1 wac 1 1999 \ No newline at end of file diff --git a/tools/start_server/start_client_2.bat b/bin/win_start_client_2.bat similarity index 68% rename from tools/start_server/start_client_2.bat rename to bin/win_start_client_2.bat index c2d22363..7841b103 100644 --- a/tools/start_server/start_client_2.bat +++ b/bin/win_start_client_2.bat @@ -1,6 +1,7 @@ -cd ../../bin/Debug/ -start node_robot robot 2 1 wac 1 1999 -start node_robot robot 2 1 libo 1 1999 +start node_robot robot 2 1 wac 1 1 +start node_robot robot 2 1 libo 1 1 +#start node_robot robot 2 1 wac 1 1999 +#start node_robot robot 2 1 libo 1 1999 #start node_robot robot 2 1 wac 1 1 #start node_robot robot 2 1 wac 2 2 #start node_robot robot 2 1 wac 3 3 diff --git a/tools/start_server/start_server_1.bat b/bin/win_start_server_1.bat similarity index 79% rename from tools/start_server/start_server_1.bat rename to bin/win_start_server_1.bat index 76a53a3f..166028c0 100644 --- a/tools/start_server/start_server_1.bat +++ b/bin/win_start_server_1.bat @@ -1,10 +1,9 @@ -cd ../../bin/Debug/ #一区 start node_actor actor 1 1 start node_game game 1 1 #start node_game game 1 2 start node_db db 1 1 -#start node_login login 1 1 +start node_login login 1 1 start node_gateway gateway 1 1 #start node_gateway gateway 1 2 start node_world world 1 1 \ No newline at end of file diff --git a/tools/start_server/start_server_2.bat b/bin/win_start_server_2.bat similarity index 91% rename from tools/start_server/start_server_2.bat rename to bin/win_start_server_2.bat index e2ba7b84..c14f5e3b 100644 --- a/tools/start_server/start_server_2.bat +++ b/bin/win_start_server_2.bat @@ -1,4 +1,3 @@ -cd ../../bin/Debug/ #二区 start node_actor actor 2 1 start node_game game 2 1 diff --git a/tools/start_server/start_server_cross.bat b/bin/win_start_server_cross.bat similarity index 63% rename from tools/start_server/start_server_cross.bat rename to bin/win_start_server_cross.bat index a337059f..640c6264 100644 --- a/tools/start_server/start_server_cross.bat +++ b/bin/win_start_server_cross.bat @@ -1,3 +1,2 @@ -cd ../../bin/Debug/ #跨服 start node_cross cross -100 1 \ No newline at end of file diff --git a/tools/start_server/start_server_initdb.bat b/bin/win_start_server_initdb.bat similarity index 91% rename from tools/start_server/start_server_initdb.bat rename to bin/win_start_server_initdb.bat index 759d5ddc..c8cefeeb 100644 --- a/tools/start_server/start_server_initdb.bat +++ b/bin/win_start_server_initdb.bat @@ -1,4 +1,3 @@ -cd ../../bin/Debug/ set /P rebot_value1=请输入区服 start node_actor actor %rebot_value1% 1 #start node_login login %rebot_value1% 1 diff --git a/tools/start_server/start_server_pushserverconfig.bat b/bin/win_start_server_pushserverconfig.bat similarity index 100% rename from tools/start_server/start_server_pushserverconfig.bat rename to bin/win_start_server_pushserverconfig.bat diff --git a/public/logic/public/public/brief/actor_brief.h b/public/logic/public/public/brief/actor_brief.h index 764290eb..ada676d9 100644 --- a/public/logic/public/public/brief/actor_brief.h +++ b/public/logic/public/public/brief/actor_brief.h @@ -45,37 +45,17 @@ namespace ngl { std::cout << "#####:" << (int64_t)(adata.m_data->m_vecinfo.m_data.get()) << std::endl; - return true; - if (adata.m_data->m_vecinfo.m_data == nullptr) - { - std::cout << "adata.m_vecinfo.m_data == nullptr" << std::endl; - return true; - } - - if (adata.m_data->m_vecinfo.m_isbinary) - { - std::cout << "adata.m_vecinfo.m_isbinary = "<< adata.m_data->m_vecinfo.m_isbinary << std::endl; - //return true; - } - for (auto& item : *adata.m_data->m_vecinfo.m_data) - { - std::string json; - if (tools::protostr(item, json)) - { - LogLocalError("recv actor_roleinfo [%]", json); - } - } - return true; - /*m_briefdb.update(*adata.m_vecinfo.m_data.get()); + + m_briefdb.update(*adata.m_data->m_vecinfo.m_data.get()); auto pro = std::make_shared(); - *pro = adata; + *pro = *adata.m_data; actor::static_send_actor(actor_guid::make_self(ACTOR_NOTICE), actor_guid::make(), pro); actor::static_send_actor(actor_guid::make_self(ACTOR_CHAT), actor_guid::make(), pro); actor::static_send_actor( actor_guid::make(ACTOR_CHAT,ttab_servers::tab()->m_crossarea, actor_guid::none_actordataid()), - actor_guid::make(), pro);*/ + actor_guid::make(), pro); return true; } diff --git a/server/libmycorekkk.zip b/server/libmycorekkk.zip deleted file mode 100644 index 1c58f9bf..00000000 Binary files a/server/libmycorekkk.zip and /dev/null differ diff --git a/tools/README.md b/tools/README.md deleted file mode 100644 index 2a6eaf93..00000000 --- a/tools/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# 鐩綍绠浠 - -## ./public - * ./public/copy_config.bat 鐢ㄦ潵鎷疯礉./public/copyfile涓殑鏂囦欢鍒癲ebug鐩綍涓 - * ./public/idl/build_idl.bat 鐢ㄦ潵鐢熸垚csv琛ㄤ互鍙婄浉鍏宠鍙栨簮鐮 - * ./public/proto/build_protocol.bat 鐢ㄦ潵鐢熸垚proto鍗忚鐩稿叧婧愮爜 - * ./public/rebuild.bat 鐢ㄦ潵鐢熸垚ub.cpp浠ュ姞閫熺紪璇 - -## ./start_server - * ./start_server/1.txt 鏈哄櫒浜虹殑绠鍗曟寚浠 - * ./start_server/kill.bat 鍏抽棴鎵鏈夋墦寮鐨勬湇鍔″櫒 - * ./start_server/start_client_1.bat 鍚姩1鍖烘満鍣ㄤ汉 - * ./start_server/start_client_2.bat 鍚姩2鍖烘満鍣ㄤ汉 - * ./start_server/start_server_1.bat 鍚姩1鍖烘湇鍔″櫒 - * ./start_server/start_server_2.bat 鍚姩2鍖烘湇鍔″櫒 - * ./start_server/start_server_cross.bat 鍚姩璺ㄦ湇鏈嶅姟鍣 - * ./start_server/start_server_initdb.bat 鐢ㄦ潵鍒涘缓鏈哄櫒浜烘暟鎹 - - - - - - diff --git a/tools/start_server/start_client_1.bat b/tools/start_server/start_client_1.bat deleted file mode 100644 index 894ac233..00000000 --- a/tools/start_server/start_client_1.bat +++ /dev/null @@ -1,4 +0,0 @@ -cd ../../bin/Debug/ -#start node_robot robot 1 1 libo 1 1 -start node_robot robot 1 1 libo 1 1999 -start node_robot robot 1 1 wac 1 1999 \ No newline at end of file