1
This commit is contained in:
parent
95a594c5f4
commit
a1a7e640b4
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <a8/openssl.h>
|
#include <a8/openssl.h>
|
||||||
#include <a8/timer.h>
|
#include <a8/timer.h>
|
||||||
|
#include <a8/mutable_xobject.h>
|
||||||
|
|
||||||
#include "dbengine.h"
|
#include "dbengine.h"
|
||||||
|
|
||||||
@ -15,6 +16,8 @@
|
|||||||
#include "cs_proto.pb.h"
|
#include "cs_proto.pb.h"
|
||||||
#include "ss_proto.pb.h"
|
#include "ss_proto.pb.h"
|
||||||
|
|
||||||
|
#include "framework/cpp/httpclientpool.h"
|
||||||
|
|
||||||
void DBHelper::Init()
|
void DBHelper::Init()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -126,6 +129,26 @@ void DBHelper::ConfirmGuild(Player* hum, long long guild_id)
|
|||||||
if (hum) {
|
if (hum) {
|
||||||
hum->UpdateGuildData(param.param1, kGuildOwner);
|
hum->UpdateGuildData(param.param1, kGuildOwner);
|
||||||
hum->SaveToDB(a8::XParams(), nullptr, nullptr);
|
hum->SaveToDB(a8::XParams(), nullptr, nullptr);
|
||||||
|
|
||||||
|
std::string ip;
|
||||||
|
int port = 0;
|
||||||
|
JsonDataMgr::Instance()->GetRankServerConf(ip, port);
|
||||||
|
a8::MutableXObject* params = a8::MutableXObject::NewObject();
|
||||||
|
params->SetVal("guild_id", param.param1.GetInt64());
|
||||||
|
f8::HttpClientPool::Instance()->HttpGet
|
||||||
|
(
|
||||||
|
a8::XParams(),
|
||||||
|
[] (a8::XParams& param, a8::XObject& data)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
[] (a8::XParams& param, const std::string& response)
|
||||||
|
{
|
||||||
|
},
|
||||||
|
a8::Format("http://%s:%d/webapp/index.php?c=Guild&a=confirmed", {ip, port}).c_str(),
|
||||||
|
*params,
|
||||||
|
param.param1.GetInt64()
|
||||||
|
);
|
||||||
|
delete params;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto on_error =
|
auto on_error =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user