【改名时上报事件】
parent
0a924855ed
commit
3565dc2b2a
|
|
@ -30,7 +30,8 @@ SDKSubMitType = {
|
|||
TYPE_EXIT_GAME = 5,
|
||||
TYPE_ENTER_COPY = 6,
|
||||
TYPE_EXIT_COPY = 7,
|
||||
TYPE_VIP_LEVELUP = 8
|
||||
TYPE_VIP_LEVELUP = 8,
|
||||
TYPE_CHANGE_NAME = 9
|
||||
}
|
||||
|
||||
SDK_RESULT = {
|
||||
|
|
|
|||
|
|
@ -1622,8 +1622,14 @@ function SubmitExtraData(context)
|
|||
params.guildID = PlayerManager.familyId
|
||||
params.Vip = tostring(VipManager.GetVipLevel())
|
||||
params.moneyNum = BagManager.GetItemCountById(16)
|
||||
params.roleCreateTime = DateUtils.GetDateTime(PlayerManager.userCreateTime)
|
||||
params.roleLevelUpTime = context.roleLevelUpTime and DateUtils.GetDateTime(context.roleLevelUpTime) or ""
|
||||
params.roleCreateTime = PlayerManager.userCreateTime
|
||||
params.roleLevelUpTime = context.roleLevelUpTime and context.roleLevelUpTime or "0"
|
||||
|
||||
-- 特殊处理, 改名时用zoneName传递老名字
|
||||
if context.type == SDKSubMitType.TYPE_CHANGE_NAME then
|
||||
params.zoneName = context.oldName
|
||||
end
|
||||
|
||||
SDKMgr:SubmitExtraData(params)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -71,6 +71,9 @@ function this.ChangeUserName(type, name, teamPosId, sex, callBack)
|
|||
return
|
||||
end
|
||||
NetManager.ChangeUserNameRequest(type, name, teamPosId, sex, function()
|
||||
-- 保存一下老名字,用于上报事件
|
||||
local oldName = this.roleName
|
||||
--
|
||||
this.roleSex = sex
|
||||
this.roleName = name
|
||||
PlayerManager.nickName = name
|
||||
|
|
@ -79,6 +82,9 @@ function this.ChangeUserName(type, name, teamPosId, sex, callBack)
|
|||
ThinkingAnalyticsManager.SetSuperProperties({
|
||||
role_name = PlayerManager.nickName,
|
||||
})
|
||||
-- 上报改名事件
|
||||
SubmitExtraData({ type = SDKSubMitType.TYPE_CHANGE_NAME, oldName = oldName })
|
||||
|
||||
-- 创建角色时保存一下头像数据
|
||||
if type == 1 then
|
||||
local config = ConfigManager.GetConfigDataByKey(ConfigName.PlayerRole, "Role", sex)
|
||||
|
|
|
|||
Loading…
Reference in New Issue