diff --git a/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs b/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs index 5526648cd6..6e803ba98b 100644 --- a/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs +++ b/Assets/LuaFramework/Scripts/Utility/MEncyptUtil.cs @@ -5,35 +5,78 @@ using LuaInterface; using System; using System.IO; using UnityEditor; +using System.Security.Cryptography; namespace GameLogic { public static class MEncyptUtil { // - //加密/解密 + //异或加密 static byte[] crypt(byte[] data, string key) { - int[] ri = new int[data.Length]; - byte[] cl = System.Text.Encoding.Default.GetBytes(key); - for(long i = 0; i=maxNum then - return - end - if num>0 then - BattleUtil.CalRage(role,point,num,CountTypeName.Sub) - curNum=curNum+num - end - end + BattleLogic.WaitForTrigger(BattleLogic.GameDeltaTime,function() + local dmg= floor(BattleUtil.ErrorCorrection((damage-finalDmg)*f1)) + local list = RoleManager.Query(function(v) return v.camp ~= role.camp end) + list = BattleUtil.SortByHpFactor(list,0) + -- if not list[1]:IsDead() then + if list then + if not point then + point=list[1] + end + if point==nil then + return + end + BattleUtil.FinalDamage(nil,role,point,dmg) + if curNum>=maxNum then + return + end + if num>0 then + BattleUtil.CalRage(role,point,num,CountTypeName.Sub) + curNum=curNum+num + end + end + end) end end role.Event:AddEvent(BattleEventName.RoleHit, onRoleHit,nil,nil,role) @@ -10163,6 +10168,7 @@ local passivityList = { end role.Event:AddEvent(BattleEventName.BuffCaster, OnBuffStart,nil,nil,role) - end + end, + } return passivityList \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua index 87e2ccb0f0..65ea02cc37 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Buff/NoDead.lua @@ -27,6 +27,9 @@ end -- 记录承受伤害 function NoDead:OnRoleBeHit(atkRole, damage, bCrit, finalDmg, damageType, skill,isDirect) if skill and (skill.type == BattleSkillType.Special or skill.type==BattleSkillType.Extra or skill.type==BattleSkillType.DeadSkill ) and atkRole.camp~=self.target.camp then + if self.changePro==nil then + self.changePro=0.1 + end self.recordDamage=self.recordDamage+math.floor(damage*self.changePro) end end @@ -65,6 +68,9 @@ function NoDead:OnEnd() self.target.Event:RemoveEvent(BattleEventName.RoleBeHit,self.OnRoleBeHit,self) end --self.target.Event + if self.pro==nil then + self.pro=0 + end local isRand=BattleUtil.RandomAction(self.pro,function() RoleManager.RemoveDeadRole(self.target) self.target.isDead=false diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/SkillSetView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/SkillSetView.lua index 50fa618aea..a53e7d8de3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/SkillSetView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Test/View/SkillSetView.lua @@ -56,7 +56,7 @@ function SkillSetView:Show(camp, pos, BattleView) self.rt.text = self.roleView.SkillCaster.actionTime*1000 self.rt2.text = self.roleView.SkillCaster.soundTime*1000 - local nCId = BattleManager.GetCombatIdBySkin(nSkillId, 0) + local nCId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId) local nCombat = BattleManager.GetSkillCombat(nCId) self.nt1.text = nCombat.BeforeEffectDelay self.nt2.text = nCombat.KeyFrame @@ -65,7 +65,7 @@ function SkillSetView:Show(camp, pos, BattleView) self.nt5.text = nCombat.SkillDuration self.nt6.text = nCombat.SkillNumber - local sCId = BattleManager.GetCombatIdBySkin(sSkillId, 0) + local sCId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId) local sCombat = BattleManager.GetSkillCombat(sCId) self.st1.text = sCombat.BeforeEffectDelay self.st2.text = sCombat.KeyFrame @@ -85,7 +85,7 @@ function SkillSetView:ApplyData() self.roleView.SkillCaster.actionTime = (tonumber(self.rt.text)or 0)/1000 self.roleView.SkillCaster.soundTime = (tonumber(self.rt2.text)or 0)/1000 - local ncId = BattleManager.GetCombatIdBySkin(nSkillId, 0) + local ncId = BattleManager.GetCombatIdBySkin(nSkillId, self.role.roleData.skinId) local nCombat = BattleManager.GetSkillCombat(ncId) local nBeforeEffectDelay = tonumber(self.nt1.text) or 0 local nKeyFrame = tonumber(self.nt2.text) or 0 @@ -98,13 +98,11 @@ function SkillSetView:ApplyData() nCombat.BeforeEffectDelay = nBeforeEffectDelay nCombat.DamageDelay = nDamageDelay BattleManager.SetSkillCombat(ncId, nCombat) - for i=2, #self.role.skill do - self.role.skill[2] = nKeyFrame/1000 - self.role.skill[3] = nSkillDuration/1000 - self.role.skill[4] = nSkillNumber - end + self.role.skill[2] = nKeyFrame/1000 + self.role.skill[3] = nSkillDuration/1000 + self.role.skill[4] = nSkillNumber - local scId = BattleManager.GetCombatIdBySkin(sSkillId, 0) + local scId = BattleManager.GetCombatIdBySkin(sSkillId, self.role.roleData.skinId) local sCombat = BattleManager.GetSkillCombat(scId) local sBeforeEffectDelay = tonumber(self.st1.text) or 0 local sKeyFrame = tonumber(self.st2.text) or 0 @@ -117,11 +115,9 @@ function SkillSetView:ApplyData() sCombat.BeforeEffectDelay = sBeforeEffectDelay sCombat.DamageDelay = sDamageDelay BattleManager.SetSkillCombat(scId, sCombat) - for i=2, #self.role.superSkill do - self.role.superSkill[2] = sKeyFrame/1000 - self.role.superSkill[3] = sSkillDuration/1000 - self.role.superSkill[4] = sSkillNumber - end + self.role.superSkill[2] = sKeyFrame/1000 + self.role.superSkill[3] = sSkillDuration/1000 + self.role.superSkill[4] = sSkillNumber PopupTipPanel.ShowTip(Language[10212]) end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua index 8a56fb4969..0a7c1b7504 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/EnemyView.lua @@ -141,7 +141,7 @@ function EnemyView:onCreate(go, role, position, root, isBoss,enemyId) self.rageSlider.fillAmount = self.role.Rage / 4 self.rageText.gameObject:SetActive(false) self.rageText.text = "" - + self.currAniName="idle" -- 伤害文字显示 self.LastBuffFloatingTime = Time.realtimeSinceStartup self.BuffFloatingCount = 0 @@ -362,18 +362,23 @@ function EnemyView:SetHighLight(isLight, eScale, dur, func) end), ec, dur):SetEase(Ease.Linear) end + -- 播放动画 function EnemyView:PlaySpineAnim(gog, time, name, isLoop) + if isLoop then gog.AnimationState:SetAnimation(time, name, isLoop) + self.currAniName=name else local _complete = nil _complete = function(state) gog.AnimationState.Complete = gog.AnimationState.Complete - _complete gog.AnimationState:SetAnimation(0, "idle", true) + self.currAniName="idle" end gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题) gog.AnimationState:SetAnimation(time, name, isLoop) + self.currAniName=name gog.AnimationState.Complete = gog.AnimationState.Complete + _complete end end @@ -536,22 +541,30 @@ function EnemyView:DOHitEffect(time, func) if not time or time < 0.3 then time = 0.3 end - -- 受击放大1.2倍 - self:DoScale(1.2, 0.1) - -- 卡面变红 - self.RoleLiveGOGraphic:DOColor(Color.New(1,0,0,1), 0.1):OnComplete(function () - self.RoleLiveGOGraphic:DOColor(Color.New(1,1,1,1), 0.1):SetDelay(time) - end) - -- 震动 - self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function () - self.RoleLiveGO.transform.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] ) - -- 恢复大小 - self:DoScale(1, 0.1) + if self.currAniName~="idle" and self.currAniName~="hit" then + -- 受击放大1.2倍 + self:DoScale(1.2, 0.1) + -- 卡面变红 + self.RoleLiveGOGraphic:DOColor(Color.New(1,0,0,1), 0.1):OnComplete(function () + self.RoleLiveGOGraphic:DOColor(Color.New(1,1,1,1), 0.1):SetDelay(time) + end) + -- 震动 + self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function () + self.RoleLiveGO.transform.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] ) + -- 恢复大小 + self:DoScale(1, 0.1) + -- 回调 + if func then + func() + end + end) + else -- 回调 if func then func() end - end) + end + end diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index a6d004963f..15217264d8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -172,6 +172,7 @@ function PlayerView:onCreate(go, role, position, root) else self.lvHpObj:GetComponent("RectTransform").anchoredPosition=Vector3.New(0,0,0) end + self.currAniName="" -- 伤害文字显示 self.LastBuffFloatingTime = Time.realtimeSinceStartup self.BuffFloatingCount = 0 @@ -384,16 +385,20 @@ function PlayerView:SetHighLight(isLight, eScale, dur, func) end -- 播放动画 + function PlayerView:PlaySpineAnim(gog, time, name, isLoop) if isLoop then + self.currAniName=name gog.AnimationState:SetAnimation(time, name, isLoop) else local _complete = nil _complete = function(state) gog.AnimationState.Complete = gog.AnimationState.Complete - _complete + self.currAniName="idle" gog.AnimationState:SetAnimation(0, "idle", true) end gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题) + self.currAniName=name gog.AnimationState:SetAnimation(time, name, isLoop) gog.AnimationState.Complete = gog.AnimationState.Complete + _complete end @@ -443,8 +448,8 @@ function PlayerView:OnSkillEnd() --local cardRenderMat = self.liveRender.material --cardRenderMat:SetInt("_IsMask", 1) -- 动画播放就停止 - if self.rlgTween2 then self.rlgTween2:Kill() end - if self.rlgTween3 then self.rlgTween3:Kill() end + --if self.rlgTween2 then self.rlgTween2:Kill() end + --if self.rlgTween3 then self.rlgTween3:Kill() end --self.RoleLiveParnet.transform.localScale = Vector3.one --Vector2.New(self.offset[1], self.offset[2]) --self.RoleLiveParnet.transform.localPosition = Vector3(0, 0, 0) --self.liveRender.transform.anchoredPosition = Vector2.zero--Vector2.New(self.offset[1], self.offset[2]) @@ -595,35 +600,42 @@ function PlayerView:DOHitEffect(time, func) if not time or time < 0.3 then time = 0.3 end - -- 受击放大1.2倍 - self:DoScale(1.2, 0.1) - -- 卡面变红 - DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 1 end), - DG.Tweening.Core.DOSetter_float(function (progress) - local color = Color.New(1, progress, progress, 1) - Util.SetColor(self.GameObject, color) - Util.SetColor(self.RoleLiveGOGraphic, color) - end), 0, 0.1):SetEase(Ease.Linear):OnComplete(function() - DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 0 end), + if self.currAniName~="idle" and self.currAniName~="hit" then + -- 受击放大1.2倍 + self:DoScale(1.2, 0.1) + -- 卡面变红 + DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 1 end), DG.Tweening.Core.DOSetter_float(function (progress) local color = Color.New(1, progress, progress, 1) Util.SetColor(self.GameObject, color) Util.SetColor(self.RoleLiveGOGraphic, color) - end), 1, 0.1):SetEase(Ease.Linear):SetDelay(time) - end) - -- 震动 - self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function () - self.RoleLiveGOTran.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] ) - -- if self.GameObject then - -- self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221) - -- end - -- 恢复大小 - self:DoScale(1, 0.1) - -- 回调 + end), 0, 0.1):SetEase(Ease.Linear):OnComplete(function() + DoTween.To(DG.Tweening.Core.DOGetter_float( function () return 0 end), + DG.Tweening.Core.DOSetter_float(function (progress) + local color = Color.New(1, progress, progress, 1) + Util.SetColor(self.GameObject, color) + Util.SetColor(self.RoleLiveGOGraphic, color) + end), 1, 0.1):SetEase(Ease.Linear):SetDelay(time) + end) + -- 震动 + self.RoleLiveGOTran:DOShakeAnchorPos(time, Vector2.New(200, 100), 100, 50, false, true):OnComplete(function () + self.RoleLiveGOTran.anchoredPosition = Vector2.New(self.outOffset[1], self.outOffset[2] ) + -- if self.GameObject then + -- self.GameObject.transform.parent.anchoredPosition = Vector2.New(self.role.position == 1 and -145 or 0, -221) + -- end + -- 恢复大小 + self:DoScale(1, 0.1) + -- 回调 + if func then + func() + end + end) + else if func then func() end - end) + end + end diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index 0cfb10129a..14ba0e640d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -944,6 +944,7 @@ local OpenSeverWelfareRewardShow = { [19] = {image1 = "r_guanka_guankajianglishenfu",image2 = "r_guanka_guankajiangli02_zh"}, [81128] = {image1 = "r_guanka_guankajianglibaoxiang",image2 = "r_guanka_guankajiangli03_zh"}, [11023] = {image1 = "r_guanka_guankajianglishunwukong",image2 = "r_guanka_guankajiangli04_zh"}, + [87] = {image1 = "r_Material_Mineral_0003",image2 = ""}, } function this.UpdateOpenSeverWelfare() local mainLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig) @@ -965,9 +966,18 @@ function this.UpdateOpenSeverWelfare() end this.btnOpenSeverWelfare:SetActive(isShowBtn) if not curMissionConfig then return end + -- 奖励图 this.OpenSeverWelfareicon.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image1) - this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2) this.OpenSeverWelfareicon:SetNativeSize() + -- 文字 + local imgName2 = OpenSeverWelfareRewardShow[curMissionConfig.Reward[1][1]].image2 + if imgName2 and imgName2 ~= "" then + this.OpenSeverWelfareiconText.sprite = this.spLoader:LoadSprite(imgName2) + this.OpenSeverWelfareiconText.gameObject:SetActive(true) + else + this.OpenSeverWelfareiconText.gameObject:SetActive(false) + end + -- local curPassLevelSortId = FightPointPassManager.lastPassFightId ~= FightPointPassManager.curOpenFight and mainLevelConfig[FightPointPassManager.lastPassFightId].SortId or 0 local getRewardLevelSortId = mainLevelConfig[curMissionConfig.Values[1][1]].SortId this.OpenSeverWelfareRed:SetActive(curPassLevelSortId >= getRewardLevelSortId) diff --git a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua index ded7d6e2f5..e1a9abefb2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua @@ -732,6 +732,8 @@ local jumpDic = { local id2= ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YiJingBaoKu) if id then JumpManager.GoJump(40050,nil,id2) + else + this.JumpActivity(JumpType.zhenqibaoge,data[1]) end end, [JumpType.LingShouTehui] = function(data)--零售特惠 diff --git a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulChipLottery.lua b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulChipLottery.lua index 49a81910e0..fe07d7f961 100644 --- a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulChipLottery.lua +++ b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsmanSoulChipLottery.lua @@ -32,6 +32,9 @@ function TailsmanSoulChipLottery:InitComponent() self.zqbgEffect = Util.GetGameObject(self.zhenqibaogeBtn,"Fx_Circle 1") self.btn_soul = Util.GetGameObject(self.rightUp, "btn_hero") self.upSoulImg= Util.GetGameObject(self.btn_soul, "Icon"):GetComponent("Image") + + self.zqbgOldBtn = Util.GetGameObject(self.rightUp,"zqbgold") + self.zqbgOldEffect = Util.GetGameObject(self.zqbgOldBtn,"Fx_Circle 1") Util.GetGameObject(self.btn_soul,"InfoImg"):GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tdhl_genghuansuipian") self.btns = {} @@ -63,9 +66,12 @@ end --绑定事件(用于子类重写) function TailsmanSoulChipLottery:BindEvent() Util.AddOnceClick(self.zhenqibaogeBtn, function() + JumpManager.GoJump(40050,nil,self.actId) + end) + Util.AddOnceClick(self.zqbgOldBtn, function() JumpManager.GoJump(40011) end) - Util.AddOnceClick(self.btnHelp, function() + Util.AddOnceClick(self.btnHelp, function() UIManager.OpenPanel(UIName.HelpPopup,self.actConfig.HelpId,self.helpPosition.x,self.helpPosition.y) end) @@ -73,11 +79,11 @@ function TailsmanSoulChipLottery:BindEvent() UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.RecrutDetail,self.actConfig.HelpId,self.actType,PRE_REWARD_POOL_TYPE.TIANDIHONGLU_UP,PRE_REWARD_POOL_TYPE.TIANDIHONGLU) end) - Util.AddOnceClick(self.btnStore, function() + Util.AddOnceClick(self.btnStore, function() JumpManager.GoJump(40047) end) - Util.AddOnceClick(self.btn_soul, function() + Util.AddOnceClick(self.btn_soul, function() UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.chooseTailsManSoul) end) @@ -117,6 +123,7 @@ end function TailsmanSoulChipLottery:OnSortingOrderChange(_sortingOrder) sortingOrder = _sortingOrder or 0 Util.SetParticleSortLayer(self.zqbgEffect, sortingOrder+1) + Util.SetParticleSortLayer(self.zqbgOldEffect, sortingOrder+1) for i = 1, 5 do if self.icons[i] and self.icons[i].effect then Util.SetParticleSortLayer(self.icons[i].effect.gameObject, sortingOrder+1) @@ -129,6 +136,7 @@ function TailsmanSoulChipLottery:OnShow(_sortingOrder) self.gameObject:SetActive(true) sortingOrder = _sortingOrder Util.SetParticleSortLayer(self.zqbgEffect, sortingOrder+1) + Util.SetParticleSortLayer(self.zqbgOldEffect, sortingOrder+1) self.actId = self.actConfig.ActId self.actType = self.actConfig.ActiveType > 0 and self.actConfig.ActiveType or self.actConfig.FunType if self.actConfig.IfBack == 1 then @@ -148,6 +156,7 @@ function TailsmanSoulChipLottery:OnShow(_sortingOrder) self.tenRecruit = array[2] self.freeTimesId=self.singleRecruit.FreeTimes self.maxtimesId=self.singleRecruit.MaxTimes + CommonActPageManager.ShowIcon(self.zhenqibaogeBtn,self.actId) self:refreshMagicNum() self:refreshBtnShow()--刷新按钮显示 self:contentShow() diff --git a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua index bf8c00203b..0af3683f50 100644 --- a/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XunBaoMiZong/XunBaoMiZongPanel.lua @@ -125,6 +125,7 @@ function XunBaoMiZong:Refresh() local isActive = CommonActPageManager.HasContinueGift(self.actData.activityId) self.btnGift:SetActive(isActive) + CommonActPageManager.ShowIcon(self.zhenqibaogeBtn,self.actData.activityId) CompleteMap = self.actData.value == 1 CheckRedPointStatus(RedPointType.XunBaoMiZong)