1
This commit is contained in:
parent
cec7467aee
commit
988b7e56f0
@ -466,7 +466,7 @@ void GuildMgr::LoadGuild(int instance_id, long long last_idx)
|
|||||||
"SELECT idx, gameid, guild_id, guild_name, guild_lv, guild_exp, guild_badge, guild_notice, "
|
"SELECT idx, gameid, guild_id, guild_name, guild_lv, guild_exp, guild_badge, guild_notice, "
|
||||||
" guild_declaration, owner_id, owner_name, owner_avatar_url, "
|
" guild_declaration, owner_id, owner_name, owner_avatar_url, "
|
||||||
" creator_id, creator_name, creator_avatar_url, guild_status, "
|
" creator_id, creator_name, creator_avatar_url, guild_status, "
|
||||||
" join_unlimited, join_cond1, join_cond2, createtime, modifytime, channel "
|
" join_unlimited, join_cond1, join_cond2, createtime, modifytime, channel, guild_member_num "
|
||||||
"FROM `guild` WHERE idx > %d;",
|
"FROM `guild` WHERE idx > %d;",
|
||||||
{
|
{
|
||||||
last_idx
|
last_idx
|
||||||
@ -490,11 +490,12 @@ void GuildMgr::LoadGuild(int instance_id, long long last_idx)
|
|||||||
guild->set_owner_id(row[9]);
|
guild->set_owner_id(row[9]);
|
||||||
guild->set_owner_name(row[10]);
|
guild->set_owner_name(row[10]);
|
||||||
guild->set_owner_avatar_url(row[11]);
|
guild->set_owner_avatar_url(row[11]);
|
||||||
guild->set_join_unlimited(a8::XValue(row[13]));
|
guild->set_join_unlimited(a8::XValue(row[16]));
|
||||||
guild->set_join_cond1(a8::XValue(row[14]));
|
guild->set_join_cond1(a8::XValue(row[17]));
|
||||||
guild->set_join_cond2(a8::XValue(row[15]));
|
guild->set_join_cond2(a8::XValue(row[18]));
|
||||||
guild->set__gameid(a8::XValue(row[1]));
|
guild->set__gameid(a8::XValue(row[1]));
|
||||||
guild->set__channel(a8::XValue(row[18]));
|
guild->set__channel(a8::XValue(row[21]));
|
||||||
|
guild->set_member_num(a8::XValue(row[22]));
|
||||||
GuildMgr::Instance()->AddGuild(guild);
|
GuildMgr::Instance()->AddGuild(guild);
|
||||||
if (a8::XValue(row[0]).GetInt64() > last_idx) {
|
if (a8::XValue(row[0]).GetInt64() > last_idx) {
|
||||||
last_idx = a8::XValue(row[0]);
|
last_idx = a8::XValue(row[0]);
|
||||||
@ -514,7 +515,6 @@ void GuildMgr::LoadGuild(int instance_id, long long last_idx)
|
|||||||
|
|
||||||
void GuildMgr::SyncGuild(int instance_id)
|
void GuildMgr::SyncGuild(int instance_id)
|
||||||
{
|
{
|
||||||
#if 1
|
|
||||||
DBEngine::Instance()->ExecAsyncQuery
|
DBEngine::Instance()->ExecAsyncQuery
|
||||||
(
|
(
|
||||||
*JsonDataMgr::Instance()->GetMysqlConf(instance_id),
|
*JsonDataMgr::Instance()->GetMysqlConf(instance_id),
|
||||||
@ -544,14 +544,14 @@ void GuildMgr::SyncGuild(int instance_id)
|
|||||||
guild->set_owner_id(row[9]);
|
guild->set_owner_id(row[9]);
|
||||||
guild->set_owner_name(row[10]);
|
guild->set_owner_name(row[10]);
|
||||||
guild->set_owner_avatar_url(row[11]);
|
guild->set_owner_avatar_url(row[11]);
|
||||||
guild->set_join_unlimited(a8::XValue(row[13]));
|
guild->set_join_unlimited(a8::XValue(row[16]));
|
||||||
guild->set_join_cond1(a8::XValue(row[14]));
|
guild->set_join_cond1(a8::XValue(row[17]));
|
||||||
guild->set_join_cond2(a8::XValue(row[15]));
|
guild->set_join_cond2(a8::XValue(row[18]));
|
||||||
guild->set__gameid(a8::XValue(row[1]));
|
guild->set__gameid(a8::XValue(row[1]));
|
||||||
guild->set__channel(a8::XValue(row[18]));
|
guild->set__channel(a8::XValue(row[21]));
|
||||||
guild->set_member_num(a8::XValue(row[19]));
|
guild->set_member_num(a8::XValue(row[22]));
|
||||||
if (a8::XValue(row[17]).GetInt64() > last_sync_time) {
|
if (a8::XValue(row[20]).GetInt64() > last_sync_time) {
|
||||||
last_sync_time = a8::XValue(row[17]);
|
last_sync_time = a8::XValue(row[20]);
|
||||||
}
|
}
|
||||||
GuildMgr::Instance()->UpdateGuild(guild);
|
GuildMgr::Instance()->UpdateGuild(guild);
|
||||||
delete guild;
|
delete guild;
|
||||||
@ -566,7 +566,6 @@ void GuildMgr::SyncGuild(int instance_id)
|
|||||||
abort();
|
abort();
|
||||||
},
|
},
|
||||||
instance_id);
|
instance_id);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuildMgr::OnOneDBDone(int instance_id)
|
void GuildMgr::OnOneDBDone(int instance_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user