This commit is contained in:
aozhiwei 2019-06-25 13:23:58 +08:00
parent 05b384fd47
commit 6961b82f41
4 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,7 @@ void GameLog::GameEnd(Player* hum)
prop->SetVal("account_register_date", a8::TimestampToDateTime(hum->account_registertime));
prop->SetVal("game_uniid", a8::XValue(hum->room->room_uuid).GetString());
//prop->SetVal("game_param", "");
prop->SetVal("game_gold", hum->stats.gold);
prop->SetVal("game_score", hum->stats.score);
prop->SetVal("nickname", hum->name);
//prop->SetVal("localuuid", "");

View File

@ -38,6 +38,7 @@ class Human : public Entity
long ip_saddr = 0;
int team_id = 0;
std::string account_id;
std::string session_id;
std::string from_appid;
std::string team_uuid;
int account_registertime = 0;

View File

@ -5,6 +5,8 @@
#include "cs_proto.pb.h"
#include "room.h"
#include "framework/cpp/utils.h"
void PlayerMgr::Init()
{
}
@ -39,6 +41,8 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
hum->socket_handle = socket;
hum->ip_saddr = ip_saddr;
hum->account_id = msg.account_id();
hum->session_id = msg.session_id();
hum->from_appid = msg.from_appid();
hum->name = msg.name();
hum->health = 0;
hum->team_uuid = msg.team_uuid();
@ -49,6 +53,7 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
hum->avatar_url = msg.avatar_url();
hum->energy_shield = msg.energy_shield();
hum->create_tick = a8::XGetTickCount();
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
for (auto& weapon : msg.weapons()) {
if (weapon.weapon_id() != 0 && weapon.weapon_lv() > 0) {
hum->weapon_configs[weapon.weapon_id()] = weapon.weapon_lv();

View File

@ -597,6 +597,8 @@ message CMJoin
repeated MFWeapon weapons = 17; //
repeated MFSkin skins = 18; // key: id value:
repeated int32 prepare_items = 19; // energy_shield
optional string session_id = 20; //session_id
optional string from_appid = 21; //from_appid
}
//