1
This commit is contained in:
parent
05b384fd47
commit
6961b82f41
@ -54,6 +54,7 @@ void GameLog::GameEnd(Player* hum)
|
|||||||
prop->SetVal("account_register_date", a8::TimestampToDateTime(hum->account_registertime));
|
prop->SetVal("account_register_date", a8::TimestampToDateTime(hum->account_registertime));
|
||||||
prop->SetVal("game_uniid", a8::XValue(hum->room->room_uuid).GetString());
|
prop->SetVal("game_uniid", a8::XValue(hum->room->room_uuid).GetString());
|
||||||
//prop->SetVal("game_param", "");
|
//prop->SetVal("game_param", "");
|
||||||
|
prop->SetVal("game_gold", hum->stats.gold);
|
||||||
prop->SetVal("game_score", hum->stats.score);
|
prop->SetVal("game_score", hum->stats.score);
|
||||||
prop->SetVal("nickname", hum->name);
|
prop->SetVal("nickname", hum->name);
|
||||||
//prop->SetVal("localuuid", "");
|
//prop->SetVal("localuuid", "");
|
||||||
|
@ -38,6 +38,7 @@ class Human : public Entity
|
|||||||
long ip_saddr = 0;
|
long ip_saddr = 0;
|
||||||
int team_id = 0;
|
int team_id = 0;
|
||||||
std::string account_id;
|
std::string account_id;
|
||||||
|
std::string session_id;
|
||||||
std::string from_appid;
|
std::string from_appid;
|
||||||
std::string team_uuid;
|
std::string team_uuid;
|
||||||
int account_registertime = 0;
|
int account_registertime = 0;
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "cs_proto.pb.h"
|
#include "cs_proto.pb.h"
|
||||||
#include "room.h"
|
#include "room.h"
|
||||||
|
|
||||||
|
#include "framework/cpp/utils.h"
|
||||||
|
|
||||||
void PlayerMgr::Init()
|
void PlayerMgr::Init()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -39,6 +41,8 @@ Player* PlayerMgr::CreatePlayerByCMJoin(long ip_saddr, int socket, const cs::CMJ
|
|||||||
hum->socket_handle = socket;
|
hum->socket_handle = socket;
|
||||||
hum->ip_saddr = ip_saddr;
|
hum->ip_saddr = ip_saddr;
|
||||||
hum->account_id = msg.account_id();
|
hum->account_id = msg.account_id();
|
||||||
|
hum->session_id = msg.session_id();
|
||||||
|
hum->from_appid = msg.from_appid();
|
||||||
hum->name = msg.name();
|
hum->name = msg.name();
|
||||||
hum->health = 0;
|
hum->health = 0;
|
||||||
hum->team_uuid = msg.team_uuid();
|
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->avatar_url = msg.avatar_url();
|
||||||
hum->energy_shield = msg.energy_shield();
|
hum->energy_shield = msg.energy_shield();
|
||||||
hum->create_tick = a8::XGetTickCount();
|
hum->create_tick = a8::XGetTickCount();
|
||||||
|
hum->account_registertime = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
|
||||||
for (auto& weapon : msg.weapons()) {
|
for (auto& weapon : msg.weapons()) {
|
||||||
if (weapon.weapon_id() != 0 && weapon.weapon_lv() > 0) {
|
if (weapon.weapon_id() != 0 && weapon.weapon_lv() > 0) {
|
||||||
hum->weapon_configs[weapon.weapon_id()] = weapon.weapon_lv();
|
hum->weapon_configs[weapon.weapon_id()] = weapon.weapon_lv();
|
||||||
|
@ -597,6 +597,8 @@ message CMJoin
|
|||||||
repeated MFWeapon weapons = 17; //武器列表
|
repeated MFWeapon weapons = 17; //武器列表
|
||||||
repeated MFSkin skins = 18; //皮肤列表 key: 皮肤id value:皮肤等级
|
repeated MFSkin skins = 18; //皮肤列表 key: 皮肤id value:皮肤等级
|
||||||
repeated int32 prepare_items = 19; //战斗前准备道具 战前准备护盾存到energy_shield
|
repeated int32 prepare_items = 19; //战斗前准备道具 战前准备护盾存到energy_shield
|
||||||
|
optional string session_id = 20; //session_id
|
||||||
|
optional string from_appid = 21; //from_appid
|
||||||
}
|
}
|
||||||
|
|
||||||
//移动
|
//移动
|
||||||
|
Loading…
x
Reference in New Issue
Block a user