This commit is contained in:
aozhiwei 2020-09-27 19:09:16 +08:00
parent 15008a373a
commit beb4c14d6d
5 changed files with 26 additions and 4 deletions

View File

@ -211,7 +211,11 @@ void DBHelper::AddGuildApply(Guild* guild, const cs::MFUserInfo& user_info)
void DBHelper::AddEvent(const std::string& sender_id,
const std::string& target_id,
const std::string& event_name,
const std::string& event_data)
const std::string& event_data,
const std::string& param1,
const std::string& param2,
const std::string& param3
)
{
auto on_ok =
[] (a8::XParams& param, const f8::DataSet* data_set)

View File

@ -42,7 +42,11 @@ class DBHelper : public a8::Singleton<DBHelper>
void AddEvent(const std::string& sender_id,
const std::string& target_id,
const std::string& event_name,
const std::string& event_data);
const std::string& event_data,
const std::string& param1 = "",
const std::string& param2 = "",
const std::string& param3 = ""
);
void SetEventStatus(long long idx,
const std::string& target_id,
int status);

View File

@ -204,12 +204,18 @@ void PlayerMgr::_SS_IM_RandomUsersResponse(f8::MsgHdr& hdr, const ss::SS_IM_Rand
void PlayerMgr::_SS_IM_GuildMemberQuitRequest(f8::MsgHdr& hdr, const ss::SS_IM_GuildMemberQuitRequest& msg)
{
Player* hum = GetPlayerByAccountId(msg.target_id());
if (hum) {
}
}
void PlayerMgr::_SS_IM_GuildMemberUpdateRequest(f8::MsgHdr& hdr, const ss::SS_IM_GuildMemberUpdateRequest& msg)
{
Player* hum = GetPlayerByAccountId(msg.target_id());
if (hum) {
hum->UpdateGuildData(msg.guild_id(), msg.guild_job());
}
}
void PlayerMgr::_SS_IM_UpdateUserInfo(f8::MsgHdr& hdr, const ss::SS_IM_UpdateUserInfo& msg)

View File

@ -239,7 +239,14 @@ void SyncHelper::SS_IM_FriendDeleteRequest_TimeOut(ss::SS_IM_FriendDeleteRequest
void SyncHelper::SS_IM_GuildMemberQuitRequest_TimeOut(ss::SS_IM_GuildMemberQuitRequest* msg)
{
DBHelper::Instance()->AddEvent
(
msg->sender_id(),
msg->target_id(),
EVENT_GUILD_DELETE,
"",
a8::XValue(msg->reason())
);
}
void SyncHelper::SS_IM_GuildMemberUpdateRequest_TimeOut(ss::SS_IM_GuildMemberUpdateRequest* msg)

View File

@ -346,6 +346,7 @@ message SS_IM_GuildMemberUpdateRequest
optional string sender_id = 3;
optional string target_id = 4;
optional int32 reason = 5;
optional int32 guild_job = 6;
}
message SS_IM_GuildMemberUpdateResponse