void SetRoleDynamicProperty() { ArkCrossEngine.RoleInfo player = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (player != null) { if (labellv != null) { labellv.text = "" + player.Level; } RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (ri != null) { UserInfo ui = ri.GetPlayerSelfInfo(); if (ui != null) { CharacterProperty cp = ui.GetActualProperty(); if (cp != null) { if (labellvfight != null) { labellvfight.text = cp.AttackBase.ToString(); } } } } if (money != null) { money.text = player.Money.ToString(); } if (diamond != null) { diamond.text = player.Gold.ToString(); } int needexp = 0; ArkCrossEngine.PlayerLevelupExpConfig plec = ArkCrossEngine.PlayerConfigProvider.Instance.GetPlayerLevelupExpConfigById(player.HeroId); if (plec != null) { needexp = plec.m_ConsumeExp; } UpdateEx(player.Level, player.Exp); if (labelhpmax != null) { ArkCrossEngine.UserInfo ui = player.GetPlayerSelfInfo(); if (ui != null) { ArkCrossEngine.CharacterProperty cp = ui.GetActualProperty(); if (cp != null) { labelhpmax.text = cp.HpMax.ToString(); } } } } }
private void CameraChangeCheck(ArenaStateInfo state, RoleInfo self) { if (state.IsChallengeOver) { return; } if (self.GetPlayerSelfInfo().IsDead() && state.CurCameraTargetPartner == -1) { ChangeCameraToPartner(state); } if (state.CurCameraTargetPartner >= 0) { CharacterInfo npc = WorldSystem.Instance.GetCharacterById(state.CurCameraTargetPartner); if (npc != null && npc.IsDead()) { ChangeCameraToPartner(state); } } }
private float GetItemFightScore(ArkCrossEngine.ItemConfig itemconfig, int propertyid, int itemlevel) { ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; CharacterProperty cp = ri.GetPlayerSelfInfo().GetActualProperty(); if (itemconfig != null && ri != null && cp != null) { ArkCrossEngine.AppendAttributeConfig aac = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(propertyid); if (aac == null) { return(ArkCrossEngine.AttributeScoreConfigProvider.Instance.CalcAttributeScore( itemconfig.m_AttrData.GetAddHpMax(cp.HpMax, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddEpMax(cp.EnergyMax, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddAd(cp.AttackBase, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddADp(cp.ADefenceBase, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddMDp(cp.MDefenceBase, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddCri(cp.Critical, ri.Level), itemconfig.m_AttrData.GetAddPow(cp.CriticalPow, ri.Level), itemconfig.m_AttrData.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level), itemconfig.m_AttrData.GetAddCrackPow(cp.CriticalCrackPow, ri.Level), itemconfig.m_AttrData.GetAddFireDam(cp.FireDamage, ri.Level), itemconfig.m_AttrData.GetAddIceDam(cp.IceDamage, ri.Level), itemconfig.m_AttrData.GetAddPoisonDam(cp.PoisonDamage, 1), itemconfig.m_AttrData.GetAddFireErd(cp.FireERD, ri.Level), itemconfig.m_AttrData.GetAddIceErd(cp.IceERD, ri.Level), itemconfig.m_AttrData.GetAddPoisonErd(cp.PoisonERD, ri.Level))); } else { return(ArkCrossEngine.AttributeScoreConfigProvider.Instance.CalcAttributeScore( itemconfig.m_AttrData.GetAddHpMax(cp.HpMax, ri.Level, itemlevel) + aac.GetAddHpMax(cp.HpMax, ri.Level), itemconfig.m_AttrData.GetAddEpMax(cp.EnergyMax, ri.Level, itemlevel) + aac.GetAddEpMax(cp.EnergyMax, ri.Level), itemconfig.m_AttrData.GetAddAd(cp.AttackBase, ri.Level, itemlevel) + aac.GetAddAd(cp.AttackBase, ri.Level), itemconfig.m_AttrData.GetAddADp(cp.ADefenceBase, ri.Level, itemlevel) + aac.GetAddADp(cp.ADefenceBase, itemlevel), itemconfig.m_AttrData.GetAddMDp(cp.MDefenceBase, ri.Level, itemlevel) + aac.GetAddMDp(cp.MDefenceBase, ri.Level), itemconfig.m_AttrData.GetAddCri(cp.Critical, ri.Level) + aac.GetAddCri(cp.Critical, ri.Level), itemconfig.m_AttrData.GetAddPow(cp.CriticalPow, ri.Level) + aac.GetAddPow(cp.CriticalPow, ri.Level), itemconfig.m_AttrData.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level) + aac.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level), itemconfig.m_AttrData.GetAddCrackPow(cp.CriticalCrackPow, ri.Level) + aac.GetAddCrackPow(cp.CriticalCrackPow, ri.Level), itemconfig.m_AttrData.GetAddFireDam(cp.FireDamage, ri.Level) + aac.GetAddFireDam(cp.FireDamage, ri.Level), itemconfig.m_AttrData.GetAddIceDam(cp.IceDamage, ri.Level) + aac.GetAddIceDam(cp.IceDamage, ri.Level), itemconfig.m_AttrData.GetAddPoisonDam(cp.PoisonDamage, ri.Level) + aac.GetAddPoisonDam(cp.PoisonDamage, ri.Level), itemconfig.m_AttrData.GetAddFireErd(cp.FireERD, ri.Level) + aac.GetAddFireDam(cp.FireERD, ri.Level), itemconfig.m_AttrData.GetAddIceErd(cp.IceERD, ri.Level) + aac.GetAddIceErd(cp.IceERD, ri.Level), itemconfig.m_AttrData.GetAddPoisonErd(cp.PoisonERD, ri.Level) + aac.GetAddPoisonErd(cp.PoisonERD, ri.Level))); } } return(0f); }