Merge branch 'master_xma_local' into 0功能/本周版本优化内容

# Conflicts:
#	Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Passivity.lua
dev_chengFeng
zhangqiang 2021-01-22 15:29:46 +08:00
commit f44dcc20b7
25 changed files with 72 additions and 19 deletions

View File

@ -119,7 +119,12 @@ namespace GameLogic
Dictionary<string, object> data = stringToDic(trackData);
ThinkingAnalyticsAPI.Track(trackEvent, data);
}
// 设置访客Id
public string GetDeviceId()
{
return ThinkingAnalyticsAPI.GetDeviceId();
}
// Debug.Log("TA.TAExample - current disctinct ID is: " + ThinkingAnalyticsAPI.GetDistinctId());

View File

@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_c_gy_00092_attack_01
m_Name: Effect_c_gy_00092_attack_01_anim
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0

View File

@ -6,7 +6,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_c_gy_00092_attack_01
m_Name: Effect_c_gy_00092_attack_01_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:

View File

@ -6,7 +6,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_c_gy_00092_attack_02_01
m_Name: Effect_c_gy_00092_attack_02_01_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:

View File

@ -6,7 +6,7 @@ AnimationClip:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_c_gy_00092_attack_02
m_Name: Effect_c_gy_00092_attack_02_anim
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0

View File

@ -6,7 +6,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_c_gy_00092_attack_02
m_Name: Effect_c_gy_00092_attack_02_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:

View File

@ -6,7 +6,7 @@ AnimatorController:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Effect_ls_11_qiongqi_attack_01
m_Name: Effect_ls_11_qiongqi_attack_01_controller
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eff_glow_001
m_Name: eff_glow_001_mat
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eff_kuoquan_002
m_Name: eff_kuoquan_002_mat
m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: eff_shan_003
m_Name: eff_shan_003_mat
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: hitBigFix02
m_Name: hitBigFix02_mat
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5

View File

@ -177,21 +177,30 @@ function this.SubmitBattleRecord()
end
local _, rcd = this.isHaveRecord()
if rcd then
NetManager.GMEvent("//".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData))
NetManager.GMEvent("//".. (rcd.fightId or "") .."|".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData))
end
this.isSubmit = false
PopupTipPanel.ShowTip(Language[12296])
end
-- 上报战斗日志
function this.SubmitCheckFight()
function this.SubmitCheckFight(fr, br)
if not this.isSubmit then
PopupTipPanel.ShowTip(Language[12295])
return
end
local _, rcd = this.isHaveRecord()
if rcd then
NetManager.GMEvent("//check_fight|".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData))
local gmStr = "//check_fight"
.."|fightId = ".. (rcd.fightId or "")
.."|uid = ".. PlayerManager.uid
.."|seed = "..rcd.seed
.."|maxRound = "..rcd.fightMaxRound
.."|client_result = "..(fr or "")
.."|server_result = "..(br or "")
.."|fightdata = "..BattleManager.PrintBattleTable(rcd.fightData)
LogWarn("submit record: \n"..gmStr)
NetManager.GMEvent(gmStr)
end
this.isSubmit = false
PopupTipPanel.ShowTip(Language[12296])

View File

@ -557,6 +557,15 @@ function RoleLogic:SetRelive(hpf, caster)
self.reliveHPF = hpf or 1
self.reliveCaster = caster
RoleManager.AddReliveRole(self)
-- local maxHp = self.data:GetData(RoleDataName.MaxHp)
-- local reHp = floor(self.reliveHPF * maxHp)
-- self.data:SetValue(RoleDataName.Hp, reHp)
-- -- 发送复活事件
-- --self.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- --BattleLogic.Event:DispatchEvent(BattleEventName.RoleRelive, self)
-- -- 复活的血量算做加血
-- BattleLogic.Event:DispatchEvent(BattleEventName.RecordTreat, self.reliveCaster or self, self, reHp)
-- return true
end
return false
end

View File

