1
This commit is contained in:
parent
7c531d2b0f
commit
d299cb6bee
@ -239,14 +239,14 @@ void Guild::_CMGuildApplyList(f8::MsgHdr& hdr, const cs::CMGuildApplyList& msg)
|
||||
cs::MFPaging* paging = (cs::MFPaging*)param.param2.GetUserData();
|
||||
ss::SS_IM_ForwardGuildCMMsg* forward_msg = (ss::SS_IM_ForwardGuildCMMsg*)
|
||||
param.param3.GetUserData();
|
||||
#if 0
|
||||
Player* hum = PlayerMgr::Instance()->GetPlayerByAccountId(param.sender.GetString());
|
||||
if (hum && hum->socket_handle == param.param1.GetInt()) {
|
||||
|
||||
Guild* guild = GuildMgr::Instance()->GetGuild(param.sender);
|
||||
if (guild) {
|
||||
for (auto& row : *data_set) {
|
||||
FriendApply* apply = new FriendApply;
|
||||
GuildApply* apply = new GuildApply;
|
||||
apply->idx = a8::XValue(row[0]);
|
||||
apply->applyid = a8::XValue(row[1]);
|
||||
apply->target_id = row[2];
|
||||
apply->guild_id = a8::XValue(row[2]);
|
||||
apply->base_data.account_id = row[3];
|
||||
apply->base_data.nickname = row[4];
|
||||
apply->base_data.avatar_url = row[5];
|
||||
@ -255,18 +255,18 @@ void Guild::_CMGuildApplyList(f8::MsgHdr& hdr, const cs::CMGuildApplyList& msg)
|
||||
apply->base_data.user_value1 = a8::XValue(row[8]);
|
||||
apply->base_data.user_value2 = a8::XValue(row[9]);
|
||||
apply->base_data.user_value3 = a8::XValue(row[10]);
|
||||
hum->apply_hash_[apply->idx] = apply;
|
||||
if (apply->idx > hum->last_apply_idx_) {
|
||||
hum->last_apply_idx_ = apply->idx;
|
||||
guild->apply_hash_[apply->idx] = apply;
|
||||
if (apply->idx > guild->last_apply_idx_) {
|
||||
guild->last_apply_idx_ = apply->idx;
|
||||
}
|
||||
}
|
||||
cs::SMFriendApplyList respmsg;
|
||||
hum->FillApplyList(*paging, respmsg);
|
||||
hum->SendMsg(respmsg);
|
||||
a8::UnSetBitFlag(hum->red_point_flags_, RPF_Apply);
|
||||
hum->SyncRedPoint();
|
||||
cs::SMGuildApplyList respmsg;
|
||||
guild->FillApplyList(*paging, respmsg);
|
||||
GuildMgr::Instance()->ForwardGuildSMMsg(param.param1,
|
||||
forward_msg->context(),
|
||||
respmsg);
|
||||
|
||||
}
|
||||
#endif
|
||||
delete forward_msg;
|
||||
delete paging;
|
||||
};
|
||||
@ -462,3 +462,8 @@ int Guild::GetMemberNum()
|
||||
{
|
||||
return member_hash_.size();
|
||||
}
|
||||
|
||||
void Guild::FillApplyList(cs::MFPaging& paging, cs::SMGuildApplyList& respmsg)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
namespace cs
|
||||
{
|
||||
class MFPaging;
|
||||
class MFGuildBasic;
|
||||
class CMGuildInfo;
|
||||
class CMGuildJoin;
|
||||
@ -15,6 +16,7 @@ namespace cs
|
||||
class CMGuildMemberList;
|
||||
class CMGuildApplyList;
|
||||
class CMGuildLog;
|
||||
class SMGuildApplyList;
|
||||
}
|
||||
|
||||
namespace ss
|
||||
@ -81,6 +83,7 @@ private:
|
||||
void SaveToDB();
|
||||
void GenSortedMembers();
|
||||
int GetMemberNum();
|
||||
void FillApplyList(cs::MFPaging& paging, cs::SMGuildApplyList& respmsg);
|
||||
|
||||
private:
|
||||
bool dirty_ = false;
|
||||
|
@ -20,6 +20,8 @@ class GuildMgr : public a8::Singleton<GuildMgr>
|
||||
void Init();
|
||||
void UnInit();
|
||||
|
||||
Guild* GetGuild(long long guild_id);
|
||||
|
||||
template <typename T>
|
||||
void ForwardGuildSMMsg(int socket_handle, const ss::MFIMMsgConext& context, T& smmsg)
|
||||
{
|
||||
@ -35,7 +37,6 @@ class GuildMgr : public a8::Singleton<GuildMgr>
|
||||
void CreateAsyncTask(int socket_handle, long long guild_id, AsyncGuildTask* task);
|
||||
void LoadGuild(long long guild_id);
|
||||
bool IsValidGuildId(long long guild_id);
|
||||
Guild* GetGuild(long long guild_id);
|
||||
void CreateGuild(int gameid,
|
||||
long long guild_id,
|
||||
const std::string& guild_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user