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