@ -246,8 +246,8 @@ end
-- 外部调用
function this:ShowNameShow(result, str)
if true then return end
this.fightResult = result
if true then return end
if str then
local nameList = string.split(str, "|")
BattleView:SetNameStr(str)
@ -361,7 +361,7 @@ function this.BattleEnd(result)
NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg)
-- 结果检测
if msg.result ~= this.lastBattleResult.result then
BattleRecordManager.SubmitCheckFight()
BattleRecordManager.SubmitCheckFight(this.lastBattleResult.result, msg.result)
end
for i=1, #msg.remainHpList do
@ -389,7 +389,7 @@ function this.BattleEnd(result)
--ExpeditionManager.UpdateHeroHpValue(msg.heroInfo)
--ExpeditionManager.UpdateNodeValue(msg) --nodeInfo
if msg.result ~= this.lastBattleResult.result then
BattleRecordManager.SubmitCheckFight()
BattleRecordManager.SubmitCheckFight(this.lastBattleResult.result, msg.result)
end
this.lastBattleResult.result = msg.result
this.lastBattleResult.drop = msg.drop
@ -416,7 +416,7 @@ function this.BattleEnd(result)
-- 判断是否需要进行结果检测
if this.fightResult then
if result ~= this.fightResult then
BattleRecordManager.SubmitCheckFight()
BattleRecordManager.SubmitCheckFight(this.fightResult, result)
end
end
-- 直接显示结果

View File

@ -68,6 +68,17 @@ function this.GetDistinctId()
end
return ""
end
-- 获取设备Id
function this.GetDeviceId()
if AppConst.isSDK then
if AndroidDeviceInfo.Instance:GetVersionCode() > 24 then
return App.TAMgr:GetDeviceId()
end
return AndroidDeviceInfo.Instance:GetDeviceID()
end
return ""
end
-- 登录
function this.Login(accountId)

View File

@ -49,6 +49,7 @@ function this.Initialize()
account = AppConst.isSDK and tostring(AppConst.OpenId) or "",
Bundle_id = AppConst.isSDK and AppConst.SdkPackageName or "",
xx_id = AppConst.isSDK and AppConst.SdkChannel or "",
device_id = AppConst.isSDK and ThinkingAnalyticsManager.GetDeviceId() or ""
})
ThinkingAnalyticsManager.Track("create_account")
end

View File

@ -33,7 +33,7 @@ end
--请求登录
function this.LoginRequest(openId, func)
local data = PlayerInfoProto_pb.LoginRequest()
data.device_id_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetDeviceID() or ""
data.device_id_s = AppConst.isSDK and ThinkingAnalyticsManager.GetDeviceId() or ""
data.idfa_sOr_imei_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetIMEICode() or ""
data.brand_type_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetDeviceBrand() or ""
data.brand_s = AppConst.isSDK and AndroidDeviceInfo.Instance:GetDeviceModel() or ""

View File

@ -17,6 +17,7 @@ public class GameLogic_ThinkingAnalyticsManagerWrap
L.RegFunction("SetSuperProperties", SetSuperProperties);
L.RegFunction("ClearSuperProperties", ClearSuperProperties);
L.RegFunction("Track", Track);
L.RegFunction("GetDeviceId", GetDeviceId);
L.RegFunction("__eq", op_Equality);
L.RegFunction("__tostring", ToLua.op_ToString);
L.EndClass();
@ -190,6 +191,23 @@ public class GameLogic_ThinkingAnalyticsManagerWrap
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int GetDeviceId(IntPtr L)
{
try
{
ToLua.CheckArgsCount(L, 1);
GameLogic.ThinkingAnalyticsManager obj = (GameLogic.ThinkingAnalyticsManager)ToLua.CheckObject<GameLogic.ThinkingAnalyticsManager>(L, 1);
string o = obj.GetDeviceId();
LuaDLL.lua_pushstring(L, o);
return 1;
}
catch (Exception e)
{
return LuaDLL.toluaL_exception(L, e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int op_Equality(IntPtr L)
{