添加viplv head
This commit is contained in:
parent
f014bcfb72
commit
6f6ad1925c
@ -1050,6 +1050,8 @@ void Guild::UpdateMemberInfo(const cs::MFUserInfo& user_info)
|
||||
member->nickname = user_info.base_data().nickname();
|
||||
member->avatar_url = user_info.base_data().avatar_url();
|
||||
member->sex = user_info.base_data().sex();
|
||||
member->vip_lv = user_info.base_data().vip_lv();
|
||||
member->head = user_info.base_data().head();
|
||||
member->last_login_time = user_info.base_data().last_login_time();
|
||||
member->user_value1 = user_info.base_data().user_value1();
|
||||
member->user_value2 = user_info.base_data().user_value2();
|
||||
@ -1064,6 +1066,8 @@ void Guild::UpdateMemberInfo(const cs::MFUserInfo& user_info)
|
||||
if (member->account_id == owner_id_) {
|
||||
owner_name_ = member->nickname;
|
||||
owner_avatar_url_ = member->avatar_url;
|
||||
owner_vip_lv_ = member->vip_lv;
|
||||
owner_head_ = member->head;
|
||||
}
|
||||
} else {
|
||||
SyncHelper::Instance()->SyncGuildMemberQuitOnlyOnline
|
||||
@ -1156,6 +1160,8 @@ void Guild::FillGuildBasic(cs::MFGuildBasic* guild_basic)
|
||||
guild_basic->set_owner_id(owner_id_);
|
||||
guild_basic->set_owner_name(owner_name_);
|
||||
guild_basic->set_owner_avatar_url(owner_avatar_url_);
|
||||
guild_basic->set_owner_vip_lv(owner_vip_lv_);
|
||||
guild_basic->set_owner_head(owner_head_);
|
||||
guild_basic->set_join_unlimited(join_unlimited_);
|
||||
guild_basic->set_join_cond1(join_cond1_);
|
||||
guild_basic->set_join_cond2(join_cond2_);
|
||||
@ -1224,7 +1230,8 @@ void Guild::SaveToDB()
|
||||
" guild_log='%s', owner_id='%s', owner_name='%s', owner_avatar_url='%s', "
|
||||
" creator_id='%s', creator_name='%s', creator_avatar_url='%s', guild_data='%s', "
|
||||
" guild_status='%d', join_unlimited=%d, join_cond1=%d, join_cond2=%d, guild_member_num=%d, "
|
||||
" modifytime=%d, name_ext2=%d "
|
||||
" modifytime=%d, name_ext2=%d, "
|
||||
" owner_vip_lv=%d, owner_head=%d "
|
||||
"WHERE guild_id=%d;",
|
||||
{
|
||||
guild_lv_,
|
||||
@ -1248,6 +1255,8 @@ void Guild::SaveToDB()
|
||||
join_cond2_,
|
||||
member_hash_.size(),
|
||||
App::Instance()->nowtime,
|
||||
owner_vip_lv_,
|
||||
owner_head_,
|
||||
guild_status_ == kGuildDismissed ? GuildId() : 0,
|
||||
guild_id_
|
||||
},
|
||||
@ -1349,7 +1358,11 @@ Guild* Guild::CreateGuild(int gameid,
|
||||
int join_cond1,
|
||||
int join_cond2,
|
||||
int createtime,
|
||||
int channel
|
||||
int channel,
|
||||
int owner_vip_lv,
|
||||
int owner_head,
|
||||
int creator_vip_lv,
|
||||
int creator_head
|
||||
)
|
||||
{
|
||||
if (GuildMgr::Instance()->GetGuild(guild_id)) {
|
||||
@ -1370,9 +1383,13 @@ Guild* Guild::CreateGuild(int gameid,
|
||||
guild->owner_id_ = owner_id;
|
||||
guild->owner_name_ = owner_name;
|
||||
guild->owner_avatar_url_ = owner_avatar_url;
|
||||
guild->owner_vip_lv_ = owner_vip_lv;
|
||||
guild->owner_head_ = owner_head;
|
||||
guild->creator_id_ = creator_id;
|
||||
guild->creator_name_ = creator_name;
|
||||
guild->creator_avatar_url_ = creator_avatar_url;
|
||||
guild->creator_vip_lv_ = creator_vip_lv;
|
||||
guild->creator_head_ = creator_head;
|
||||
guild->guild_status_ = guild_status;
|
||||
guild->join_unlimited_ = join_unlimited;
|
||||
guild->join_cond1_ = join_cond1;
|
||||
|
@ -109,9 +109,13 @@ private:
|
||||
std::string owner_id_;
|
||||
std::string owner_name_;
|
||||
std::string owner_avatar_url_;
|
||||
int owner_vip_lv_ = 0;
|
||||
int owner_head_ = 0;
|
||||
std::string creator_id_;
|
||||
std::string creator_name_;
|
||||
std::string creator_avatar_url_;
|
||||
int creator_vip_lv_ = 0;
|
||||
int creator_head_ = 0;
|
||||
int guild_status_ = 0;
|
||||
int join_unlimited_ = 0;
|
||||
int join_cond1_ = 0;
|
||||
@ -148,7 +152,11 @@ public:
|
||||
int join_cond1,
|
||||
int join_cond2,
|
||||
int createtime,
|
||||
int channel
|
||||
int channel,
|
||||
int owner_vip_lv,
|
||||
int owner_head,
|
||||
int creator_vip_lv,
|
||||
int creator_head
|
||||
);
|
||||
static void GenGuildData(Player* hum, long long guild_id, std::string& guild_data);
|
||||
};
|
||||
|
@ -235,7 +235,11 @@ void GuildMgr::LoadGuild(long long guild_id)
|
||||
a8::XValue(row[20]), //join_cond1
|
||||
a8::XValue(row[21]), //join_cond2
|
||||
a8::XValue(row[22]), //createtime
|
||||
a8::XValue(row[23]) //channel
|
||||
a8::XValue(row[23]), //channel
|
||||
a8::XValue(row[24]), //owner_vip_lv
|
||||
a8::XValue(row[25]), //owner_head
|
||||
a8::XValue(row[26]), //creator_vip_lv
|
||||
a8::XValue(row[27]) //creator_head
|
||||
);
|
||||
GuildMgr::Instance()->id_hash_[guild->GuildId()] = guild;
|
||||
break;
|
||||
@ -277,7 +281,8 @@ void GuildMgr::LoadGuild(long long guild_id)
|
||||
" guild_members, guild_notice, guild_declaration, guild_log, "
|
||||
" owner_id, owner_name, owner_avatar_url, "
|
||||
" creator_id, creator_name, creator_avatar_url, guild_data, guild_status, "
|
||||
" join_unlimited, join_cond1, join_cond2, createtime, channel "
|
||||
" join_unlimited, join_cond1, join_cond2, createtime, channel, "
|
||||
" owner_vip_lv, owner_head, creator_vip_lv, creator_head "
|
||||
"FROM `guild` WHERE guild_id=%d;",
|
||||
{
|
||||
guild_id
|
||||
|
@ -780,6 +780,8 @@ void Player::_CMGuildCreate(f8::MsgHdr& hdr, const cs::CMGuildCreate& msg)
|
||||
params->SetVal("owner_id", AccountId());
|
||||
params->SetVal("owner_name", NickName());
|
||||
params->SetVal("owner_avatar_url", AvatarUrl());
|
||||
params->SetVal("owner_vip_lv", VipLv());
|
||||
params->SetVal("owner_head", Head());
|
||||
params->SetVal("join_unlimited", msg.join_unlimited());
|
||||
params->SetVal("join_cond1", msg.join_cond1());
|
||||
params->SetVal("join_cond2", msg.join_cond2());
|
||||
@ -1688,6 +1690,16 @@ long long Player::GuildId()
|
||||
return myself.base_data.guild_id;
|
||||
}
|
||||
|
||||
int Player::VipLv()
|
||||
{
|
||||
return myself.base_data.vip_lv;
|
||||
}
|
||||
|
||||
int Player::Head()
|
||||
{
|
||||
return myself.base_data.head;
|
||||
}
|
||||
|
||||
int Player::GuildJob()
|
||||
{
|
||||
return myself.base_data.guild_job;
|
||||
|
@ -148,6 +148,8 @@ class Player
|
||||
const std::string NickName();
|
||||
const std::string AvatarUrl();
|
||||
long long GuildId();
|
||||
int VipLv();
|
||||
int Head();
|
||||
int GuildJob();
|
||||
int GetFriendNum();
|
||||
|
||||
|
@ -221,10 +221,12 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
" guild_apply_num, guild_notice, guild_declaration, guild_log, owner_id, "
|
||||
" owner_name, owner_avatar_url, creator_id, creator_name, creator_avatar_url, guild_member_num, "
|
||||
" guild_data, guild_status, join_unlimited, join_cond1, join_cond2, createtime, modifytime, "
|
||||
" name_ext1, name_ext2, guild_name_base64)"
|
||||
" name_ext1, name_ext2, guild_name_base64, "
|
||||
" owner_vip_lv, owner_head, creator_vip_pv, creator_head)"
|
||||
"VALUES(%d, %d, %d, '%s', %d, %d, %d, %d, '%s', '%s', '%s', '%s', "
|
||||
" '%s', '%s', '%s', '%s', '%s', %d, "
|
||||
" '%s', %d, %d, %d, %d, %d, %d, %d, %d, '%s');",
|
||||
" '%s', %d, %d, %d, %d, %d, %d, %d, %d, '%s', "
|
||||
" %d, %d, %d, %d);",
|
||||
{
|
||||
guild->_gameid(),
|
||||
guild->_channel(),
|
||||
@ -253,7 +255,11 @@ void GuildMgr::__GuildCreate(f8::JsonHttpRequest* request)
|
||||
App::Instance()->nowtime,
|
||||
name_ext1,
|
||||
name_ext2,
|
||||
guild_name_base64
|
||||
guild_name_base64,
|
||||
guild->owner_vip_lv(),
|
||||
guild->owner_head(),
|
||||
guild->owner_vip_lv(),
|
||||
guild->owner_head(),
|
||||
},
|
||||
a8::XParams()
|
||||
.SetSender(request)
|
||||
|
@ -39,6 +39,8 @@ void TypeConvert::Convert(f8::JsonHttpRequest* request, cs::MFGuildBasic* guild_
|
||||
guild_basic->set_owner_id(request->request.At("owner_id")->AsXValue().GetString());
|
||||
guild_basic->set_owner_name(request->request.At("owner_name")->AsXValue().GetString());
|
||||
guild_basic->set_owner_avatar_url(request->request.At("owner_avatar_url")->AsXValue().GetString());
|
||||
guild_basic->set_owner_vip_lv(request->request.At("owner_vip_lv")->AsXValue());
|
||||
guild_basic->set_owner_head(request->request.At("owner_head")->AsXValue());
|
||||
guild_basic->set_join_unlimited(request->request.At("join_unlimited")->AsXValue());
|
||||
guild_basic->set_join_cond1(request->request.At("join_cond1")->AsXValue());
|
||||
guild_basic->set_join_cond2(request->request.At("join_cond2")->AsXValue());
|
||||
|
Loading…
x
Reference in New Issue
Block a user