1
This commit is contained in:
parent
9d937a50ea
commit
30c37ea73a
@ -77,6 +77,11 @@ void GuildMgr::_SS_IM_ForwardGuildCMMsg(f8::MsgHdr& hdr, const ss::SS_IM_Forward
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuildMgr::_CMGuildInfo(const ss::MFIMMsgConext& context, const cs::CMGuildInfo& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void GuildMgr::_CMGuildCreate(const ss::MFIMMsgConext& context, const cs::CMGuildCreate& msg)
|
void GuildMgr::_CMGuildCreate(const ss::MFIMMsgConext& context, const cs::CMGuildCreate& msg)
|
||||||
{
|
{
|
||||||
if (!IsValidGuildId(context.user_info().base_data().guild_id())) {
|
if (!IsValidGuildId(context.user_info().base_data().guild_id())) {
|
||||||
@ -265,6 +270,26 @@ void GuildMgr::_CMGuildRename(const ss::MFIMMsgConext& context, const cs::CMGuil
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GuildMgr::_CMGuildSearch(const ss::MFIMMsgConext& context, const cs::CMGuildSearch& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuildMgr::_CMGuildRank(const ss::MFIMMsgConext& context, const cs::CMGuildRank& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuildMgr::_CMGuildMemberList(const ss::MFIMMsgConext& context, const cs::CMGuildMemberList& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GuildMgr::_CMGuildLog(const ss::MFIMMsgConext& context, const cs::CMGuildLog& msg)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool GuildMgr::IsValidGuildId(long long guild_id)
|
bool GuildMgr::IsValidGuildId(long long guild_id)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace cs
|
namespace cs
|
||||||
{
|
{
|
||||||
|
class CMGuildInfo;
|
||||||
class CMGuildCreate;
|
class CMGuildCreate;
|
||||||
class CMGuildJoin;
|
class CMGuildJoin;
|
||||||
class CMGuildAgree;
|
class CMGuildAgree;
|
||||||
@ -9,6 +10,10 @@ namespace cs
|
|||||||
class CMGuildQuit;
|
class CMGuildQuit;
|
||||||
class CMGuildDismiss;
|
class CMGuildDismiss;
|
||||||
class CMGuildRename;
|
class CMGuildRename;
|
||||||
|
class CMGuildSearch;
|
||||||
|
class CMGuildRank;
|
||||||
|
class CMGuildMemberList;
|
||||||
|
class CMGuildLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ss
|
namespace ss
|
||||||
@ -42,6 +47,7 @@ class GuildMgr : public a8::Singleton<GuildMgr>
|
|||||||
void _SS_IM_ForwardGuildCMMsg(f8::MsgHdr& hdr, const ss::SS_IM_ForwardGuildCMMsg& msg);
|
void _SS_IM_ForwardGuildCMMsg(f8::MsgHdr& hdr, const ss::SS_IM_ForwardGuildCMMsg& msg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void _CMGuildInfo(const ss::MFIMMsgConext& context, const cs::CMGuildInfo& msg);
|
||||||
void _CMGuildCreate(const ss::MFIMMsgConext& context, const cs::CMGuildCreate& msg);
|
void _CMGuildCreate(const ss::MFIMMsgConext& context, const cs::CMGuildCreate& msg);
|
||||||
void _CMGuildJoin(const ss::MFIMMsgConext& context, const cs::CMGuildJoin& msg);
|
void _CMGuildJoin(const ss::MFIMMsgConext& context, const cs::CMGuildJoin& msg);
|
||||||
void _CMGuildAgree(const ss::MFIMMsgConext& context, const cs::CMGuildAgree& msg);
|
void _CMGuildAgree(const ss::MFIMMsgConext& context, const cs::CMGuildAgree& msg);
|
||||||
@ -49,6 +55,10 @@ class GuildMgr : public a8::Singleton<GuildMgr>
|
|||||||
void _CMGuildQuit(const ss::MFIMMsgConext& context, const cs::CMGuildQuit& msg);
|
void _CMGuildQuit(const ss::MFIMMsgConext& context, const cs::CMGuildQuit& msg);
|
||||||
void _CMGuildDismiss(const ss::MFIMMsgConext& context, const cs::CMGuildDismiss& msg);
|
void _CMGuildDismiss(const ss::MFIMMsgConext& context, const cs::CMGuildDismiss& msg);
|
||||||
void _CMGuildRename(const ss::MFIMMsgConext& context, const cs::CMGuildRename& msg);
|
void _CMGuildRename(const ss::MFIMMsgConext& context, const cs::CMGuildRename& msg);
|
||||||
|
void _CMGuildSearch(const ss::MFIMMsgConext& context, const cs::CMGuildSearch& msg);
|
||||||
|
void _CMGuildRank(const ss::MFIMMsgConext& context, const cs::CMGuildRank& msg);
|
||||||
|
void _CMGuildMemberList(const ss::MFIMMsgConext& context, const cs::CMGuildMemberList& msg);
|
||||||
|
void _CMGuildLog(const ss::MFIMMsgConext& context, const cs::CMGuildLog& msg);
|
||||||
|
|
||||||
bool IsValidGuildId(long long guild_id);
|
bool IsValidGuildId(long long guild_id);
|
||||||
Guild* GetGuild(long long group_id);
|
Guild* GetGuild(long long group_id);
|
||||||
|
@ -41,8 +41,12 @@ enum CMMessageId_e
|
|||||||
_CMGuildQuit = 235;
|
_CMGuildQuit = 235;
|
||||||
_CMGuildDismiss = 236;
|
_CMGuildDismiss = 236;
|
||||||
_CMGuildRename = 237;
|
_CMGuildRename = 237;
|
||||||
|
_CMGuildInfo = 238;
|
||||||
|
_CMGuildSearch = 239;
|
||||||
|
_CMGuildRank = 240;
|
||||||
|
_CMGuildMemberList = 241;
|
||||||
|
_CMGuildLog = 242;
|
||||||
_CMGuildMsgEnd = 270;
|
_CMGuildMsgEnd = 270;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SMMessageId_e
|
enum SMMessageId_e
|
||||||
@ -81,6 +85,11 @@ enum SMMessageId_e
|
|||||||
_SMGuildQuit = 235;
|
_SMGuildQuit = 235;
|
||||||
_SMGuildDismiss = 236;
|
_SMGuildDismiss = 236;
|
||||||
_SMGuildRename = 237;
|
_SMGuildRename = 237;
|
||||||
|
_SMGuildInfo = 238;
|
||||||
|
_SMGuildSearch = 239;
|
||||||
|
_SMGuildRank = 240;
|
||||||
|
_SMGuildMemberList = 241;
|
||||||
|
_SMGuildLog = 242;
|
||||||
_SMGuildMsgEnd = 270;
|
_SMGuildMsgEnd = 270;
|
||||||
|
|
||||||
_SMUserStatusNotify = 501;
|
_SMUserStatusNotify = 501;
|
||||||
|
@ -15,6 +15,12 @@ message SMPing
|
|||||||
optional int32 param1 = 1;
|
optional int32 param1 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//string元组
|
||||||
|
message MFStringTuple
|
||||||
|
{
|
||||||
|
repeated string values = 1; //values
|
||||||
|
}
|
||||||
|
|
||||||
//分页信息
|
//分页信息
|
||||||
message MFPaging
|
message MFPaging
|
||||||
{
|
{
|
||||||
@ -78,6 +84,20 @@ message MFFriendApply
|
|||||||
optional MFBaseUserData base_data = 4; //基础数据
|
optional MFBaseUserData base_data = 4; //基础数据
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//公会基本信息
|
||||||
|
message MFGuildBasic
|
||||||
|
{
|
||||||
|
optional int64 guild_id = 1; //公会id
|
||||||
|
optional string guild_name = 2; //公会名
|
||||||
|
optional int32 guild_lv = 3; //公会等级
|
||||||
|
optional int32 guild_exp = 4; //公会经验
|
||||||
|
optional int32 guild_badge = 5; //公会徽章
|
||||||
|
optional int32 member_num = 6; //公会成员数
|
||||||
|
optional string guild_declaration = 7; //公会宣言
|
||||||
|
optional string guild_owner_id = 8; //公会队长id
|
||||||
|
optional string guild_owner_name = 9; //公会队长名字
|
||||||
|
}
|
||||||
|
|
||||||
//登录好友服
|
//登录好友服
|
||||||
message CMLoginCommonHead
|
message CMLoginCommonHead
|
||||||
{
|
{
|
||||||
@ -313,6 +333,18 @@ message SMGroupRename
|
|||||||
optional string errmsg = 2; //错误信息
|
optional string errmsg = 2; //错误信息
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取公会信息
|
||||||
|
message CMGuildInfo
|
||||||
|
{
|
||||||
|
}
|
||||||
|
//获取公会信息返回
|
||||||
|
message SMGuildInfo
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //1:公会已存在 2: 你已经有公会
|
||||||
|
optional string errmsg = 2; //错误消息
|
||||||
|
optional MFGuildBasic info = 3; //公会信息
|
||||||
|
}
|
||||||
|
|
||||||
//建公会
|
//建公会
|
||||||
message CMGuildCreate
|
message CMGuildCreate
|
||||||
{
|
{
|
||||||
@ -393,6 +425,65 @@ message SMGuildRename
|
|||||||
optional string errmsg = 2; //错误信息
|
optional string errmsg = 2; //错误信息
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询公会
|
||||||
|
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_id = 2; //成员id
|
||||||
|
}
|
||||||
|
message SMGuildMemberList
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
optional MFPaging paging = 3; //分页信息
|
||||||
|
repeated MFGuildBasic guild_list = 4; //公会列表
|
||||||
|
}
|
||||||
|
|
||||||
|
//公会动态(日志)
|
||||||
|
message CMGuildLog
|
||||||
|
{
|
||||||
|
}
|
||||||
|
message SMGuildLog
|
||||||
|
{
|
||||||
|
optional int32 errcode = 1; //错误码
|
||||||
|
optional string errmsg = 2; //错误信息
|
||||||
|
/*
|
||||||
|
values[0]: account_id
|
||||||
|
values[1]: 角色名
|
||||||
|
values[2]: 职位 1:队长 2:副队长 3:精英会员 其他:普通会员
|
||||||
|
values[3]: 行为时间(unix时间戳)
|
||||||
|
values[4]: 行为
|
||||||
|
*/
|
||||||
|
repeated MFStringTuple logs = 3;
|
||||||
|
}
|
||||||
|
|
||||||
//发送聊天消息
|
//发送聊天消息
|
||||||
message CMSendChatMsg
|
message CMSendChatMsg
|
||||||
{
|
{
|
||||||
|
@ -88,6 +88,7 @@ DROP TABLE IF EXISTS `guild`;
|
|||||||
/*!40101 SET character_set_client = utf8 */;
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
CREATE TABLE `guild` (
|
CREATE TABLE `guild` (
|
||||||
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
|
`gameid` int(11) NOT NULL DEFAULT '0' COMMENT 'gameid',
|
||||||
`guild_id` bigint NOT NULL COMMENT '公会id',
|
`guild_id` bigint NOT NULL COMMENT '公会id',
|
||||||
`guild_name` tinyblob COMMENT '公会名字',
|
`guild_name` tinyblob COMMENT '公会名字',
|
||||||
`guild_lv` int(11) NOT NULL DEFAULT '0' COMMENT '公会等级',
|
`guild_lv` int(11) NOT NULL DEFAULT '0' COMMENT '公会等级',
|
||||||
@ -98,7 +99,8 @@ CREATE TABLE `guild` (
|
|||||||
`guild_notice` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会公告',
|
`guild_notice` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会公告',
|
||||||
`guild_declaration` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会宣言',
|
`guild_declaration` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会宣言',
|
||||||
`guild_log` mediumblob COMMENT '公会日志',
|
`guild_log` mediumblob COMMENT '公会日志',
|
||||||
`owner_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会主',
|
`owner_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会主id',
|
||||||
|
`owner_name` tinyblob CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会主名字',
|
||||||
`creator_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会创建者',
|
`creator_id` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '公会创建者',
|
||||||
`guild_data` mediumblob COMMENT '公会数据',
|
`guild_data` mediumblob COMMENT '公会数据',
|
||||||
`guild_status` int(11) NOT NULL DEFAULT '0' COMMENT '公会状态 0:新建(未确认) 1:已确认 2:已解散',
|
`guild_status` int(11) NOT NULL DEFAULT '0' COMMENT '公会状态 0:新建(未确认) 1:已确认 2:已解散',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user