private int ReduceDamagePart(ref HurtDataInfo hurt, HurtTypeDef hurtType) { int result = 0; if (hurtType == HurtTypeDef.PhysHurt) { int num = this.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYDEFPT].totalValue - hurt.attackInfo.iDEFStrike; num = num * (10000 - hurt.attackInfo.iDEFStrikeRate) / 10000; num = ((num > 0) ? num : 0); int num2 = num + (int)(this.battleParam.dwM_PhysicsDefend * (uint)this.actor.ValueComponent.mActorValue.actorLvl) + (int)this.battleParam.dwN_PhysicsDefend; if (num2 != 0) { result = num * 10000 / num2; } } else if (hurtType == HurtTypeDef.MagicHurt) { int num3 = this.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCDEFPT].totalValue - hurt.attackInfo.iRESStrike; num3 = num3 * (10000 - hurt.attackInfo.iRESStrikeRate) / 10000; num3 = ((num3 > 0) ? num3 : 0); int num4 = num3 + (int)(this.battleParam.dwM_MagicDefend * (uint)this.actor.ValueComponent.mActorValue.actorLvl) + (int)this.battleParam.dwN_MagicDefend; if (num4 != 0) { result = num3 * 10000 / num4; } } return(result); }
private int ReduceDamagePart(ref HurtDataInfo hurt, HurtTypeDef hurtType) { int num = 0; if (hurtType == HurtTypeDef.PhysHurt) { int num2 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_PHYDEFPT].totalValue - hurt.attackInfo.iDEFStrike; num2 = (num2 * (0x2710 - hurt.attackInfo.iDEFStrikeRate)) / 0x2710; num2 = (num2 <= 0) ? 0 : num2; int num3 = (int)((num2 + (this.battleParam.dwM_PhysicsDefend * base.actor.ValueComponent.mActorValue.actorLvl)) + this.battleParam.dwN_PhysicsDefend); if (num3 != 0) { num = (num2 * 0x2710) / num3; } return(num); } if (hurtType == HurtTypeDef.MagicHurt) { int num4 = base.actor.ValueComponent.mActorValue[RES_FUNCEFT_TYPE.RES_FUNCEFT_MGCDEFPT].totalValue - hurt.attackInfo.iRESStrike; num4 = (num4 * (0x2710 - hurt.attackInfo.iRESStrikeRate)) / 0x2710; num4 = (num4 <= 0) ? 0 : num4; int num5 = (int)((num4 + (this.battleParam.dwM_MagicDefend * base.actor.ValueComponent.mActorValue.actorLvl)) + this.battleParam.dwN_MagicDefend); if (num5 != 0) { num = (num4 * 0x2710) / num5; } } return(num); }
public HURT_INFO(HurtTypeDef _hurtType, string _strIconName, string _strName, int _iValue, SKILL_USE_FROM_TYPE _skillUseFrom) { this.hurtType = _hurtType; this.strIconName = _strIconName; this.strName = _strName; this.iValue = _iValue; this.SkillUseFrom = _skillUseFrom; }
private void AddDamageValue(ref HurtEventResultInfo prm) { PoolObjHandle <ActorRoot> atker = prm.atker; SkillSlotType atkSlot = prm.hurtInfo.atkSlot; int hurtTotal = prm.hurtTotal; HurtTypeDef hurtType = prm.hurtInfo.hurtType; SKILL_USE_FROM_TYPE skillUseFrom = prm.hurtInfo.SkillUseFrom; if (this.m_listDamageActorValue != null && atkSlot <= SkillSlotType.SLOT_SKILL_VALID && atker) { uint objID = atker.handle.ObjID; this.DeleteTimeoutDamageValue(objID, 0uL); DAMAGE_ACTOR_INFO dAMAGE_ACTOR_INFO; if (!this.m_listDamageActorValue.TryGetValue(objID, ref dAMAGE_ACTOR_INFO)) { dAMAGE_ACTOR_INFO = default(DAMAGE_ACTOR_INFO); dAMAGE_ACTOR_INFO.actorType = atker.handle.TheActorMeta.ActorType; dAMAGE_ACTOR_INFO.actorName = atker.handle.name; dAMAGE_ACTOR_INFO.ConfigId = atker.handle.TheActorMeta.ConfigId; if (dAMAGE_ACTOR_INFO.actorType == ActorTypeDef.Actor_Type_Monster) { MonsterWrapper monsterWrapper = atker.handle.AsMonster(); dAMAGE_ACTOR_INFO.bMonsterType = monsterWrapper.GetActorSubType(); dAMAGE_ACTOR_INFO.actorSubType = monsterWrapper.GetActorSubSoliderType(); } Player player = Singleton <GamePlayerCenter> .instance.GetPlayer(atker.handle.TheActorMeta.PlayerId); if (player != null) { dAMAGE_ACTOR_INFO.playerName = player.Name; } dAMAGE_ACTOR_INFO.listDamage = new SortedList <ulong, SKILL_SLOT_HURT_INFO[]>(); this.m_listDamageActorValue.Add(objID, dAMAGE_ACTOR_INFO); } ulong logicFrameTick = Singleton <FrameSynchr> .instance.LogicFrameTick; SKILL_SLOT_HURT_INFO[] array; if (!dAMAGE_ACTOR_INFO.listDamage.TryGetValue(logicFrameTick, ref array)) { array = new SKILL_SLOT_HURT_INFO[12]; dAMAGE_ACTOR_INFO.listDamage.Add(logicFrameTick, array); } if (array[(int)atkSlot].listHurtInfo == null) { array[(int)atkSlot].listHurtInfo = new List <HURT_INFO>(); } if (array[(int)atkSlot].listHurtInfo != null) { string text = null; string strName = null; if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL) { SkillSlot skillSlot; if (atkSlot < SkillSlotType.SLOT_SKILL_COUNT && atker.handle.SkillControl != null && (atker.handle.TheActorMeta.ActorType != ActorTypeDef.Actor_Type_Hero || atkSlot != SkillSlotType.SLOT_SKILL_0) && atker.handle.SkillControl.TryGetSkillSlot(atkSlot, out skillSlot) && skillSlot.SkillObj != null && skillSlot.SkillObj.cfgData != null) { if (!string.IsNullOrEmpty(skillSlot.SkillObj.IconName)) { text = skillSlot.SkillObj.IconName; } if (!string.IsNullOrEmpty(skillSlot.SkillObj.cfgData.szSkillName)) { strName = skillSlot.SkillObj.cfgData.szSkillName; } } } else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP) { uint uiFromId = prm.hurtInfo.uiFromId; ResEquipInBattle dataByKey = GameDataMgr.m_equipInBattleDatabin.GetDataByKey(uiFromId); if (dataByKey != null) { text = dataByKey.szIcon; strName = dataByKey.szName; } } else if (skillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_AREATRIGGER) { uint uiFromId2 = prm.hurtInfo.uiFromId; ResSkillCombineCfgInfo dataByKey2 = GameDataMgr.skillCombineDatabin.GetDataByKey(uiFromId2); if (dataByKey2 != null) { text = dataByKey2.szIconPath; strName = dataByKey2.szSkillCombineName; } } int count = array[(int)atkSlot].listHurtInfo.get_Count(); int i; for (i = 0; i < count; i++) { if (array[(int)atkSlot].listHurtInfo.get_Item(i).strIconName == text) { HURT_INFO hURT_INFO; array[(int)atkSlot].listHurtInfo.get_Item(i).iValue = hURT_INFO.iValue + hurtTotal; break; } } if (i >= count) { HURT_INFO hURT_INFO2 = new HURT_INFO(hurtType, text, strName, hurtTotal, skillUseFrom); array[(int)atkSlot].listHurtInfo.Add(hURT_INFO2); } } dAMAGE_ACTOR_INFO.listDamage.set_Item(logicFrameTick, array); this.m_listDamageActorValue.set_Item(objID, dAMAGE_ACTOR_INFO); } }
private static bool HandleSkillFuncHurt(ref SSkillFuncContext inContext, HurtTypeDef hurtType) { int num = 0; if (inContext.inStage == ESkillFuncStage.Enter) { PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj; PoolObjHandle <ActorRoot> inOriginator = inContext.inOriginator; if ((inTargetObj != 0) && !inTargetObj.handle.ActorControl.IsDeadState) { HurtDataInfo info; bool flag = false; inContext.inCustomData = new HurtAttackerInfo(); inContext.inCustomData.Init(inOriginator, inTargetObj); info.atker = inOriginator; info.atkerName = "HurtOrHealAttacker"; if (inOriginator != 0) { info.atkerName = inOriginator.handle.name; } info.target = inTargetObj; info.attackInfo = inContext.inCustomData; info.atkSlot = inContext.inUseContext.SlotType; info.hurtType = hurtType; info.extraHurtType = (ExtraHurtTypeDef)inContext.GetSkillFuncParam(0, false); info.hurtValue = inContext.GetSkillFuncParam(1, true); info.adValue = inContext.GetSkillFuncParam(2, true); info.apValue = inContext.GetSkillFuncParam(3, true); info.hpValue = inContext.GetSkillFuncParam(4, true); info.loseHpValue = inContext.GetSkillFuncParam(5, true); info.hurtCount = inContext.inDoCount; info.hemoFadeRate = inContext.inBuffSkill.handle.cfgData.iEffectFadeRate; info.bExtraBuff = inContext.inBuffSkill.handle.bExtraBuff; info.gatherTime = inContext.inUseContext.GatherTime; flag = inContext.inBuffSkill.handle.cfgData.dwEffectSubType == 9; info.bBounceHurt = flag; info.bLastHurt = inContext.inLastEffect; info.iAddTotalHurtType = 0; info.iAddTotalHurtValue = 0; num = inTargetObj.handle.ActorControl.TakeDamage(ref info); inContext.inAction.refParams.AddRefParam("HurtValue", -num); } } else if (inContext.inStage == ESkillFuncStage.Update) { PoolObjHandle <ActorRoot> handle3 = inContext.inTargetObj; PoolObjHandle <ActorRoot> handle4 = inContext.inOriginator; if (((handle3 != 0) && !handle3.handle.ActorControl.IsDeadState) && (inContext.inCustomData != null)) { HurtDataInfo info2; bool flag2 = false; info2.atker = handle4; info2.atkerName = (handle4 == 0) ? string.Empty : handle4.handle.name; info2.target = handle3; info2.attackInfo = inContext.inCustomData; info2.atkSlot = inContext.inUseContext.SlotType; info2.hurtType = hurtType; info2.extraHurtType = (ExtraHurtTypeDef)inContext.GetSkillFuncParam(0, false); info2.hurtValue = inContext.GetSkillFuncParam(1, true); info2.adValue = inContext.GetSkillFuncParam(2, true); info2.apValue = inContext.GetSkillFuncParam(3, true); info2.hpValue = inContext.GetSkillFuncParam(4, true); info2.loseHpValue = inContext.GetSkillFuncParam(5, true); info2.hurtCount = inContext.inDoCount; info2.hemoFadeRate = inContext.inBuffSkill.handle.cfgData.iEffectFadeRate; info2.bExtraBuff = inContext.inBuffSkill.handle.bExtraBuff; info2.gatherTime = inContext.inUseContext.GatherTime; flag2 = inContext.inBuffSkill.handle.cfgData.dwEffectSubType == 9; info2.bBounceHurt = flag2; info2.bLastHurt = inContext.inLastEffect; info2.iAddTotalHurtType = 0; info2.iAddTotalHurtValue = 0; num = handle3.handle.ActorControl.TakeDamage(ref info2); inContext.inAction.refParams.AddRefParam("HurtValue", -num); } } return(num != 0); }
private static bool HandleSkillFuncHurt(ref SSkillFuncContext inContext, HurtTypeDef hurtType) { int num = 0; if (inContext.inStage == ESkillFuncStage.Enter) { PoolObjHandle <ActorRoot> inTargetObj = inContext.inTargetObj; PoolObjHandle <ActorRoot> inOriginator = inContext.inOriginator; if (inTargetObj && !inTargetObj.get_handle().ActorControl.IsDeadState) { inContext.inCustomData = default(HurtAttackerInfo); inContext.inCustomData.Init(inOriginator, inTargetObj); HurtDataInfo hurtDataInfo; hurtDataInfo.atker = inOriginator; hurtDataInfo.target = inTargetObj; hurtDataInfo.attackInfo = inContext.inCustomData; hurtDataInfo.atkSlot = inContext.inUseContext.SlotType; hurtDataInfo.hurtType = hurtType; hurtDataInfo.extraHurtType = (ExtraHurtTypeDef)inContext.GetSkillFuncParam(0, false); hurtDataInfo.hurtValue = inContext.GetSkillFuncParam(1, true); hurtDataInfo.adValue = inContext.GetSkillFuncParam(2, true); hurtDataInfo.apValue = inContext.GetSkillFuncParam(3, true); hurtDataInfo.hpValue = inContext.GetSkillFuncParam(4, true); hurtDataInfo.loseHpValue = inContext.GetSkillFuncParam(5, true); hurtDataInfo.iConditionType = inContext.GetSkillFuncParam(6, false); hurtDataInfo.iConditionParam = inContext.GetSkillFuncParam(7, true); hurtDataInfo.hurtCount = inContext.inDoCount; hurtDataInfo.firstHemoFadeRate = inContext.inBuffSkill.get_handle().cfgData.iFirstLifeStealAttenuation; hurtDataInfo.followUpHemoFadeRate = inContext.inBuffSkill.get_handle().cfgData.iFollowUpLifeStealAttenuation; hurtDataInfo.iEffectCountInSingleTrigger = inContext.inEffectCountInSingleTrigger; hurtDataInfo.bExtraBuff = inContext.inBuffSkill.get_handle().bExtraBuff; hurtDataInfo.gatherTime = inContext.inUseContext.GatherTime; bool bBounceHurt = inContext.inBuffSkill.get_handle().cfgData.bEffectSubType == 9; hurtDataInfo.bBounceHurt = bBounceHurt; hurtDataInfo.bLastHurt = inContext.inLastEffect; hurtDataInfo.iAddTotalHurtValueRate = 0; hurtDataInfo.iAddTotalHurtValue = 0; hurtDataInfo.iCanSkillCrit = (int)inContext.inBuffSkill.get_handle().cfgData.bCanSkillCrit; hurtDataInfo.iDamageLimit = inContext.inBuffSkill.get_handle().cfgData.iDamageLimit; hurtDataInfo.iMonsterDamageLimit = inContext.inBuffSkill.get_handle().cfgData.iMonsterDamageLimit; hurtDataInfo.iLongRangeReduction = inContext.inBuffSkill.get_handle().cfgData.iLongRangeReduction; hurtDataInfo.iEffectiveTargetType = (int)inContext.inBuffSkill.get_handle().cfgData.bEffectiveTargetType; hurtDataInfo.iOverlayFadeRate = SkillFuncHurtDelegator.GetOverlayFadeRate(ref inContext); hurtDataInfo.iEffectFadeRate = SkillFuncHurtDelegator.GetEffectFadeRate(ref inContext); hurtDataInfo.iReduceDamage = 0; num = inTargetObj.get_handle().ActorControl.TakeDamage(ref hurtDataInfo); inContext.inAction.get_handle().refParams.AddRefParam("HurtValue", -num); } } else if (inContext.inStage == ESkillFuncStage.Update) { PoolObjHandle <ActorRoot> inTargetObj2 = inContext.inTargetObj; PoolObjHandle <ActorRoot> inOriginator2 = inContext.inOriginator; if (inTargetObj2 && !inTargetObj2.get_handle().ActorControl.IsDeadState) { HurtDataInfo hurtDataInfo2; hurtDataInfo2.atker = inOriginator2; hurtDataInfo2.target = inTargetObj2; hurtDataInfo2.attackInfo = inContext.inCustomData; hurtDataInfo2.atkSlot = inContext.inUseContext.SlotType; hurtDataInfo2.hurtType = hurtType; hurtDataInfo2.extraHurtType = (ExtraHurtTypeDef)inContext.GetSkillFuncParam(0, false); hurtDataInfo2.hurtValue = inContext.GetSkillFuncParam(1, true); hurtDataInfo2.adValue = inContext.GetSkillFuncParam(2, true); hurtDataInfo2.apValue = inContext.GetSkillFuncParam(3, true); hurtDataInfo2.hpValue = inContext.GetSkillFuncParam(4, true); hurtDataInfo2.loseHpValue = inContext.GetSkillFuncParam(5, true); hurtDataInfo2.iConditionType = inContext.GetSkillFuncParam(6, false); hurtDataInfo2.iConditionParam = inContext.GetSkillFuncParam(7, true); hurtDataInfo2.hurtCount = inContext.inDoCount; hurtDataInfo2.firstHemoFadeRate = inContext.inBuffSkill.get_handle().cfgData.iFirstLifeStealAttenuation; hurtDataInfo2.followUpHemoFadeRate = inContext.inBuffSkill.get_handle().cfgData.iFollowUpLifeStealAttenuation; hurtDataInfo2.iEffectCountInSingleTrigger = inContext.inEffectCountInSingleTrigger; hurtDataInfo2.bExtraBuff = inContext.inBuffSkill.get_handle().bExtraBuff; hurtDataInfo2.gatherTime = inContext.inUseContext.GatherTime; bool bBounceHurt2 = inContext.inBuffSkill.get_handle().cfgData.bEffectSubType == 9; hurtDataInfo2.bBounceHurt = bBounceHurt2; hurtDataInfo2.bLastHurt = inContext.inLastEffect; hurtDataInfo2.iAddTotalHurtValueRate = 0; hurtDataInfo2.iAddTotalHurtValue = 0; hurtDataInfo2.iCanSkillCrit = (int)inContext.inBuffSkill.get_handle().cfgData.bCanSkillCrit; hurtDataInfo2.iDamageLimit = inContext.inBuffSkill.get_handle().cfgData.iDamageLimit; hurtDataInfo2.iMonsterDamageLimit = inContext.inBuffSkill.get_handle().cfgData.iMonsterDamageLimit; hurtDataInfo2.iLongRangeReduction = inContext.inBuffSkill.get_handle().cfgData.iLongRangeReduction; hurtDataInfo2.iEffectiveTargetType = (int)inContext.inBuffSkill.get_handle().cfgData.bEffectiveTargetType; hurtDataInfo2.iOverlayFadeRate = SkillFuncHurtDelegator.GetOverlayFadeRate(ref inContext); hurtDataInfo2.iEffectFadeRate = SkillFuncHurtDelegator.GetEffectFadeRate(ref inContext); hurtDataInfo2.iReduceDamage = 0; num = inTargetObj2.get_handle().ActorControl.TakeDamage(ref hurtDataInfo2); inContext.inAction.get_handle().refParams.AddRefParam("HurtValue", -num); } } return(num != 0); }
private void AddDamageValue(ref PoolObjHandle <ActorRoot> actor, SkillSlotType slotType, int iValue, HurtTypeDef hurtType) { if (this.m_listDamageActorValue != null && slotType <= SkillSlotType.SLOT_SKILL_VALID && actor) { uint objID = actor.get_handle().ObjID; this.DeleteTimeoutDamageValue(objID, 0uL); DAMAGE_ACTOR_INFO dAMAGE_ACTOR_INFO; if (!this.m_listDamageActorValue.TryGetValue(objID, ref dAMAGE_ACTOR_INFO)) { dAMAGE_ACTOR_INFO = default(DAMAGE_ACTOR_INFO); dAMAGE_ACTOR_INFO.actorType = actor.get_handle().TheActorMeta.ActorType; dAMAGE_ACTOR_INFO.actorName = actor.get_handle().name; dAMAGE_ACTOR_INFO.ConfigId = actor.get_handle().TheActorMeta.ConfigId; if (dAMAGE_ACTOR_INFO.actorType == ActorTypeDef.Actor_Type_Monster) { MonsterWrapper monsterWrapper = actor.get_handle().AsMonster(); dAMAGE_ACTOR_INFO.bMonsterType = monsterWrapper.GetActorSubType(); dAMAGE_ACTOR_INFO.actorSubType = monsterWrapper.GetActorSubSoliderType(); } Player player = Singleton <GamePlayerCenter> .get_instance().GetPlayer(actor.get_handle().TheActorMeta.PlayerId); if (player != null) { dAMAGE_ACTOR_INFO.playerName = player.Name; } dAMAGE_ACTOR_INFO.listDamage = new SortedList <ulong, DOUBLE_INT_INFO[]>(); this.m_listDamageActorValue.Add(objID, dAMAGE_ACTOR_INFO); } ulong logicFrameTick = Singleton <FrameSynchr> .get_instance().LogicFrameTick; DOUBLE_INT_INFO[] array; if (!dAMAGE_ACTOR_INFO.listDamage.TryGetValue(logicFrameTick, ref array)) { array = new DOUBLE_INT_INFO[12]; dAMAGE_ACTOR_INFO.listDamage.Add(logicFrameTick, array); } if (array[(int)slotType].iValue == 0) { array[(int)slotType].iKey = (int)hurtType; } DOUBLE_INT_INFO[] expr_170_cp_0 = array; expr_170_cp_0[(int)slotType].iValue = expr_170_cp_0[(int)slotType].iValue + iValue; dAMAGE_ACTOR_INFO.listDamage.set_Item(logicFrameTick, array); this.m_listDamageActorValue.set_Item(objID, dAMAGE_ACTOR_INFO); } }
private void InitHeroPanelSkillInfo(uint uiObjId, Transform trHeroPanel, uint uiTotalDamge, CHostHeroDamage objHostHeroDamage) { int num = 0; HURT_INFO[] array = new HURT_INFO[12]; objHostHeroDamage.GetActorDamage(uiObjId, ref array, ref num); for (int i = 0; i < 3; i++) { string name = "PanelSkill/Skill" + i; Transform transform = trHeroPanel.FindChild(name); if (transform) { if (array[i].iValue <= 0) { transform.gameObject.CustomSetActive(false); } else { transform.gameObject.CustomSetActive(true); PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .instance.GetActor(uiObjId); Transform transform2 = transform.FindChild("ImgSkill"); if (transform2) { Image component = transform2.GetComponent <Image>(); if (component) { if (array[i].strIconName != null) { if (array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL || array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_AREATRIGGER) { component.SetSprite(CUIUtility.s_Sprite_Dynamic_Skill_Dir + array[i].strIconName, this.m_heroDeadInfoForm, true, false, false, false); } else if (array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP) { component.SetSprite(CUIUtility.s_Sprite_System_BattleEquip_Dir + array[i].strIconName, this.m_heroDeadInfoForm, true, false, false, false); } } else if (array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP) { component.SetSprite(CUIUtility.s_Sprite_Dynamic_Skill_Dir + "1106", this.m_heroDeadInfoForm, true, false, false, false); } else { component.SetSprite(CUIUtility.s_Sprite_Dynamic_Skill_Dir + "1001", this.m_heroDeadInfoForm, true, false, false, false); } } } HurtTypeDef hurtType = array[i].hurtType; if (hurtType >= HurtTypeDef.PhysHurt && hurtType < HurtTypeDef.Max) { Transform transform3 = transform.FindChild("TxtSkillTypeBg"); if (transform3) { Image component2 = transform3.GetComponent <Image>(); if (component2) { component2.SetSprite("UGUI/Sprite/Common/" + CHostHeroDeadInfo.m_Skill_HurtType_Bg_ImgName[(int)hurtType], this.m_heroDeadInfoForm, true, false, false, false); } } Transform transform4 = transform.FindChild("TxtSkillType"); if (transform4) { Text component3 = transform4.GetComponent <Text>(); if (component3) { component3.set_text(this.m_Skill_HurtType_Name[(int)hurtType]); component3.set_color(CUIUtility.s_Text_Skill_HurtType_Color[(int)hurtType]); } } Transform transform5 = transform.FindChild("TxtSkillName"); if (transform5) { Text component4 = transform5.GetComponent <Text>(); if (component4) { if (array[i].strName != null) { component4.set_text(array[i].strName); } else { ActorTypeDef actorTypeDef = ActorTypeDef.Invalid; if (!actor) { int num2 = 0; string text = null; string text2 = null; ActorTypeDef actorTypeDef2 = ActorTypeDef.Invalid; byte b = 0; byte b2 = 0; if (objHostHeroDamage.GetDamageActorInfo(uiObjId, ref text, ref text2, ref actorTypeDef, ref num2, ref b, ref b2)) { actorTypeDef = actorTypeDef2; } } else { actorTypeDef = actor.handle.TheActorMeta.ActorType; } if (actorTypeDef == ActorTypeDef.Actor_Type_Hero) { if (array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_SKILL) { component4.set_text(this.m_strAtkSkill0Name); } else if (array[i].SkillUseFrom == SKILL_USE_FROM_TYPE.SKILL_USE_FROM_TYPE_EQUIP) { component4.set_text(this.m_strHeroEquipSkillName); } else { component4.set_text(this.m_strHeroPassiveSkillName); } } else { component4.set_text(this.m_strAtkSkill0Name); } } component4.set_color(CUIUtility.s_Text_SkillName_And_HurtValue_Color[(int)hurtType]); } } float value = (uiTotalDamge == 0u) ? 1f : ((float)array[i].iValue / uiTotalDamge); Transform transform6 = transform.FindChild("Damage"); if (transform6) { for (int j = 0; j < 4; j++) { Transform transform7 = transform6.FindChild(CHostHeroDeadInfo.m_Skill_HurtValue_Bg_ImgName[j]); if (transform7) { transform7.gameObject.CustomSetActive(j == (int)hurtType); if (j == (int)hurtType) { Image component5 = transform7.GetComponent <Image>(); if (component5) { component5.CustomFillAmount(value); } } } } } Transform transform8 = transform.FindChild("TxtDamageValue"); if (transform8) { Text component6 = transform8.GetComponent <Text>(); if (component6) { string text3 = string.Concat(new object[] { array[i].iValue, "(", value.ToString("P0"), ")" }); component6.set_text(text3); component6.set_color(CUIUtility.s_Text_SkillName_And_HurtValue_Color[(int)hurtType]); } } } } } } }