provide client tag in game interface meta
This commit is contained in:
parent
cd6097d133
commit
e88071684d
@ -415,16 +415,19 @@ function onReceivedDvar(server, dvarName, dvarValue, success) {
|
|||||||
|
|
||||||
let data = [];
|
let data = [];
|
||||||
|
|
||||||
if (event.subType === 'Meta') {
|
|
||||||
const metaService = _serviceResolver.ResolveService('IMetaServiceV2');
|
const metaService = _serviceResolver.ResolveService('IMetaServiceV2');
|
||||||
|
|
||||||
|
if (event.subType === 'Meta') {
|
||||||
const meta = metaService.GetPersistentMeta(event.data, client.ClientId, token).GetAwaiter().GetResult();
|
const meta = metaService.GetPersistentMeta(event.data, client.ClientId, token).GetAwaiter().GetResult();
|
||||||
data[event.data] = meta === null ? '' : meta.Value;
|
data[event.data] = meta === null ? '' : meta.Value;
|
||||||
logger.WriteDebug(`event data is ${event.data}`);
|
logger.WriteDebug(`event data is ${event.data}`);
|
||||||
} else {
|
} else {
|
||||||
|
const tagMeta = metaService.GetPersistentMetaByLookup('ClientTagV2', 'ClientTagNameV2', client.ClientId, token).GetAwaiter().GetResult();
|
||||||
data = {
|
data = {
|
||||||
level: client.Level,
|
level: client.Level,
|
||||||
clientId: client.ClientId,
|
clientId: client.ClientId,
|
||||||
lastConnection: client.LastConnection
|
lastConnection: client.LastConnection,
|
||||||
|
tag: tagMeta?.Value
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user