Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
aeaed6ff14 | ||
![]() |
7c1b5c67a7 | ||
![]() |
17ec97e887 | ||
![]() |
ce5e659264 | ||
![]() |
3bcf25f87f | ||
![]() |
277f2efbbd | ||
![]() |
92ed28634b | ||
![]() |
39a0fa64ce | ||
![]() |
afd81c3591 | ||
![]() |
e203bb62fc | ||
![]() |
2ccb754b1b | ||
![]() |
0a08d57364 | ||
![]() |
8c8df66ef1 | ||
![]() |
d8df1702a5 | ||
![]() |
c0995ab757 | ||
![]() |
c3982fb82f | ||
![]() |
80b1ab295e | ||
![]() |
e510f32eba | ||
![]() |
57a279386b | ||
![]() |
cf58ba53d3 | ||
![]() |
f10c8b30fd | ||
![]() |
9f88d10a66 | ||
![]() |
a7001bb2c9 | ||
![]() |
8f79147f93 | ||
![]() |
d5c79f62e9 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,4 +20,5 @@ __pycache__
|
||||
.user
|
||||
game.py
|
||||
*.cxx
|
||||
compile_commands.json
|
||||
compile_commands.json
|
||||
*.DS_Store
|
BIN
res/imserver/en/text.xlsx
Normal file
BIN
res/imserver/en/text.xlsx
Normal file
Binary file not shown.
@ -10,6 +10,14 @@ else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
if (${LIB_DIR})
|
||||
message(LIB_DIR: ${LIB_DIR})
|
||||
else()
|
||||
set(LIB_DIR )
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DNDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
|
||||
@ -32,7 +40,7 @@ include_directories(
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8engine/a8
|
||||
@ -101,7 +109,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
hiredis
|
||||
tinyxml2
|
||||
tcmalloc
|
||||
behaviac_gcc_debug
|
||||
behaviac_gcc_release
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
|
@ -10,6 +10,14 @@ else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
if (${LIB_DIR})
|
||||
message(LIB_DIR: ${LIB_DIR})
|
||||
else()
|
||||
set(LIB_DIR )
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DNDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
|
||||
@ -32,7 +40,7 @@ include_directories(
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8engine/a8
|
||||
@ -101,8 +109,8 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
curl
|
||||
hiredis
|
||||
tinyxml2
|
||||
# tcmalloc
|
||||
behaviac_gcc_debug
|
||||
# tcmalloc
|
||||
behaviac_gcc_release
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include<random>
|
||||
|
||||
#include <a8/timer.h>
|
||||
#include <a8/openssl.h>
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include <a8/timer.h>
|
||||
#include <a8/openssl.h>
|
||||
#include <a8/mutable_xobject.h>
|
||||
@ -642,6 +644,76 @@ void Guild::_CMGuildQuit(f8::MsgHdr& hdr, const cs::CMGuildQuit& msg)
|
||||
}
|
||||
}
|
||||
|
||||
void Guild::_CMGuildDismiss(f8::MsgHdr& hdr, const cs::CMGuildDismiss& msg)
|
||||
{
|
||||
cs::SMGuildDismiss respmsg;
|
||||
ss::SS_IM_ForwardGuildCMMsg *forward_msg = (ss::SS_IM_ForwardGuildCMMsg*)hdr.user_data;
|
||||
|
||||
GuildMember* sender = GetMember(forward_msg->context().user_info().base_data().account_id());
|
||||
if (!sender) {
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("server_internal_error", "server internal error"));
|
||||
respmsg.set_errcode(2);
|
||||
respmsg.set_errmsg(TEXT("server_internal_error", "server internal error"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(
|
||||
GetMemberJob(sender->account_id) == kGuildOwner
|
||||
)) {
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("permission_denied", "permission denied"));
|
||||
respmsg.set_errcode(3);
|
||||
respmsg.set_errmsg(TEXT("permission_denied", "permission denied"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
return;
|
||||
}
|
||||
|
||||
TraverseMember
|
||||
(
|
||||
[this] (GuildMember* member)
|
||||
{
|
||||
SyncHelper::Instance()->SyncGuildMemberQuit
|
||||
(this,
|
||||
member->account_id,
|
||||
member->account_id,
|
||||
kGuildDismisss);
|
||||
});
|
||||
|
||||
guild_status_ = kGuildDismissed;
|
||||
SaveToDB();
|
||||
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
{
|
||||
std::string ip;
|
||||
int port = 0;
|
||||
JsonDataMgr::Instance()->GetRankServerConf(ip, port);
|
||||
|
||||
a8::MutableXObject* params = a8::MutableXObject::NewObject();
|
||||
params->SetVal("guild_id", GuildId());
|
||||
|
||||
f8::HttpClientPool::Instance()->HttpGet
|
||||
(
|
||||
a8::XParams(),
|
||||
[] (a8::XParams& param, a8::XObject& data)
|
||||
{
|
||||
},
|
||||
[] (a8::XParams& param, const std::string& response)
|
||||
{
|
||||
},
|
||||
a8::Format("http://%s:%d/webapp/index.php?c=Guild&a=dismiss", {ip, port}).c_str(),
|
||||
*params,
|
||||
rand()
|
||||
);
|
||||
delete params;
|
||||
}
|
||||
}
|
||||
|
||||
void Guild::_CMGuildChange(f8::MsgHdr& hdr, const cs::CMGuildChange& msg)
|
||||
{
|
||||
cs::SMGuildChange respmsg;
|
||||
@ -649,9 +721,9 @@ void Guild::_CMGuildChange(f8::MsgHdr& hdr, const cs::CMGuildChange& msg)
|
||||
|
||||
GuildMember* sender = GetMember(forward_msg->context().user_info().base_data().account_id());
|
||||
if (!sender) {
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("server_internal_error", "服务器内部错误"));
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("server_internal_error", "server internal error"));
|
||||
respmsg.set_errcode(2);
|
||||
respmsg.set_errmsg(TEXT("server_internal_error", "服务器内部错误"));
|
||||
respmsg.set_errmsg(TEXT("server_internal_error", "server internal error"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
@ -661,9 +733,9 @@ void Guild::_CMGuildChange(f8::MsgHdr& hdr, const cs::CMGuildChange& msg)
|
||||
GetMemberJob(sender->account_id) == kGuildOwner ||
|
||||
GetMemberJob(sender->account_id) == kGuildAdmin
|
||||
)) {
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("permission_denied", "权限不够"));
|
||||
SendErrorMsg(hdr.socket_handle, forward_msg->context(), TEXT("permission_denied", "permission denied"));
|
||||
respmsg.set_errcode(3);
|
||||
respmsg.set_errmsg(TEXT("permission_denied", "权限不够"));
|
||||
respmsg.set_errmsg(TEXT("permission_denied", "permission denied"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
|
@ -22,6 +22,7 @@ public:
|
||||
void _CMGuildRefuse(f8::MsgHdr& hdr, const cs::CMGuildRefuse& msg);
|
||||
void _CMGuildKick(f8::MsgHdr& hdr, const cs::CMGuildKick& msg);
|
||||
void _CMGuildQuit(f8::MsgHdr& hdr, const cs::CMGuildQuit& msg);
|
||||
void _CMGuildDismiss(f8::MsgHdr& hdr, const cs::CMGuildDismiss& msg);
|
||||
void _CMGuildChange(f8::MsgHdr& hdr, const cs::CMGuildChange& msg);
|
||||
void _CMGuildMemberList(f8::MsgHdr& hdr, const cs::CMGuildMemberList& msg);
|
||||
void _CMGuildApplyList(f8::MsgHdr& hdr, const cs::CMGuildApplyList& msg);
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
hdr.user_data = &forward_msg;
|
||||
if (guild->Status() == kGuildDismissed) {
|
||||
cs::SMShowErrorMsg notifymsg;
|
||||
notifymsg.set_msg(TEXT("guild_dismissed", "战队已解散"));
|
||||
notifymsg.set_msg(TEXT("guild_dismissed", "force dismissed"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(socket_handle,
|
||||
forward_msg.context(),
|
||||
notifymsg);
|
||||
@ -68,7 +68,7 @@ public:
|
||||
void OnError()
|
||||
{
|
||||
cs::SMShowErrorMsg notifymsg;
|
||||
notifymsg.set_msg(TEXT("server_internal_error", "服务器内部错误"));
|
||||
notifymsg.set_msg(TEXT("server_internal_error", "server internal error"));
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(socket_handle,
|
||||
forward_msg.context(),
|
||||
notifymsg);
|
||||
@ -102,7 +102,7 @@ void GuildMgr::_SS_IM_ForwardGuildCMMsg(f8::MsgHdr& hdr, const ss::SS_IM_Forward
|
||||
}
|
||||
if (!IsValidGuildId(msg.guild_id())) {
|
||||
cs::SMShowErrorMsg respmsg;
|
||||
respmsg.set_msg(TEXT("server_internal_error", "服务器内部错误"));
|
||||
respmsg.set_msg(TEXT("server_internal_error", "server internal error"));
|
||||
ForwardGuildSMMsg(hdr.socket_handle, msg.context(), respmsg);
|
||||
return;
|
||||
}
|
||||
|
@ -141,6 +141,7 @@ void HandlerMgr::RegisterNetMsgHandlers()
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildRefuse);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildKick);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildQuit);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildDismiss);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildChange);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildMemberList);
|
||||
RegisterNetMsgHandler(&guild_msghandler, &Guild::_CMGuildApplyList);
|
||||
|
@ -181,5 +181,12 @@ std::string MetaMgr::ReplaceDirtyWord(const std::string& text, char c)
|
||||
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
||||
{
|
||||
auto itr = loader_->text_hash.find(textid);
|
||||
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
||||
if (itr != loader_->text_hash.end()) {
|
||||
return itr->second;
|
||||
}
|
||||
#if DEBUG
|
||||
return loader_->text_hash.empty() ? def_text : "";
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
@ -844,6 +844,8 @@ void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
||||
SendMsg(respmsg);
|
||||
return;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
#else
|
||||
if (role_data.today_create_guild_times >= MAX_DAILY_CREATE_GUILD_TIMES) {
|
||||
ShowErrorMsg(TEXT("today_create_guild_times_not_enough", "今日创建战队次数已达上限"));
|
||||
respmsg.set_errcode(1);
|
||||
@ -851,6 +853,7 @@ void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
||||
SendMsg(respmsg);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
++role_data.today_create_guild_times;
|
||||
|
||||
std::string ip;
|
||||
@ -1528,6 +1531,9 @@ void Player::FillMFUserInfo(cs::MFUserInfo* user_info)
|
||||
{
|
||||
TypeConvert::Convert(myself.base_data, *(user_info->mutable_base_data()));
|
||||
TypeConvert::Convert(myself.temp_custom_data, *(user_info->mutable_temp_custom_data()));
|
||||
#if 1
|
||||
user_info->mutable_base_data()->set_zid(zid);
|
||||
#endif
|
||||
{
|
||||
int target_channel = f8::ExtractChannelIdFromAccountId(user_info->base_data().account_id());
|
||||
App::Instance()->PreProcAvatarUrl
|
||||
|
@ -24,6 +24,7 @@ class Player
|
||||
long ip_saddr = 0;
|
||||
int account_registertime = 0;
|
||||
int red_point_flags_ = 0;
|
||||
int zid = 0;
|
||||
|
||||
int chat_channel = -1;
|
||||
std::string private_target;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include<random>
|
||||
|
||||
#include <a8/openssl.h>
|
||||
#include <a8/udplog.h>
|
||||
|
||||
@ -286,6 +288,7 @@ void PlayerMgr::_CMLoginOld(f8::MsgHdr& hdr, const cs::CMLoginOld& msg)
|
||||
new_msg.set_nickname(msg.nickname());
|
||||
new_msg.set_avatar_url(msg.avatar_url());
|
||||
new_msg.set_sex(msg.sex());
|
||||
//new_msg.set_zid(msg.zid());
|
||||
_CMLogin(hdr, new_msg);
|
||||
}
|
||||
|
||||
@ -531,7 +534,8 @@ void PlayerMgr::AsyncLogin2(const cs::CMLogin& msg)
|
||||
a8::XValue(data_set->at(0).at(10)).GetInt(), //guild_job
|
||||
a8::XValue(data_set->at(0).at(11)), //vip_lv
|
||||
a8::XValue(data_set->at(0).at(12)), //head
|
||||
a8::XValue(data_set->at(0).at(13)) //contribute
|
||||
a8::XValue(data_set->at(0).at(13)), //contribute
|
||||
msg->zid() //zid
|
||||
);
|
||||
}
|
||||
delete msg;
|
||||
@ -583,7 +587,8 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
|
||||
int guild_job,
|
||||
int vip_lv,
|
||||
int head,
|
||||
int contribute)
|
||||
int contribute,
|
||||
int zid)
|
||||
{
|
||||
f8::MsgHdr* hdr = GetHdrByAccountId(account_id);
|
||||
if (hdr) {
|
||||
@ -605,6 +610,7 @@ void PlayerMgr::AsyncLoginOnOk(const std::string& account_id,
|
||||
hum = new Player();
|
||||
hum->socket_handle = hdr->socket_handle;
|
||||
hum->ip_saddr = hdr->ip_saddr;
|
||||
hum->zid = zid;
|
||||
hum->gameid = f8::ExtractGameIdFromAccountId(account_id);
|
||||
hum->channel = f8::ExtractChannelIdFromAccountId(account_id);
|
||||
hum->myself.base_data.account_id = account_id;
|
||||
|
@ -104,7 +104,8 @@ class PlayerMgr : public a8::Singleton<PlayerMgr>
|
||||
int guild_job,
|
||||
int vip_lv,
|
||||
int head,
|
||||
int contribute);
|
||||
int contribute,
|
||||
int zid);
|
||||
void AsyncLoginOnError(const std::string& account_id,
|
||||
int step,
|
||||
int error_code,
|
||||
|
@ -1,4 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include "cs_proto.pb.h"
|
||||
|
@ -10,6 +10,14 @@ else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
if (${LIB_DIR})
|
||||
message(LIB_DIR: ${LIB_DIR})
|
||||
else()
|
||||
set(LIB_DIR )
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DNDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
|
||||
@ -32,7 +40,7 @@ include_directories(
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8engine/a8
|
||||
@ -101,7 +109,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
hiredis
|
||||
tinyxml2
|
||||
tcmalloc
|
||||
behaviac_gcc_debug
|
||||
behaviac_gcc_release
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
|
@ -36,7 +36,7 @@ void SvrMgr::_SS_WSP_RequestTargetServer(f8::MsgHdr& hdr, const ss::SS_WSP_Reque
|
||||
respmsg.set_port(node->port);
|
||||
} else {
|
||||
respmsg.set_error_code(1);
|
||||
respmsg.set_error_msg("无法分配节点");
|
||||
respmsg.set_error_msg("not found node");
|
||||
}
|
||||
WSListener::Instance()->SendMsg(hdr.socket_handle, respmsg);
|
||||
}
|
||||
|
@ -10,6 +10,14 @@ else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
if (${LIB_DIR})
|
||||
message(LIB_DIR: ${LIB_DIR})
|
||||
else()
|
||||
set(LIB_DIR )
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DNDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
|
||||
@ -32,7 +40,7 @@ include_directories(
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8engine/a8
|
||||
@ -102,7 +110,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
curl
|
||||
hiredis
|
||||
tinyxml2
|
||||
behaviac_gcc_debug
|
||||
behaviac_gcc_release
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
|
@ -13,6 +13,13 @@ enum InnerMesssage_e
|
||||
IM_HttpResponse,
|
||||
};
|
||||
|
||||
enum GuildStatus_e
|
||||
{
|
||||
kGuildCreatePending = 0,
|
||||
kGuildCreated = 1,
|
||||
kGuildDismissed = 2
|
||||
};
|
||||
|
||||
//网络处理对象
|
||||
enum NetHandler_e
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <random>
|
||||
|
||||
#include <a8/udplog.h>
|
||||
#include <a8/timer.h>
|
||||
#include <a8/openssl.h>
|
||||
@ -92,7 +94,7 @@ void DbToGuildBasic(const std::vector<std::string>& row, cs::MFGuildBasic* guild
|
||||
guild->set_owner_id(row[9]);
|
||||
guild->set_owner_name(row[10]);
|
||||
guild->set_owner_avatar_url(row[11]);
|
||||
guild->set__guild_status(a8::XValue(row[12]));
|
||||
guild->set__guild_status(a8::XValue(row[15]));
|
||||
guild->set_join_unlimited(a8::XValue(row[16]));
|
||||
guild->set_join_cond1(a8::XValue(row[17]));
|
||||
guild->set_join_cond2(a8::XValue(row[18]));
|
||||
@ -158,7 +160,7 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
long long guild_id = request->request.At("guild_id")->AsXValue();
|
||||
if (GetGuildById(guild_id)) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guildid_already_exists", "guild_id已经存在"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guildid_already_exists", "guild id already exists"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -167,7 +169,7 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
TypeConvert::Convert(request, guild);
|
||||
if (guild->guild_name().empty()) {
|
||||
request->resp_xobj->SetVal("errcode", 2);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_cannt_emtpy", "战队名字不能为空"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_cannt_emtpy", "guild name is emtpy"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
@ -181,31 +183,31 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
guild->guild_name()
|
||||
)) {
|
||||
request->resp_xobj->SetVal("errcode", 3);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_already_exists", "战队名已经存在"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_already_exists", "guild name already exists"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
if (a8::GetUtf8Length(guild->guild_name().c_str()) > MAX_GUILD_NAME_LEN) {
|
||||
request->resp_xobj->SetVal("errcode", 3);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_too_long", "战队名字长度超过限制"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_too_long", "guild name too long"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
if (a8::GetUtf8Length(guild->guild_declaration().c_str()) > MAX_GUILD_DECLARATION_LEN) {
|
||||
request->resp_xobj->SetVal("errcode", 3);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_too_long", "战队宣言长度超过限制"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_too_long", "guild declaration too long"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
if (MetaMgr::Instance()->HasDirtyWord(guild->guild_name())) {
|
||||
request->resp_xobj->SetVal("errcode", 4);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_has_forbid_word", "战队名含有违禁字符"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_has_forbid_word", "guild name has forbid word"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
if (MetaMgr::Instance()->HasDirtyWord(guild->guild_declaration())) {
|
||||
request->resp_xobj->SetVal("errcode", 5);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_has_forbid_word", "战队宣言含有违禁字符"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_has_forbid_word", "guild declaration has forbid word"));
|
||||
delete guild;
|
||||
return;
|
||||
}
|
||||
@ -294,7 +296,7 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
{
|
||||
std::string response;
|
||||
request->resp_xobj->SetVal("errcode", 2);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "服务器内部错误"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "server internal error"));
|
||||
request->resp_xobj->ToJsonStr(response);
|
||||
IMListener::Instance()->SendText(request->socket_handle, a8::HttpResponse(response));
|
||||
}
|
||||
@ -360,6 +362,22 @@ void GuildMgr::__GuildSearch(f8::JsonHttpRequest* request)
|
||||
delete guild_list;
|
||||
}
|
||||
|
||||
void GuildMgr::__GuildDismiss(f8::JsonHttpRequest* request)
|
||||
{
|
||||
if (!load_done_) {
|
||||
request->resp_xobj->SetVal("errcode", 2);
|
||||
request->resp_xobj->SetVal("errmsg", "");
|
||||
return;
|
||||
}
|
||||
long long guild_id = request->request.At("guild_id")->AsXValue();
|
||||
cs::MFGuildBasic* guild = GetGuildById(guild_id);
|
||||
if (guild) {
|
||||
guild->set__guild_status(kGuildDismissed);
|
||||
}
|
||||
request->resp_xobj->SetVal("errcode", 0);
|
||||
request->resp_xobj->SetVal("errmsg", "");
|
||||
}
|
||||
|
||||
void GuildMgr::__GuildUpdate(f8::JsonHttpRequest* request)
|
||||
{
|
||||
if (!load_done_) {
|
||||
@ -393,7 +411,7 @@ void GuildMgr::__GuildRename(f8::JsonHttpRequest* request)
|
||||
{
|
||||
if (!load_done_) {
|
||||
request->resp_xobj->SetVal("errcode", 2);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "服务器内部错误"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "server internal error"));
|
||||
return;
|
||||
}
|
||||
request->resp_xobj->SetVal("errcode", 0);
|
||||
@ -405,13 +423,13 @@ void GuildMgr::__GuildRename(f8::JsonHttpRequest* request)
|
||||
cs::MFGuildBasic* guild = GetGuildById(guild_id);
|
||||
if (!guild) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "服务器内部错误"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "server internal error"));
|
||||
return;
|
||||
}
|
||||
if (guild->guild_declaration() != guild_declaration) {
|
||||
if (MetaMgr::Instance()->HasDirtyWord(guild_declaration)) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_has_forbid_word", "战队宣言含有违禁字符"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_has_forbid_word", "guild declaration has forbid word"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -422,7 +440,7 @@ void GuildMgr::__GuildRename(f8::JsonHttpRequest* request)
|
||||
}
|
||||
if (guild_name.empty()) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_cannt_emtpy", "战队名不能为空"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_cannt_emtpy", "guild name is emtpy"));
|
||||
return;
|
||||
}
|
||||
if (GetGuildByName(guild->_gameid(),
|
||||
@ -431,22 +449,22 @@ void GuildMgr::__GuildRename(f8::JsonHttpRequest* request)
|
||||
guild->_name_ext2(),
|
||||
guild_name)) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_already_exists", "战队名已经存在"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_already_exists", "guild name already exists"));
|
||||
return;
|
||||
}
|
||||
if (a8::GetUtf8Length(guild_name.c_str()) > MAX_GUILD_NAME_LEN) {
|
||||
request->resp_xobj->SetVal("errcode", 3);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_too_long", "战队名字长度超过限制"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_too_long", "guild name too long"));
|
||||
return;
|
||||
}
|
||||
if (a8::GetUtf8Length(guild_declaration.c_str()) > MAX_GUILD_DECLARATION_LEN) {
|
||||
request->resp_xobj->SetVal("errcode", 3);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_too_long", "战队宣言长度超过限制"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_declaration_too_long", "guild declaration too long"));
|
||||
return;
|
||||
}
|
||||
if (MetaMgr::Instance()->HasDirtyWord(guild_name)) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_has_forbid_word", "战队名含有违禁字符"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("guild_name_has_forbid_word", "guild name has forbidword"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -495,7 +513,7 @@ void GuildMgr::__GuildRename(f8::JsonHttpRequest* request)
|
||||
{
|
||||
std::string response;
|
||||
request->resp_xobj->SetVal("errcode", 2);
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "服务器内部错误"));
|
||||
request->resp_xobj->SetVal("errmsg", TEXT("server_internal_error", "server internal error"));
|
||||
request->resp_xobj->ToJsonStr(response);
|
||||
IMListener::Instance()->SendText(request->socket_handle, a8::HttpResponse(response));
|
||||
}
|
||||
@ -548,10 +566,19 @@ void GuildMgr::__GuildDirtyWordCheck(f8::JsonHttpRequest* request)
|
||||
std::string text = request->request.At("text")->AsXValue();
|
||||
if (MetaMgr::Instance()->HasDirtyWord(text)) {
|
||||
request->resp_xobj->SetVal("errcode", 1);
|
||||
request->resp_xobj->SetVal("errmsg", "含有屏蔽字符");
|
||||
request->resp_xobj->SetVal("errmsg", "has forbid word");
|
||||
}
|
||||
}
|
||||
|
||||
void GuildMgr::__GuildDirtyWordReplace(f8::JsonHttpRequest* request)
|
||||
{
|
||||
std::string text = request->request.At("text")->AsXValue();
|
||||
std::string new_text = MetaMgr::Instance()->ReplaceDirtyWord(text, '*');
|
||||
request->resp_xobj->SetVal("errcode", 0);
|
||||
request->resp_xobj->SetVal("errmsg", "");
|
||||
request->resp_xobj->SetVal("new_text", new_text);
|
||||
}
|
||||
|
||||
void GuildMgr::__GenTestData(f8::JsonHttpRequest* request)
|
||||
{
|
||||
}
|
||||
@ -780,7 +807,7 @@ void GuildMgr::UpdateRank(cs::MFGuildBasic* guild)
|
||||
guild->_gameid(),
|
||||
rank_cmp_func_,
|
||||
MAX_RANK_LIST_NUM);
|
||||
if (guild->_guild_status() == 2 ||
|
||||
if (guild->_guild_status() == kGuildDismissed ||
|
||||
guild->member_num() <= 0) {
|
||||
rank_list->Remove(guild);
|
||||
} else {
|
||||
@ -794,7 +821,7 @@ void GuildMgr::UpdateRank(cs::MFGuildBasic* guild)
|
||||
guild->_gameid(),
|
||||
sorted_cmp_func_,
|
||||
MAX_SORTED_LIST_NUM);
|
||||
if (guild->_guild_status() == 2 ||
|
||||
if (guild->_guild_status() == kGuildDismissed ||
|
||||
guild->member_num() <= 0) {
|
||||
rank_list->Remove(guild);
|
||||
} else {
|
||||
@ -905,7 +932,9 @@ void GuildMgr::InternalSearch(const std::string& account_id,
|
||||
for (auto guild : commonrank->GetList()) {
|
||||
if (search_name.empty() ||
|
||||
guild->guild_name().find(search_name) != std::string::npos) {
|
||||
matched_list.push_back(guild);
|
||||
if (guild->_guild_status() != kGuildDismissed) {
|
||||
matched_list.push_back(guild);
|
||||
}
|
||||
}
|
||||
}
|
||||
std::shuffle(matched_list.begin(), matched_list.end(), std::default_random_engine(rand()));
|
||||
|
@ -21,11 +21,13 @@ class GuildMgr : public a8::Singleton<GuildMgr>
|
||||
|
||||
void __GuildCreate(f8::JsonHttpRequest* request);
|
||||
void __GuildSearch(f8::JsonHttpRequest* request);
|
||||
void __GuildDismiss(f8::JsonHttpRequest* request);
|
||||
void __GuildUpdate(f8::JsonHttpRequest* request);
|
||||
void __GuildRename(f8::JsonHttpRequest* request);
|
||||
void __GuildRank(f8::JsonHttpRequest* request);
|
||||
void __GuildConfirmed(f8::JsonHttpRequest* request);
|
||||
void __GuildDirtyWordCheck(f8::JsonHttpRequest* request);
|
||||
void __GuildDirtyWordReplace(f8::JsonHttpRequest* request);
|
||||
void __GenTestData(f8::JsonHttpRequest* request);
|
||||
|
||||
private:
|
||||
|
@ -40,6 +40,11 @@ void HandlerMgr::Init()
|
||||
{
|
||||
GuildMgr::Instance()->__GuildSearch(request);
|
||||
});
|
||||
RegisterGMMsgHandler("Guild@dismiss",
|
||||
[] (f8::JsonHttpRequest* request)
|
||||
{
|
||||
GuildMgr::Instance()->__GuildDismiss(request);
|
||||
});
|
||||
RegisterGMMsgHandler("Guild@update",
|
||||
[] (f8::JsonHttpRequest* request)
|
||||
{
|
||||
@ -65,6 +70,11 @@ void HandlerMgr::Init()
|
||||
{
|
||||
GuildMgr::Instance()->__GuildDirtyWordCheck(request);
|
||||
});
|
||||
RegisterGMMsgHandler("Guild@dirtyWordReplace",
|
||||
[] (f8::JsonHttpRequest* request)
|
||||
{
|
||||
GuildMgr::Instance()->__GuildDirtyWordReplace(request);
|
||||
});
|
||||
RegisterGMMsgHandler("Guild@genTestData",
|
||||
[] (f8::JsonHttpRequest* request)
|
||||
{
|
||||
|
@ -17,6 +17,18 @@
|
||||
#define METAMGR_READ_STR(field_name, def_val) MetaMgr::Instance()->field_name = \
|
||||
a8::XValue(MetaMgr::Instance()->GetSysParamAsString(#field_name, def_val)).GetString();
|
||||
|
||||
static bool PureEnglishName(const std::string& role_name)
|
||||
{
|
||||
for (size_t i = 0; i < role_name.size(); i++) {
|
||||
if (role_name[i] >= 0 && role_name[i] <= 127) {
|
||||
continue;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
class MetaDataLoader
|
||||
{
|
||||
public:
|
||||
@ -130,8 +142,43 @@ bool MetaMgr::HasDirtyWord(const std::string& text)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string MetaMgr::ReplaceDirtyWord(const std::string& text, char c)
|
||||
{
|
||||
std::string result;
|
||||
result.reserve(text.size());
|
||||
for (size_t i = 0; i < text.size(); i++) {
|
||||
bool found = false;
|
||||
for (auto itr = loader_->dirty_words.begin(); itr != loader_->dirty_words.end(); ++itr) {
|
||||
if (itr->first <= text.size() - i) {
|
||||
std::string substr = text.substr(i, itr->first);
|
||||
// 如果是纯英文,则先转为小写,根据策划说明,屏蔽字大小写不敏感
|
||||
if (PureEnglishName(substr)) {
|
||||
transform(substr.begin(), substr.end(), substr.begin(), ::tolower);
|
||||
}
|
||||
if (substr.size() > 0 && itr->second.find(substr) != itr->second.end()) {
|
||||
int str_len = a8::GetUtf8Length(substr.c_str());
|
||||
for (int j = 0; j < str_len; j++) {
|
||||
result.push_back(c);
|
||||
}
|
||||
i += substr.size() - 1;
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}//endfor map
|
||||
if (!found) {
|
||||
result.push_back(text[i]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
|
||||
{
|
||||
auto itr = loader_->text_hash.find(textid);
|
||||
#ifdef DEBUG
|
||||
return itr != loader_->text_hash.end() ? itr->second : def_text;
|
||||
#else
|
||||
return itr != loader_->text_hash.end() ? itr->second : "";
|
||||
#endif
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
||||
void Reload();
|
||||
|
||||
bool HasDirtyWord(const std::string& text);
|
||||
std::string ReplaceDirtyWord(const std::string& text, char c);
|
||||
std::string GetText(const std::string& textid, const std::string& def_text="");
|
||||
|
||||
private:
|
||||
|
@ -10,6 +10,14 @@ else()
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
message("debug mode")
|
||||
endif()
|
||||
|
||||
if (${LIB_DIR})
|
||||
message(LIB_DIR: ${LIB_DIR})
|
||||
else()
|
||||
set(LIB_DIR )
|
||||
message(LIB_DIR: ${LIB_DIR} )
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g -std=gnu++11 -DNDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -std=gnu++11 -DDEBUG -DGAME_ID=${GAME_ID} ")
|
||||
|
||||
@ -32,7 +40,7 @@ include_directories(
|
||||
link_directories(
|
||||
/usr/lib64/mysql
|
||||
/usr/local/lib
|
||||
../../third_party/behaviac/lib
|
||||
../../third_party/behaviac/lib/${LIB_DIR}
|
||||
)
|
||||
|
||||
aux_source_directory(../../third_party/a8engine/a8
|
||||
@ -101,7 +109,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
hiredis
|
||||
tinyxml2
|
||||
tcmalloc
|
||||
behaviac_gcc_debug
|
||||
behaviac_gcc_release
|
||||
)
|
||||
else()
|
||||
target_link_libraries(
|
||||
|
@ -57,6 +57,7 @@ message MFBaseUserData
|
||||
optional int32 vip_lv = 8 [default = 0]; //性别
|
||||
optional int32 head = 9 [default = 0]; //头像框
|
||||
optional int32 contribute = 10 [default = 0]; //贡献度
|
||||
optional int32 zid = 11 [default = 0]; //zid
|
||||
|
||||
optional int64 user_value1 = 50; //用户字段1
|
||||
optional int64 user_value2 = 51; //用户字段2
|
||||
@ -187,6 +188,7 @@ message CMLogin
|
||||
optional string avatar_url = 7; //头像
|
||||
optional int32 vip_lv = 8; //性别
|
||||
optional int32 head = 9; //头像框
|
||||
optional int32 zid = 10; //zid
|
||||
}
|
||||
|
||||
//登录回复
|
||||
|
131
server/tools/protobuild/out/cs_msgid.proto
Normal file
131
server/tools/protobuild/out/cs_msgid.proto
Normal file
@ -0,0 +1,131 @@
|
||||
package cs;
|
||||
|
||||
enum CMMessageId_e
|
||||
{
|
||||
_CMPing = 101;
|
||||
|
||||
_CMLogin = 103;
|
||||
|
||||
_CMFriendInvite = 105;
|
||||
_CMFriendAgree = 106;
|
||||
_CMFriendDelete = 108;
|
||||
_CMFriendApply = 109;
|
||||
_CMFriendApplyList = 110;
|
||||
_CMFriendBlackList = 111;
|
||||
_CMFriendAddBlack = 112;
|
||||
_CMFriendDeleteBlack = 113;
|
||||
_CMFriendRefuse = 114;
|
||||
_CMFriendList = 115;
|
||||
_CMQueryUserStatus = 116;
|
||||
_CMRecommandFriend = 117;
|
||||
_CMFriendIdList = 118;
|
||||
|
||||
_CMSendChatMsg = 151;
|
||||
_CMSendCustomMsg = 152;
|
||||
_CMUpdateTempCustomData = 153;
|
||||
_CMUpdateUserInfo = 154;
|
||||
_CMDirtyWordCheck = 155;
|
||||
_CMGetUserGuild = 156;
|
||||
_CMReadMsgAndOpenChatNotify = 157;
|
||||
_CMCloseChatNotify = 158;
|
||||
_CMSetCurrPrivateChatTarget = 159;
|
||||
|
||||
_CMGuildMsgBegin = 230;
|
||||
_CMGuildCreate = 231;
|
||||
_CMGuildJoin = 232;
|
||||
_CMGuildAgree = 233;
|
||||
_CMGuildKick = 234;
|
||||
_CMGuildQuit = 235;
|
||||
_CMGuildDismiss = 236;
|
||||
_CMGuildChange = 237;
|
||||
_CMGuildInfo = 238;
|
||||
_CMGuildSearch = 239;
|
||||
_CMGuildRank = 240;
|
||||
_CMGuildMemberList = 241;
|
||||
_CMGuildApplyList = 242;
|
||||
_CMGuildLog = 243;
|
||||
_CMGuildMemberSetJob = 244;
|
||||
_CMGuildRefuse = 245;
|
||||
_CMGuildAgreeInvite = 246;
|
||||
_CMGuildGainExp = 247;
|
||||
_CMGuildSearchMember = 248;
|
||||
_CMGuildMsgEnd = 270;
|
||||
|
||||
_CMTeamCreate = 301;
|
||||
_CMTeamJoin = 302;
|
||||
_CMTeamAgree = 303;
|
||||
_CMTeamKick = 304;
|
||||
_CMTeamQuit = 305;
|
||||
_CMTeamDismiss = 306;
|
||||
_CMTeamRename = 307;
|
||||
|
||||
}
|
||||
|
||||
enum SMMessageId_e
|
||||
{
|
||||
_SMPing = 101;
|
||||
_SMRpcError = 102;
|
||||
|
||||
_SMLogin = 103;
|
||||
|
||||
_SMFriendInvite = 105;
|
||||
_SMFriendAgree = 106;
|
||||
_SMFriendDelete = 108;
|
||||
_SMFriendApply = 109;
|
||||
_SMFriendApplyList = 110;
|
||||
_SMFriendBlackList = 111;
|
||||
_SMFriendAddBlack = 112;
|
||||
_SMFriendDeleteBlack = 113;
|
||||
_SMFriendRefuse = 114;
|
||||
_SMFriendList = 115;
|
||||
_SMQueryUserStatus = 116;
|
||||
_SMRecommandFriend = 117;
|
||||
_SMFriendIdList = 118;
|
||||
|
||||
_SMDirtyWordCheck = 155;
|
||||
_SMGetUserGuild = 156;
|
||||
|
||||
_SMGuildMsgBegin = 230;
|
||||
_SMGuildCreate = 231;
|
||||
_SMGuildJoin = 232;
|
||||
_SMGuildAgree = 233;
|
||||
_SMGuildKick = 234;
|
||||
_SMGuildQuit = 235;
|
||||
_SMGuildDismiss = 236;
|
||||
_SMGuildChange = 237;
|
||||
_SMGuildInfo = 238;
|
||||
_SMGuildSearch = 239;
|
||||
_SMGuildRank = 240;
|
||||
_SMGuildMemberList = 241;
|
||||
_SMGuildApplyList = 242;
|
||||
_SMGuildLog = 243;
|
||||
_SMGuildMemberSetJob = 244;
|
||||
_SMGuildRefuse = 245;
|
||||
_SMGuildAgreeInvite = 246;
|
||||
_SMGuildGainExp = 247;
|
||||
_SMGuildSearchMember = 248;
|
||||
_SMGuildMsgEnd = 270;
|
||||
|
||||
_SMTeamCreate = 301;
|
||||
_SMTeamJoin = 302;
|
||||
_SMTeamAgree = 303;
|
||||
_SMTeamKick = 304;
|
||||
_SMTeamQuit = 305;
|
||||
_SMTeamDismiss = 306;
|
||||
_SMTeamRename = 307;
|
||||
|
||||
_SMUserStatusNotify = 501;
|
||||
_SMUserInfoUpdate = 502;
|
||||
_SMCustomMsgNotify = 503;
|
||||
_SMUserTempCustomDataUpdate = 504;
|
||||
_SMDeleteFriendNotify = 505;
|
||||
_SMUpdateAccountInfo = 506;
|
||||
_SMUpdateRedPointNotify = 507;
|
||||
_SMShowErrorMsg = 508;
|
||||
_SMAddBlackListNotify = 509;
|
||||
_SMDeleteBlackListNotify = 510;
|
||||
_SMUpdateChatRedPointNotify = 511;
|
||||
_SMUpdateChatChannelLastId = 512;
|
||||
_SMUpdatePrivateChatRedPointNotify = 513;
|
||||
_SMChatMsgNotify = 514;
|
||||
}
|
738
server/tools/protobuild/out/cs_proto.proto
Normal file
738
server/tools/protobuild/out/cs_proto.proto
Normal file
@ -0,0 +1,738 @@
|
||||
package cs;
|
||||
|
||||
enum Constant_e
|
||||
{
|
||||
ProtoVersion = 2020061101;
|
||||
}
|
||||
|
||||
message CMPing
|
||||
{
|
||||
}
|
||||
message SMPing
|
||||
{
|
||||
optional int32 param1 = 1;
|
||||
}
|
||||
|
||||
message MFStringTuple
|
||||
{
|
||||
repeated string values = 1;
|
||||
}
|
||||
|
||||
message MFPairInt32
|
||||
{
|
||||
optional int32 key = 1;
|
||||
optional int32 val = 2;
|
||||
}
|
||||
|
||||
message MFPairInt64
|
||||
{
|
||||
optional int64 key = 1;
|
||||
optional int64 val = 2;
|
||||
}
|
||||
|
||||
message MFPaging
|
||||
{
|
||||
optional int32 curr_page = 1;
|
||||
optional int32 page_size = 2;
|
||||
optional int32 _total_page = 3;
|
||||
optional int32 _total_count = 4;
|
||||
}
|
||||
|
||||
message MFBaseUserData
|
||||
{
|
||||
optional string account_id = 1;
|
||||
optional string nickname = 2;
|
||||
optional string avatar_url = 3;
|
||||
optional int32 sex = 4;
|
||||
optional int32 last_login_time = 5;
|
||||
optional int64 guild_id = 6;
|
||||
optional int32 guild_job = 7;
|
||||
optional int32 vip_lv = 8 [default = 0];
|
||||
optional int32 head = 9 [default = 0];
|
||||
optional int32 contribute = 10 [default = 0];
|
||||
optional int32 zid = 11 [default = 0];
|
||||
|
||||
optional int64 user_value1 = 50;
|
||||
optional int64 user_value2 = 51;
|
||||
optional int64 user_value3 = 52;
|
||||
optional int64 base_data_version = 100;
|
||||
|
||||
optional int32 _online = 101;
|
||||
}
|
||||
|
||||
message MFUserTempCustomData
|
||||
{
|
||||
optional int64 value1 = 1 [default = 0];
|
||||
optional int64 value2 = 2 [default = 0];
|
||||
optional int64 value3 = 3 [default = 0];
|
||||
}
|
||||
|
||||
message MFAccountInfo
|
||||
{
|
||||
optional MFUserInfo user_info = 1;
|
||||
optional string user_sign = 2;
|
||||
}
|
||||
|
||||
message MFUserInfo
|
||||
{
|
||||
optional MFBaseUserData base_data = 1;
|
||||
optional MFUserTempCustomData temp_custom_data = 2;
|
||||
optional int32 is_sys_user = 3;
|
||||
}
|
||||
|
||||
message MFUserStatus
|
||||
{
|
||||
optional string account_id = 1;
|
||||
optional int32 _online = 2;
|
||||
optional MFUserTempCustomData temp_custom_data = 3;
|
||||
}
|
||||
|
||||
message MFFriendApply
|
||||
{
|
||||
optional int64 idx = 1;
|
||||
optional int64 applyid = 2;
|
||||
optional string target_id = 3;
|
||||
optional MFBaseUserData base_data = 4;
|
||||
}
|
||||
|
||||
message MFGuildApply
|
||||
{
|
||||
optional int64 idx = 1;
|
||||
optional int64 applyid = 2;
|
||||
optional int64 guild_id = 3;
|
||||
optional MFBaseUserData base_data = 4;
|
||||
}
|
||||
|
||||
message MFGuildBasic
|
||||
{
|
||||
optional int64 guild_id = 1;
|
||||
optional string guild_name = 2;
|
||||
optional int32 guild_lv = 3;
|
||||
optional double guild_exp = 4;
|
||||
optional int32 guild_badge = 5;
|
||||
optional int32 member_num = 6;
|
||||
optional string guild_declaration = 7;
|
||||
optional string owner_id = 8;
|
||||
optional string owner_name = 9;
|
||||
optional string owner_avatar_url = 10;
|
||||
optional int32 owner_sex = 23;
|
||||
optional int32 owner_vip_lv = 12 [default = 0];
|
||||
optional int32 owner_head = 13 [default = 0];
|
||||
optional int32 join_unlimited = 11;
|
||||
optional int32 join_cond1 = 20;
|
||||
optional int32 join_cond2 = 21;
|
||||
optional int32 applyed = 22;
|
||||
|
||||
optional int32 _gameid = 100;
|
||||
optional int32 _channel = 101;
|
||||
optional int32 _createtime = 102;
|
||||
optional int32 _modifytime = 103;
|
||||
optional int64 _name_ext1 = 104;
|
||||
optional int64 _name_ext2 = 105;
|
||||
optional int64 _guild_status = 106;
|
||||
}
|
||||
|
||||
|
||||
message MFChatMsg
|
||||
{
|
||||
optional int64 msg_uuid = 1;
|
||||
optional MFUserInfo sender = 2;
|
||||
optional MFUserInfo receiver = 3;
|
||||
optional int32 chat_channel = 4;
|
||||
optional int32 msg_type = 5;
|
||||
optional string msg_body = 6;
|
||||
optional int32 send_time = 7;
|
||||
}
|
||||
|
||||
message CMLoginCommonHead
|
||||
{
|
||||
optional int32 server_id = 1;
|
||||
}
|
||||
message CMLoginOld
|
||||
{
|
||||
optional string account_id = 3;
|
||||
optional string session_id = 20;
|
||||
optional string nickname = 4;
|
||||
optional string avatar_url = 5;
|
||||
optional int32 sex = 6;
|
||||
}
|
||||
message CMLogin
|
||||
{
|
||||
optional int32 server_id = 1;
|
||||
optional string reserved2 = 2;
|
||||
optional string account_id = 3;
|
||||
optional string session_id = 20;
|
||||
optional string nickname = 4;
|
||||
optional int32 proto_version = 5;
|
||||
optional int32 sex = 6;
|
||||
optional string avatar_url = 7;
|
||||
optional int32 vip_lv = 8;
|
||||
optional int32 head = 9;
|
||||
optional int32 zid = 10;
|
||||
}
|
||||
|
||||
message SMLogin
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFAccountInfo account_info = 3;
|
||||
}
|
||||
|
||||
message CMUpdateUserInfo
|
||||
{
|
||||
optional string nickname = 2;
|
||||
optional string avatar_url = 3;
|
||||
optional int32 sex = 4;
|
||||
optional int32 vip_lv = 8;
|
||||
optional int32 head = 9;
|
||||
optional int32 contribute = 10;
|
||||
|
||||
optional int64 user_value1 = 50;
|
||||
optional int64 user_value2 = 51;
|
||||
optional int64 user_value3 = 52;
|
||||
|
||||
optional int32 delay_time = 100;
|
||||
optional int32 delay_flag = 101;
|
||||
}
|
||||
|
||||
message CMDirtyWordCheck
|
||||
{
|
||||
optional string text = 2;
|
||||
}
|
||||
message SMDirtyWordCheck
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGetUserGuild
|
||||
{
|
||||
optional string account_id = 1;
|
||||
}
|
||||
message SMGetUserGuild
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional string account_id = 3;
|
||||
optional int64 guild_id = 4;
|
||||
optional int32 guild_job = 5;
|
||||
}
|
||||
|
||||
message CMFriendList
|
||||
{
|
||||
}
|
||||
message SMFriendList
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
repeated MFUserInfo friend_list = 3;
|
||||
}
|
||||
|
||||
message CMFriendApply
|
||||
{
|
||||
optional string friend_id = 1;
|
||||
optional string msg = 2;
|
||||
}
|
||||
message SMFriendApply
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMFriendApplyList
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
}
|
||||
message SMFriendApplyList
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFFriendApply apply_list = 4;
|
||||
}
|
||||
|
||||
message CMFriendAgree
|
||||
{
|
||||
optional MFFriendApply apply = 1;
|
||||
}
|
||||
message SMFriendAgree
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMFriendRefuse
|
||||
{
|
||||
optional MFFriendApply apply = 1;
|
||||
}
|
||||
message SMFriendRefuse
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMFriendDelete
|
||||
{
|
||||
optional string friend_id = 1;
|
||||
}
|
||||
message SMFriendDelete
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional string friend_id = 3;
|
||||
}
|
||||
|
||||
message CMFriendBlackList
|
||||
{
|
||||
}
|
||||
message SMFriendBlackList
|
||||
{
|
||||
repeated MFUserInfo black_list = 1;
|
||||
}
|
||||
|
||||
message CMFriendAddBlack
|
||||
{
|
||||
optional MFUserInfo user_info = 1;
|
||||
}
|
||||
message SMFriendAddBlack
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMFriendDeleteBlack
|
||||
{
|
||||
optional string account_id = 1;
|
||||
}
|
||||
message SMFriendDeleteBlack
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMFriendIdList
|
||||
{
|
||||
}
|
||||
message SMFriendIdList
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
repeated string friends = 3;
|
||||
repeated string blacklist = 4;
|
||||
}
|
||||
|
||||
message CMTeamCreate
|
||||
{
|
||||
optional string team_name = 1;
|
||||
}
|
||||
message SMTeamCreate
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamJoin
|
||||
{
|
||||
optional int64 team_id = 1;
|
||||
}
|
||||
message SMTeamJoin
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamAgree
|
||||
{
|
||||
}
|
||||
message SMTeamAgree
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamKick
|
||||
{
|
||||
optional string account_id = 1;
|
||||
}
|
||||
|
||||
message SMTeamKick
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamQuit
|
||||
{
|
||||
}
|
||||
message SMTeamQuit
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamDismiss
|
||||
{
|
||||
}
|
||||
message SMTeamDismiss
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMTeamRename
|
||||
{
|
||||
optional string new_team_name = 1;
|
||||
}
|
||||
message SMTeamRename
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildInfo
|
||||
{
|
||||
optional int64 guild_id = 1;
|
||||
}
|
||||
message SMGuildInfo
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFGuildBasic info = 3;
|
||||
}
|
||||
|
||||
message CMGuildCreate
|
||||
{
|
||||
optional string guild_name = 1;
|
||||
optional int32 guild_badge = 2;
|
||||
optional string guild_declaration = 3;
|
||||
optional int32 join_unlimited = 4;
|
||||
optional int32 join_cond1 = 5;
|
||||
optional int32 join_cond2 = 6;
|
||||
}
|
||||
message SMGuildCreate
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional int64 guild_id = 3;
|
||||
}
|
||||
|
||||
message CMGuildJoin
|
||||
{
|
||||
optional int64 guild_id = 1;
|
||||
}
|
||||
message SMGuildJoin
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildAgree
|
||||
{
|
||||
optional MFGuildApply apply = 1;
|
||||
optional int32 batchid = 2;
|
||||
}
|
||||
message SMGuildAgree
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildRefuse
|
||||
{
|
||||
optional MFGuildApply apply = 1;
|
||||
optional int32 batchid = 2;
|
||||
}
|
||||
message SMGuildRefuse
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildKick
|
||||
{
|
||||
optional string account_id = 1;
|
||||
}
|
||||
|
||||
message SMGuildKick
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildQuit
|
||||
{
|
||||
}
|
||||
message SMGuildQuit
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildDismiss
|
||||
{
|
||||
}
|
||||
message SMGuildDismiss
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildChange
|
||||
{
|
||||
optional string guild_name = 1;
|
||||
optional int32 guild_badge = 2;
|
||||
optional string guild_declaration = 3;
|
||||
optional int32 join_unlimited = 4;
|
||||
optional int32 join_cond1 = 5;
|
||||
optional int32 join_cond2 = 6;
|
||||
}
|
||||
message SMGuildChange
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFGuildBasic info = 3;
|
||||
}
|
||||
|
||||
message CMGuildSearch
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
optional string guild_name = 2;
|
||||
}
|
||||
message SMGuildSearch
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFGuildBasic guild_list = 4;
|
||||
}
|
||||
|
||||
message CMGuildRank
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
}
|
||||
message SMGuildRank
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFGuildBasic guild_list = 4;
|
||||
}
|
||||
|
||||
message CMGuildMemberList
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
optional string member_name = 2;
|
||||
}
|
||||
message SMGuildMemberList
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFUserInfo member_list = 4;
|
||||
optional int32 guild_lv = 5;
|
||||
}
|
||||
|
||||
message CMGuildApplyList
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
}
|
||||
message SMGuildApplyList
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFGuildApply apply_list = 4;
|
||||
optional int32 guild_lv = 5;
|
||||
}
|
||||
|
||||
message CMGuildLog
|
||||
{
|
||||
optional MFPaging paging = 1;
|
||||
}
|
||||
message SMGuildLog
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFPaging paging = 3;
|
||||
repeated MFStringTuple logs = 4;
|
||||
}
|
||||
|
||||
message CMGuildMemberSetJob
|
||||
{
|
||||
optional string member_id = 1;
|
||||
optional int32 job = 2;
|
||||
}
|
||||
message SMGuildMemberSetJob
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildAgreeInvite
|
||||
{
|
||||
optional int64 guild_id = 1;
|
||||
optional string user_sign = 2;
|
||||
}
|
||||
message SMGuildAgreeInvite
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildGainExp
|
||||
{
|
||||
optional int32 exp = 1;
|
||||
}
|
||||
message SMGuildGainExp
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message CMGuildSearchMember
|
||||
{
|
||||
optional string target_id = 1;
|
||||
}
|
||||
message SMGuildSearchMember
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
optional MFGuildBasic guild_basic = 3;
|
||||
optional MFUserInfo user_info = 4;
|
||||
}
|
||||
|
||||
message CMSendChatMsg
|
||||
{
|
||||
optional int32 chat_channel = 1;
|
||||
optional string target = 2;
|
||||
optional int32 msg_type = 3;
|
||||
optional string msg_body = 4;
|
||||
repeated string members = 5;
|
||||
}
|
||||
|
||||
message CMReadMsgAndOpenChatNotify
|
||||
{
|
||||
optional int32 curr_channel = 1;
|
||||
repeated MFPairInt64 last_ids = 2;
|
||||
}
|
||||
|
||||
message CMSetCurrPrivateChatTarget
|
||||
{
|
||||
optional string private_target = 1;
|
||||
optional int64 last_id = 2;
|
||||
}
|
||||
|
||||
message CMCloseChatNotify
|
||||
{
|
||||
}
|
||||
|
||||
message CMSendCustomMsg
|
||||
{
|
||||
repeated string target_list = 1;
|
||||
optional string msg = 2;
|
||||
optional int64 param1 = 3;
|
||||
optional int64 param2 = 4;
|
||||
optional int64 param3 = 5;
|
||||
}
|
||||
|
||||
message CMUpdateTempCustomData
|
||||
{
|
||||
optional int32 update_type = 1;
|
||||
optional MFUserTempCustomData temp_custom_data = 2;
|
||||
|
||||
optional int32 delay_time = 100;
|
||||
optional int32 delay_flag = 101;
|
||||
}
|
||||
|
||||
message CMQueryUserStatus
|
||||
{
|
||||
repeated string user_list = 1;
|
||||
}
|
||||
message SMQueryUserStatus
|
||||
{
|
||||
repeated MFUserStatus status_list = 1;
|
||||
}
|
||||
|
||||
message CMRecommandFriend
|
||||
{
|
||||
}
|
||||
message SMRecommandFriend
|
||||
{
|
||||
repeated MFUserInfo friend_list = 1;
|
||||
}
|
||||
|
||||
message SMUserStatusNotify
|
||||
{
|
||||
repeated string online_users = 1;
|
||||
repeated string offline_users = 2;
|
||||
}
|
||||
|
||||
message SMChatMsgNotify
|
||||
{
|
||||
repeated MFChatMsg msg_list = 1;
|
||||
}
|
||||
|
||||
message SMCustomMsgNotify
|
||||
{
|
||||
optional string sender = 1;
|
||||
optional string msg = 2;
|
||||
optional int64 param1 = 3;
|
||||
optional int64 param2 = 4;
|
||||
optional int64 param3 = 5;
|
||||
}
|
||||
|
||||
message SMUserInfoUpdate
|
||||
{
|
||||
repeated MFUserInfo user_infos = 1;
|
||||
}
|
||||
|
||||
message SMDeleteFriendNotify
|
||||
{
|
||||
repeated string user_list = 1;
|
||||
}
|
||||
|
||||
message SMAddBlackListNotify
|
||||
{
|
||||
repeated MFUserInfo user_infos = 1;
|
||||
}
|
||||
|
||||
message SMDeleteBlackListNotify
|
||||
{
|
||||
repeated string user_list = 1;
|
||||
}
|
||||
|
||||
message SMUserTempCustomDataUpdate
|
||||
{
|
||||
optional string account_id = 1;
|
||||
optional MFUserTempCustomData temp_custom_data = 2;
|
||||
}
|
||||
|
||||
message SMUpdateAccountInfo
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
message SMUpdateRedPointNotify
|
||||
{
|
||||
optional int32 red_point_flags = 1;
|
||||
}
|
||||
|
||||
message SMUpdateChatRedPointNotify
|
||||
{
|
||||
repeated int32 has_unread_msg_channels = 1;
|
||||
}
|
||||
|
||||
message SMUpdatePrivateChatRedPointNotify
|
||||
{
|
||||
repeated string has_unread_msg_accounts = 1;
|
||||
}
|
||||
|
||||
message SMUpdateChatChannelLastId
|
||||
{
|
||||
repeated MFPairInt64 last_ids = 1;
|
||||
}
|
||||
|
||||
message SMShowErrorMsg
|
||||
{
|
||||
optional string msg = 1;
|
||||
}
|
20
server/tools/protobuild/out/metatable.proto
Normal file
20
server/tools/protobuild/out/metatable.proto
Normal file
@ -0,0 +1,20 @@
|
||||
package metatable;
|
||||
|
||||
message MFPair
|
||||
{
|
||||
optional int32 key = 1;
|
||||
optional int32 value = 2;
|
||||
}
|
||||
|
||||
message Guild
|
||||
{
|
||||
optional int32 grade = 1;
|
||||
optional int32 experience = 2;
|
||||
optional int32 member = 3;
|
||||
}
|
||||
|
||||
message Text
|
||||
{
|
||||
optional string textid = 1;
|
||||
optional string text = 2;
|
||||
}
|
57
server/tools/protobuild/out/ss_msgid.proto
Normal file
57
server/tools/protobuild/out/ss_msgid.proto
Normal file
@ -0,0 +1,57 @@
|
||||
package ss;
|
||||
|
||||
enum SSMessageId_e
|
||||
{
|
||||
_SS_Ping = 8;
|
||||
_SS_Pong = 9;
|
||||
_SS_WSP_SocketDisconnect = 10;
|
||||
_SS_WSP_RequestTargetServer = 11;
|
||||
_SS_MS_ResponseTargetServer = 12;
|
||||
_SS_ForceCloseSocket = 13;
|
||||
|
||||
_SS_CMPing = 101;
|
||||
_SS_SMRpcError = 102;
|
||||
_SS_CMLogin = 103;
|
||||
_SS_CMReConnect = 104;
|
||||
|
||||
_SS_IM_ForwardMsg = 1001;
|
||||
_SS_MS_ForwardGroupCMMsg = 1002;
|
||||
_SS_MS_ForwardGroupSMMsg = 1003;
|
||||
_SS_MS_LoadGroup = 1004;
|
||||
_SS_IM_ReportServerInfo = 1005;
|
||||
_SS_MS_ConfirmedServerInfo = 1006;
|
||||
_SS_IM_UserOnline = 1007;
|
||||
_SS_IM_UserOffline = 1008;
|
||||
_SS_IM_PullUserList = 1009;
|
||||
_SS_MS_PushUserList = 1010;
|
||||
_SS_IM_SendChatMsg = 1011;
|
||||
_SS_IM_SendCustomMsg = 1012;
|
||||
_SS_IM_IMServerList = 1013;
|
||||
_SS_MS_IMServerList = 1014;
|
||||
_SS_IM_UpdateUserInfo = 1015;
|
||||
_SS_IM_FriendAgreeRequest = 1016;
|
||||
_SS_IM_FriendAgreeResponse = 1017;
|
||||
_SS_IM_FriendDeleteRequest = 1018;
|
||||
_SS_IM_FriendDeleteResponse = 1019;
|
||||
_SS_IM_FriendApply = 1020;
|
||||
_SS_IM_QueryUserOnlineState = 1021;
|
||||
_SS_IM_PushUserOnlineState = 1022;
|
||||
_SS_IM_OnUserOnline = 1023;
|
||||
_SS_IM_OnUserOffline = 1024;
|
||||
_SS_IM_RandomUsersRequest = 1025;
|
||||
_SS_IM_RandomUsersResponse = 1026;
|
||||
_SS_IM_ForwardGuildCMMsg = 1027;
|
||||
_SS_IM_ForwardGuildSMMsg = 1028;
|
||||
_SS_IM_GuildMemberQuitRequest = 1031;
|
||||
_SS_IM_GuildMemberQuitResponse = 1032;
|
||||
_SS_IM_GuildMemberUpdateRequest = 1033;
|
||||
_SS_IM_GuildMemberUpdateResponse = 1034;
|
||||
_SS_IM_RefeshGuildMemberInfo = 1035;
|
||||
_SS_GS_QueryGuildUserOnlineState = 1036;
|
||||
_SS_IM_PushGuildUserOnlineState = 1037;
|
||||
_SS_IM_GuildRecalcRedPoint = 1038;
|
||||
_SS_GS_PushGuildRedPoint = 1039;
|
||||
_SS_IM_GuildNewApply = 1041;
|
||||
_SS_GS_ApplyChangeRequest = 1042;
|
||||
_SS_IM_ApplyChangeResponse = 1043;
|
||||
}
|
414
server/tools/protobuild/out/ss_proto.proto
Normal file
414
server/tools/protobuild/out/ss_proto.proto
Normal file
@ -0,0 +1,414 @@
|
||||
package ss;
|
||||
|
||||
import "cs_proto.proto";
|
||||
|
||||
message MFIMMsgConext
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional cs.MFUserInfo user_info = 2;
|
||||
optional int32 socket_handle = 3;
|
||||
}
|
||||
|
||||
message MFIMServerInfo
|
||||
{
|
||||
optional int32 instance_id = 1;
|
||||
optional int32 online_num = 2;
|
||||
optional string ip = 3;
|
||||
optional int32 port = 4;
|
||||
optional bool servicing = 5;
|
||||
}
|
||||
|
||||
message MFGuildLogItem
|
||||
{
|
||||
optional string sender_id = 1;
|
||||
optional string sender_name = 2;
|
||||
optional string sender_avatar_url = 3;
|
||||
optional int32 sender_job = 4;
|
||||
optional int32 logtime = 5;
|
||||
optional int32 action = 6;
|
||||
optional string opt_id = 7;
|
||||
optional string opt_name = 8;
|
||||
optional string opt_avatar_url = 9;
|
||||
optional int32 opt_job = 10;
|
||||
}
|
||||
|
||||
message MFGuildLogDB
|
||||
{
|
||||
repeated MFGuildLogItem logs = 1;
|
||||
}
|
||||
|
||||
message MFBaseUserDataDB
|
||||
{
|
||||
optional string account_id = 1;
|
||||
optional string nickname = 2;
|
||||
optional string avatar_url = 3;
|
||||
optional int32 sex = 4;
|
||||
optional int32 last_login_time = 5;
|
||||
optional int64 guild_id = 6;
|
||||
optional string guild_name = 7;
|
||||
optional int32 guild_job = 8;
|
||||
optional int32 vip_lv = 9;
|
||||
optional int32 head = 10;
|
||||
optional int32 contribute = 11;
|
||||
|
||||
optional int64 user_value1 = 50;
|
||||
optional int64 user_value2 = 51;
|
||||
optional int64 user_value3 = 52;
|
||||
optional int64 base_data_version = 100;
|
||||
}
|
||||
|
||||
message MFRole
|
||||
{
|
||||
optional int32 today_apply_times = 1;
|
||||
optional int32 save_count = 2;
|
||||
optional int32 last_save_time = 3;
|
||||
optional int32 today_apply_guild_times = 4;
|
||||
optional int32 today_create_guild_times = 5;
|
||||
repeated cs.MFPairInt64 applyed_guild_list = 6;
|
||||
}
|
||||
|
||||
message MFGroupMemberDB
|
||||
{
|
||||
optional MFBaseUserDataDB base_data = 1;
|
||||
}
|
||||
|
||||
message MFGroupDB
|
||||
{
|
||||
repeated MFGroupMemberDB members = 1;
|
||||
}
|
||||
|
||||
message MFGuildMemberDB
|
||||
{
|
||||
optional MFBaseUserDataDB base_data = 1;
|
||||
}
|
||||
|
||||
message MFGuildDB
|
||||
{
|
||||
repeated MFGuildMemberDB members = 1;
|
||||
}
|
||||
|
||||
message MFFriendDB
|
||||
{
|
||||
optional MFBaseUserDataDB base_data = 1;
|
||||
}
|
||||
|
||||
message MFUserDB
|
||||
{
|
||||
repeated MFFriendDB friends = 1;
|
||||
optional MFRole role_data = 2;
|
||||
repeated MFFriendDB black_list = 3;
|
||||
optional int64 private_chat_last_id = 4;
|
||||
}
|
||||
|
||||
message SS_WSP_SocketDisconnect
|
||||
{
|
||||
}
|
||||
|
||||
message SS_CMPing
|
||||
{
|
||||
}
|
||||
|
||||
message SS_CommonError
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message SS_CMLogin_CMReConnect_CommonHead
|
||||
{
|
||||
optional int32 server_id = 1;
|
||||
}
|
||||
|
||||
message SS_CMLogin_CMReConnect_CommonHead2
|
||||
{
|
||||
optional int32 server_id = 1;
|
||||
optional string team_uuid = 2;
|
||||
optional string account_id = 3;
|
||||
}
|
||||
|
||||
message SS_WSP_RequestTargetServer
|
||||
{
|
||||
optional int64 context_id = 1;
|
||||
optional string account_id = 2;
|
||||
optional string team_id = 3;
|
||||
}
|
||||
|
||||
message SS_MS_ResponseTargetServer
|
||||
{
|
||||
optional int32 error_code = 1;
|
||||
optional string error_msg = 2;
|
||||
optional int64 context_id = 3;
|
||||
optional string host = 4;
|
||||
optional int32 port = 5;
|
||||
}
|
||||
|
||||
message SS_SMRpcError
|
||||
{
|
||||
optional int32 error_code = 1;
|
||||
optional string error_msg = 2;
|
||||
optional string debug_msg = 3;
|
||||
optional string file = 4;
|
||||
optional int32 lineno = 5;
|
||||
}
|
||||
|
||||
message SS_Ping
|
||||
{
|
||||
}
|
||||
|
||||
message SS_Pong
|
||||
{
|
||||
optional int32 param1 = 1;
|
||||
}
|
||||
|
||||
message SS_ForceCloseSocket
|
||||
{
|
||||
}
|
||||
|
||||
message SS_IM_ForwardMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional bytes payload = 2;
|
||||
}
|
||||
|
||||
message SS_MS_ForwardGroupCMMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional bytes payload = 2;
|
||||
}
|
||||
|
||||
message SS_MS_ForwardGroupSMMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional bytes payload = 2;
|
||||
}
|
||||
|
||||
message SS_MS_LoadGroup
|
||||
{
|
||||
optional int64 group_id = 1;
|
||||
}
|
||||
|
||||
message SS_IM_ForwardGuildCMMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional int64 guild_id = 2;
|
||||
optional int32 msgid = 3;
|
||||
optional bytes payload = 4;
|
||||
}
|
||||
|
||||
message SS_IM_ForwardGuildSMMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional int32 msgid = 2;
|
||||
optional bytes payload = 3;
|
||||
}
|
||||
|
||||
message SS_IM_ReportServerInfo
|
||||
{
|
||||
optional int32 instance_id = 1;
|
||||
optional int32 online_num = 2;
|
||||
optional string ip = 3;
|
||||
optional int32 port = 4;
|
||||
optional bool servicing = 5;
|
||||
}
|
||||
|
||||
message SS_MS_ConfirmedServerInfo
|
||||
{
|
||||
optional int32 errcode = 1;
|
||||
optional string errmsg = 2;
|
||||
}
|
||||
|
||||
message SS_IM_UserOnline
|
||||
{
|
||||
repeated cs.MFUserInfo user_infos = 1;
|
||||
}
|
||||
|
||||
message SS_IM_UserOffline
|
||||
{
|
||||
repeated string account_ids = 1;
|
||||
}
|
||||
|
||||
message SS_IM_PullUserList
|
||||
{
|
||||
repeated string account_ids = 1;
|
||||
}
|
||||
message SS_MS_PushUserList
|
||||
{
|
||||
repeated cs.MFUserInfo user_infos = 1;
|
||||
}
|
||||
|
||||
message SS_IM_SendChatMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional int32 chat_channel = 2;
|
||||
optional string target = 3;
|
||||
optional int32 msg_type = 4;
|
||||
optional string msg_body = 5;
|
||||
}
|
||||
|
||||
message SS_IM_SendCustomMsg
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target = 2;
|
||||
optional string msg = 3;
|
||||
optional int64 param1 = 4;
|
||||
optional int64 param2 = 5;
|
||||
optional int64 param3 = 6;
|
||||
}
|
||||
|
||||
message SS_IM_IMServerList
|
||||
{
|
||||
}
|
||||
message SS_MS_IMServerList
|
||||
{
|
||||
repeated MFIMServerInfo server_list = 1;
|
||||
}
|
||||
|
||||
message SS_IM_UpdateUserInfo
|
||||
{
|
||||
optional cs.MFUserInfo user_info = 1;
|
||||
}
|
||||
|
||||
message SS_IM_FriendAgreeRequest
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target_id = 3;
|
||||
}
|
||||
|
||||
message SS_IM_FriendAgreeResponse
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target_id = 3;
|
||||
}
|
||||
|
||||
message SS_IM_FriendDeleteRequest
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target_id = 3;
|
||||
optional int32 reason = 4;
|
||||
}
|
||||
|
||||
message SS_IM_FriendDeleteResponse
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target_id = 3;
|
||||
}
|
||||
|
||||
message SS_IM_FriendApply
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional string target_id = 3;
|
||||
}
|
||||
|
||||
message SS_IM_QueryUserOnlineState
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
repeated string account_ids = 3;
|
||||
}
|
||||
|
||||
message SS_IM_PushUserOnlineState
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
repeated cs.MFUserInfo user_infos = 2;
|
||||
}
|
||||
|
||||
message SS_IM_OnUserOnline
|
||||
{
|
||||
repeated string account_ids = 3;
|
||||
}
|
||||
|
||||
message SS_IM_OnUserOffline
|
||||
{
|
||||
repeated string account_ids = 3;
|
||||
}
|
||||
|
||||
message SS_IM_RandomUsersRequest
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
repeated string exclude_account_ids = 3;
|
||||
}
|
||||
|
||||
message SS_IM_RandomUsersResponse
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
repeated cs.MFUserInfo user_infos = 2;
|
||||
}
|
||||
|
||||
message SS_IM_GuildMemberQuitRequest
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional int64 guild_id = 2;
|
||||
optional string sender_id = 3;
|
||||
optional string target_id = 4;
|
||||
optional int32 reason = 5;
|
||||
}
|
||||
|
||||
message SS_IM_GuildMemberQuitResponse
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
}
|
||||
|
||||
message SS_IM_GuildMemberUpdateRequest
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional int64 guild_id = 2;
|
||||
optional string sender_id = 3;
|
||||
optional string target_id = 4;
|
||||
optional int32 reason = 5;
|
||||
optional int32 guild_job = 6;
|
||||
}
|
||||
|
||||
message SS_IM_GuildMemberUpdateResponse
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
}
|
||||
|
||||
message SS_IM_RefeshGuildMemberInfo
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
}
|
||||
|
||||
message SS_GS_QueryGuildUserOnlineState
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional int64 guild_id = 2;
|
||||
repeated string account_ids = 3;
|
||||
}
|
||||
|
||||
message SS_IM_PushGuildUserOnlineState
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional int64 guild_id = 2;
|
||||
repeated string online_users = 3;
|
||||
}
|
||||
|
||||
message SS_IM_GuildRecalcRedPoint
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional int64 guild_id = 2;
|
||||
}
|
||||
|
||||
message SS_GS_PushGuildRedPoint
|
||||
{
|
||||
optional int64 guild_id = 1;
|
||||
optional string account_id = 2;
|
||||
optional int32 has_apply = 3;
|
||||
}
|
||||
|
||||
message SS_IM_GuildNewApply
|
||||
{
|
||||
optional MFIMMsgConext context = 1;
|
||||
optional int64 guild_id = 2;
|
||||
}
|
||||
|
||||
message SS_GS_ApplyChangeRequest
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
optional int64 guild_id = 2;
|
||||
optional string account_id = 3;
|
||||
optional int32 is_refuse = 4;
|
||||
}
|
||||
|
||||
message SS_IM_ApplyChangeResponse
|
||||
{
|
||||
optional int64 seqid = 1;
|
||||
}
|
@ -52,7 +52,7 @@ CREATE TABLE `user` (
|
||||
`user_value1` bigint NOT NULL DEFAULT '0' COMMENT 'user_value1',
|
||||
`user_value2` bigint NOT NULL DEFAULT '0' COMMENT 'user_value2',
|
||||
`user_value3` bigint NOT NULL DEFAULT '0' COMMENT 'user_value3',
|
||||
`guild_id` bigint NOT NULL COMMENT '工会id',
|
||||
`guild_id` bigint NOT NULL DEFAULT '0' COMMENT '工会id',
|
||||
`guild_job` int(11) NOT NULL DEFAULT '0' COMMENT '公会职位',
|
||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||
@ -115,7 +115,6 @@ CREATE TABLE `guild` (
|
||||
`owner_avatar_url` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会主头像',
|
||||
`owner_vip_lv` int(11) NOT NULL DEFAULT '0' COMMENT 'owner vip等级',
|
||||
`owner_head` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 头像框',
|
||||
`owner_head` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 头像框',
|
||||
`owner_sex` int(11) NOT NULL DEFAULT '0' COMMENT 'owner 性别',
|
||||
`creator_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会创建者id',
|
||||
`creator_name` tinyblob COMMENT '公会创建者名字',
|
||||
|
7
sql/relationdb_n_migrate_201230_01.sql
Normal file
7
sql/relationdb_n_migrate_201230_01.sql
Normal file
@ -0,0 +1,7 @@
|
||||
start TRANSACTION;
|
||||
|
||||
alter table user modify `guild_id` bigint NOT NULL default 0 COMMENT '工会id';
|
||||
|
||||
insert into version (version) values(2020123001);
|
||||
|
||||
commit;
|
2
third_party/a8engine
vendored
2
third_party/a8engine
vendored
@ -1 +1 @@
|
||||
Subproject commit a0d01a57a5792268b7dd0c144dfda00e7e171d80
|
||||
Subproject commit 9c890ba78e289d4879f921b94b558e10d66b2b64
|
2
third_party/behaviac
vendored
2
third_party/behaviac
vendored
@ -1 +1 @@
|
||||
Subproject commit 240414570ee2848291d24ff8d3102dc43d4104a3
|
||||
Subproject commit 5beca57f6555aa0d9e4de71c93653cade928a654
|
2
third_party/framework
vendored
2
third_party/framework
vendored
@ -1 +1 @@
|
||||
Subproject commit 58945006ae9f88402b8ff8abbc9c4b7f9f2f18b4
|
||||
Subproject commit 180f9e3f5cdad81a58fe4f8a96b0bd6388eef222
|
2
third_party/tools
vendored
2
third_party/tools
vendored
@ -1 +1 @@
|
||||
Subproject commit 04a0bc939eeae0090fd0e8964dddf3863a551154
|
||||
Subproject commit 725d70ebaba30c20124075cf5e4bd751d2404d28
|
Loading…
x
Reference in New Issue
Block a user