1
This commit is contained in:
parent
a32895e53b
commit
d34c651fe1
@ -56,13 +56,20 @@ enum ReadPointFlag
|
|||||||
RPF_Apply = 0
|
RPF_Apply = 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum GuildMemberQuitReason
|
||||||
|
{
|
||||||
|
kGuildKick = 0,
|
||||||
|
kGuildQuit = 1,
|
||||||
|
kGuildDismisss = 2
|
||||||
|
};
|
||||||
|
|
||||||
const char* const PROJ_NAME_FMT = "friend_imserver";
|
const char* const PROJ_NAME_FMT = "friend_imserver";
|
||||||
const char* const PROJ_ROOT_FMT = "/data/logs/%s";
|
const char* const PROJ_ROOT_FMT = "/data/logs/%s";
|
||||||
|
|
||||||
const char* const EVENT_FRIEND_AGREE = "friend.agree";
|
const char* const EVENT_FRIEND_AGREE = "friend.agree";
|
||||||
const char* const EVENT_FRIEND_DELETE = "friend.delete";
|
const char* const EVENT_FRIEND_DELETE = "friend.delete";
|
||||||
|
|
||||||
const char* const EVENT_GUILD_DELETE = "guild.dismiss";
|
const char* const EVENT_GUILD_DELETE = "guild.quit";
|
||||||
|
|
||||||
const int MAX_INSTANCE_ID = 1023;
|
const int MAX_INSTANCE_ID = 1023;
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "typeconvert.h"
|
#include "typeconvert.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "dbhelper.h"
|
#include "dbhelper.h"
|
||||||
|
#include "synchelper.h"
|
||||||
|
|
||||||
const int GUILD_MAX_MEMBER_NUM = 50;
|
const int GUILD_MAX_MEMBER_NUM = 50;
|
||||||
|
|
||||||
@ -222,6 +223,16 @@ void Guild::_CMGuildKick(f8::MsgHdr& hdr, const cs::CMGuildKick& msg)
|
|||||||
respmsg);
|
respmsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
GuildMgr::Instance()->ForwardGuildSMMsg(hdr.socket_handle,
|
||||||
|
forward_msg->context(),
|
||||||
|
respmsg);
|
||||||
|
SyncHelper::Instance()->SyncGuildMemberQuit
|
||||||
|
(
|
||||||
|
this,
|
||||||
|
sender->account_id,
|
||||||
|
member->account_id,
|
||||||
|
kGuildKick
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Guild::_CMGuildQuit(f8::MsgHdr& hdr, const cs::CMGuildQuit& msg)
|
void Guild::_CMGuildQuit(f8::MsgHdr& hdr, const cs::CMGuildQuit& msg)
|
||||||
|
@ -95,6 +95,14 @@ void SyncHelper::SyncApplyFriend(Player* hum, const std::string& target_id)
|
|||||||
delete notifymsg;
|
delete notifymsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SyncHelper::SyncGuildMemberQuit(Guild* guild,
|
||||||
|
const std::string& sender_id,
|
||||||
|
const std::string& target_id,
|
||||||
|
int reason)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void SyncHelper::BroadcastIMConnMsg(int msgid, ::google::protobuf::Message& msg)
|
void SyncHelper::BroadcastIMConnMsg(int msgid, ::google::protobuf::Message& msg)
|
||||||
{
|
{
|
||||||
IMConnMgr::Instance()->TraverseIMConn
|
IMConnMgr::Instance()->TraverseIMConn
|
||||||
|
@ -10,6 +10,7 @@ namespace ss
|
|||||||
class SS_IM_FriendDeleteResponse;
|
class SS_IM_FriendDeleteResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Guild;
|
||||||
class Player;
|
class Player;
|
||||||
struct timer_list;
|
struct timer_list;
|
||||||
class SyncHelper : public a8::Singleton<SyncHelper>
|
class SyncHelper : public a8::Singleton<SyncHelper>
|
||||||
@ -30,6 +31,11 @@ public:
|
|||||||
void SyncUpdateFriend(Player* hum, const std::string& target_id);
|
void SyncUpdateFriend(Player* hum, const std::string& target_id);
|
||||||
void SyncApplyFriend(Player* hum, const std::string& target_id);
|
void SyncApplyFriend(Player* hum, const std::string& target_id);
|
||||||
|
|
||||||
|
void SyncGuildMemberQuit(Guild* guild,
|
||||||
|
const std::string& sender_id,
|
||||||
|
const std::string& target_id,
|
||||||
|
int reason);
|
||||||
|
|
||||||
void _SS_IM_FriendAgreeResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeResponse& msg);
|
void _SS_IM_FriendAgreeResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendAgreeResponse& msg);
|
||||||
void _SS_IM_FriendDeleteResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteResponse& msg);
|
void _SS_IM_FriendDeleteResponse(f8::MsgHdr& hdr, const ss::SS_IM_FriendDeleteResponse& msg);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user