Merge branch 'master' into HazyRegion_1
5个文件已删除
1 文件已重命名
29个文件已修改
1个文件已添加
| | |
| | | ObjID = _sTarget.ObjID,
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_cTarget.ServerInstID),
|
| | | ObjType = _sTarget.ObjType,
|
| | | HurtHP = (uint)(_cTarget.ActorInfo.RealHp - (_sTarget.CurHP + _sTarget.CurHPEx * GActorInfo.FullHp)),
|
| | | HurtHP = _sTarget.HurtHP,
|
| | | CurHP = _sTarget.CurHP,
|
| | | AttackType = _sTarget.AttackType
|
| | | };
|
| | |
| | | ObjID = _sTarget.ObjID,
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_cTarget.ServerInstID),
|
| | | ObjType = _sTarget.ObjType,
|
| | | HurtHP = (uint)(_cTarget.ActorInfo.RealHp - (_sTarget.CurHP + _sTarget.CurHPEx * GActorInfo.FullHp)),
|
| | | HurtHP = _sTarget.HurtHP,
|
| | | CurHP = _sTarget.CurHP,
|
| | | AttackType = _sTarget.AttackType
|
| | | };
|
| | |
| | | using UnityEditor; |
| | | #endif |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public class AnimatorControllerLoader |
| | | { |
| | | |
| | | public static readonly string controllerSuffix = "AnimatorController_"; |
| | | public static readonly string controllerUISuffix = "AnimatorController_UI_"; |
| | | public static readonly string controllerShowSuffix = "AnimatorController_Show_"; |
| | |
| | | return _animationClip; |
| | | } |
| | | |
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Fight() |
| | | { |
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, |
| | | GeneralDefine.ModeDefaultConfig[1][1].Replace("Prefab_Race_", "")); |
| | | } |
| | | |
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Func() |
| | | { |
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, |
| | | GeneralDefine.ModeDefaultConfig[0][1].Replace("Prefab_Race_", "")); |
| | | } |
| | | |
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Horse() |
| | | { |
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, |
| | | GeneralDefine.ModeDefaultConfig[3][1].Replace("Prefab_Horse_", "")); |
| | | } |
| | | |
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Pet() |
| | | { |
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, |
| | | GeneralDefine.ModeDefaultConfig[2][1].Replace("Prefab_Race_", "")); |
| | | } |
| | | |
| | | public static RuntimeAnimatorController Load(string suffix, int id) |
| | | { |
| | | RuntimeAnimatorController _controller = null; |
| | | ModelResConfig _modelRes = ModelResConfig.Get(id); |
| | | string _name = _modelRes.ResourcesName; |
| | | if (_name.IndexOf('/') != -1) |
| | |
| | | _name = _name.Substring(0, _modelRes.ResourcesName.IndexOf('/')); |
| | | } |
| | | |
| | | if (AssetSource.mobFromEditor) |
| | | { |
| | | #if UNITY_EDITOR |
| | | |
| | | string _resourcesPath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, |
| | | "mob/", |
| | | _name, |
| | | "/", |
| | | suffix, |
| | | _name, |
| | | ".controller"); |
| | | |
| | | _controller = AssetDatabase.LoadAssetAtPath<RuntimeAnimatorController>(_resourcesPath); |
| | | |
| | | #endif |
| | | } |
| | | else |
| | | { |
| | | string _bundleName = StringUtility.Contact(ResourcesPath.MOB_FOLDER_NAME, |
| | | ResourcesPath.MOB_SUFFIX, |
| | | _name); |
| | | |
| | | string _assetName = StringUtility.Contact(suffix, _name); |
| | | AssetInfo _assetInfo = new AssetInfo(_bundleName, _assetName); |
| | | |
| | | _controller = AssetBundleUtility.Instance.Sync_LoadAsset(_assetInfo) as RuntimeAnimatorController; |
| | | } |
| | | |
| | | if (_controller == null) |
| | | { |
| | | DebugEx.LogErrorFormat("AnimatorControllerLoader.Load() => 加载不到资源: {0}_{1}.", suffix, _name); |
| | | } |
| | | |
| | | return _controller; |
| | | return LoadMobController(suffix, _name); |
| | | } |
| | | |
| | | public static RuntimeAnimatorController LoadMobController(string suffix, string _name) |
| | |
| | | using UnityEditor;
|
| | | #endif
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class InstanceResourcesLoader
|
| | | {
|
| | | public static readonly string raceSuffix = "Prefab_Race_";
|
| | |
| | | }
|
| | |
|
| | | return LoadModelPrefab(raceSuffix, _m.MODE);
|
| | | }
|
| | |
|
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Fight()
|
| | | {
|
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
|
| | | GeneralDefine.ModeDefaultConfig[1][1].Replace("Prefab_Race_", ""));
|
| | | }
|
| | |
|
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Func()
|
| | | {
|
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
|
| | | GeneralDefine.ModeDefaultConfig[0][1].Replace("Prefab_Race_", ""));
|
| | | }
|
| | |
|
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Horse()
|
| | | {
|
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
|
| | | GeneralDefine.ModeDefaultConfig[3][1].Replace("Prefab_Horse_", ""));
|
| | | }
|
| | |
|
| | | public static RuntimeAnimatorController LoadDefaultMobAnimatorController_Pet()
|
| | | {
|
| | | return AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix,
|
| | | GeneralDefine.ModeDefaultConfig[2][1].Replace("Prefab_Race_", ""));
|
| | | }
|
| | |
|
| | | public static GameObject LoadDefaultFightNPC()
|
| | |
| | | if (_skill != null && _skill.skillInfo != null && _skill.skillInfo.config != null)
|
| | | {
|
| | | // 判断是否是被封禁的技能
|
| | | if (!StatusMgr.Instance.CanAttack(_hero.ServerInstID, _skill.skillInfo.config.SkillOfSeries))
|
| | | if (!StatusMgr.Instance.CanAttack(_hero.ServerInstID, _skill.skillInfo.config))
|
| | | {
|
| | | return _skill;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | // 判断是否是被封禁的技能
|
| | | if (!StatusMgr.Instance.CanAttack(_hero.ServerInstID, _skill.skillInfo.config.SkillOfSeries))
|
| | | if (!StatusMgr.Instance.CanAttack(_hero.ServerInstID, _skill.skillInfo.config))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | |
|
| | | Skill _skill = m_Hero.SkillMgr.Get(skillID);
|
| | |
|
| | | if (!StatusMgr.Instance.CanAttack(m_Hero.ServerInstID, _skill.skillInfo.config.SkillOfSeries))
|
| | | if (!StatusMgr.Instance.CanAttack(m_Hero.ServerInstID, _skill.skillInfo.config))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | skillId = m_Hero.GetCommonSkillID(curComAtkIndex);
|
| | | _skill = m_Hero.SkillMgr.Get(skillId);
|
| | |
|
| | | if (!StatusMgr.Instance.CanAttack(m_Hero.ServerInstID, _skill.skillInfo.config.SkillOfSeries))
|
| | | if (!StatusMgr.Instance.CanAttack(m_Hero.ServerInstID, _skill.skillInfo.config))
|
| | | {
|
| | | return -1;
|
| | | }
|
| | |
| | | public static void HandlerAttackTarget(GActorFight attacker,
|
| | | GActorFight target,
|
| | | int hurtValue,
|
| | | int realHurtValue,
|
| | | byte attackType,
|
| | | int skillID,
|
| | | int soConfigID,
|
| | |
| | |
|
| | | if (CheckPull(attacker, target, soConfig.bodyControlId))
|
| | | {
|
| | | target.StartBeatBack(attacker.ServerInstID, soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos), (HurtAttackType)attackType);
|
| | | float _extDis = 0;
|
| | | SkillHelper.EffectValue _effectValue;
|
| | | if (_skill.skillInfo.effectValue.TryGetValue(4015, out _effectValue))
|
| | | {
|
| | | _extDis += _effectValue.value1 * .5f;
|
| | | }
|
| | | target.StartBeatBack(attacker.ServerInstID, soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos), (HurtAttackType)attackType, _extDis);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (_doReduceHp)
|
| | | {
|
| | | target.ActorInfo.ReduceHp((uint)hurtValue);
|
| | | target.ActorInfo.ReduceHp((uint)realHurtValue);
|
| | | }
|
| | |
|
| | | if (target.ServerInstID == PlayerDatas.Instance.baseData.PlayerID)
|
| | |
| | | bool _isZhuxianHit = false;
|
| | |
|
| | | SkillHelper.EffectValue _effectValue;
|
| | | SkillHelper.SkillInfo _skillInfo;
|
| | |
|
| | | float _aAtkSkillPer = 0;
|
| | | int _atkSkillValue = 0;
|
| | |
| | | }
|
| | |
|
| | | #region 4094,4507 增加暴击概率
|
| | | if (skill.skillInfo.effectValue.TryGetValue(4094, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4094, out _effectValue, out _skillInfo))
|
| | | {
|
| | | bool _vaild = true;
|
| | | if (_effectValue.value2 != 0)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (skill.skillInfo.effectValue.TryGetValue(4507, out _effectValue))
|
| | | if (StatusMgr.Instance.TryGetSkillEffectValue(attacker.ServerInstID, 4507, out _effectValue))
|
| | | {
|
| | | bool _vaild = true;
|
| | | if (_effectValue.value2 == 1)
|
| | |
| | | }
|
| | | if (_vaild)
|
| | | {
|
| | | if (_vaild)
|
| | | {
|
| | | _aSuperHitRate += _effectValue.value1;
|
| | | }
|
| | | _aSuperHitRate += _effectValue.value1;
|
| | | }
|
| | | }
|
| | |
|
| | | if (StatusMgr.Instance.TryGetSkillEffectValue(attacker.ServerInstID, 4526, out _effectValue))
|
| | | {
|
| | | bool _vaild = true;
|
| | | if (_effectValue.value2 == 1)
|
| | | {
|
| | | if (attacker.SelectTarget == null
|
| | | || attacker.SelectTarget.ServerInstID != target.ServerInstID)
|
| | | {
|
| | | _vaild = false;
|
| | | }
|
| | | }
|
| | | if (_effectValue.value3 == 1)
|
| | | {
|
| | | if (skill.skillInfo.config.FuncType != (int)E_SkillFuncType.NormalAttack
|
| | | && skill.skillInfo.config.FuncType != (int)E_SkillFuncType.FaBaoActiveSkill)
|
| | | {
|
| | | _vaild = false;
|
| | | }
|
| | | }
|
| | | if (_vaild)
|
| | | {
|
| | | _aZhuXianHitRate += _effectValue.value1;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | _isMiss = IsMiss(_hitRate, _missRate);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4083, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4075, out _effectValue, out _skillInfo))
|
| | | {
|
| | | float _val = (PlayerDatas.Instance.extersion.battleValEx1 - 10000) * _effectValue.value1;
|
| | | _superHitAdd += _val;
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4083, out _effectValue, out _skillInfo))
|
| | | {
|
| | | bool _vaild = true;
|
| | | if (_effectValue.value2 == 1)
|
| | |
| | | || skill.skillInfo.config.HurtType == 0)
|
| | | {
|
| | | // 处理本身的技能
|
| | | CalculateSkillEffect(attacker, target, skill.skillInfo, ref _aDamagePer, ref _aAtkSkillPer, ref _atkSkillValue, ref _aIceAtk, ref _aFinalHurt, ref _superHitAdd, _isCrit);
|
| | | CalculateSkillEffect(attacker, target, skill.skillInfo, ref _aDamagePer, ref _aAtkSkillPer, ref _atkSkillValue, ref _aIceAtk, ref _aFinalHurt, ref _superHitAdd, ref _aDamagePVE, _isCrit);
|
| | |
|
| | | // 处理sp技能
|
| | | List<SkillHelper.SkillInfo> _spSkillList = SkillHelper.Instance.GetSpSkill(skill.id);
|
| | |
| | | {
|
| | | for (int i = 0; i < _spSkillList.Count; ++i)
|
| | | {
|
| | | CalculateSkillEffect(attacker, target, _spSkillList[i], ref _aDamagePer, ref _aAtkSkillPer, ref _atkSkillValue, ref _aIceAtk, ref _aFinalHurt, ref _superHitAdd, _isCrit);
|
| | | CalculateSkillEffect(attacker, target, _spSkillList[i], ref _aDamagePer, ref _aAtkSkillPer, ref _atkSkillValue, ref _aIceAtk, ref _aFinalHurt, ref _superHitAdd, ref _aDamagePVE, _isCrit);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | SkillHelper.EffectValue _effectValue;
|
| | | if (_hero.SkillMgr.TryGetPassiveEffectValue(4081, out _effectValue))
|
| | | SkillHelper.SkillInfo _skillInfo;
|
| | | if (_hero.SkillMgr.TryGetPassiveEffectValue(4081, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (_effectValue.value2 == 1)
|
| | | {
|
| | |
| | | return actor.ActorInfo.RealHp * 1f / actor.ActorInfo.RealMaxHp;
|
| | | }
|
| | |
|
| | | private static void CalculateSkillEffect(GActorFight attacker, GActorFight target, SkillHelper.SkillInfo skillInfo,
|
| | | private static void CalculateSkillEffect(GActorFight attacker,
|
| | | GActorFight target,
|
| | | SkillHelper.SkillInfo skillInfo,
|
| | | ref int _aDamagePer,
|
| | | ref float _aAtkSkillPer,
|
| | | ref int _atkSkillValue,
|
| | | ref int _aIceAtk,
|
| | | ref int _aFinalHurt,
|
| | | ref float _aSuperHitAdd,
|
| | | ref int _aDamagePVE,
|
| | | bool _isCrit)
|
| | | {
|
| | | SkillHelper.EffectValue _effectValue;
|
| | | SkillHelper.SkillInfo _skillInfo;
|
| | | #region 伤害增加
|
| | |
|
| | | if (skillInfo.effectValue.TryGetValue(1062, out _effectValue))
|
| | |
| | |
|
| | | if (attacker is GA_Hero)
|
| | | {
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4086, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4102, out _effectValue, out _skillInfo))
|
| | | {
|
| | | int _val = _effectValue.value1;
|
| | | int _needCount = _effectValue.value2;
|
| | | bool _valid = true;
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4092, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (_effectValue.value2 == 0)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.yinjiCount != _needCount)
|
| | | {
|
| | | _valid = false;
|
| | | }
|
| | | }
|
| | | else if (_effectValue.value2 == 1)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.yinjiCount == 0
|
| | | || PlayerDatas.Instance.baseData.yinjiCount < _effectValue.value1)
|
| | | {
|
| | | _valid = false;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (_valid)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.yinjiCount > _needCount)
|
| | | {
|
| | | _aDamagePVE += _val;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4086, out _effectValue, out _skillInfo))
|
| | | {
|
| | | bool _vaild = true;
|
| | | if (_effectValue.value3 == 1)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4087, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4087, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.yinjiCount > _effectValue.value2)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4088, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4088, out _effectValue, out _skillInfo))
|
| | | {
|
| | | int _per = _effectValue.value1;
|
| | | int _needCount = _effectValue.value2;
|
| | | bool _valid = true;
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4092, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4092, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (_effectValue.value2 == 0)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4015, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4015, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (target.ActorInfo.status4012.ContainsKey((byte)_effectValue.value2))
|
| | | {
|
| | |
| | | if (StatusMgr.Instance.IsBurning(target.ServerInstID, _selfSID))
|
| | | {
|
| | | _aAtkSkillPer += _effectValue.value1;
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4538, out _effectValue, out _skillInfo))
|
| | | {
|
| | | _aDamagePVE += _effectValue.value1;
|
| | | }
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4002, out _effectValue, out _skillInfo))
|
| | | {
|
| | | _aDamagePVE += _effectValue.value1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4098, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4098, out _effectValue, out _skillInfo))
|
| | | {
|
| | | var _skillInfo = SkillHelper.Instance.Get(_effectValue.value2);
|
| | | if (_skillInfo != null)
|
| | | var _skillInfo1 = SkillHelper.Instance.Get(_effectValue.value2);
|
| | | if (_skillInfo1 != null)
|
| | | {
|
| | | SkillHelper.EffectValue _tmpEffectValue;
|
| | | if (_skillInfo.effectValue.TryGetValue(4012, out _tmpEffectValue))
|
| | | if (_skillInfo1.effectValue.TryGetValue(4012, out _tmpEffectValue))
|
| | | {
|
| | | if (target.ActorInfo.status4012.ContainsKey((byte)_tmpEffectValue.value1))
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4096, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4096, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (StatusMgr.Instance.IsExist(target.ServerInstID, _effectValue.value3))
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | // 4005 概率增加攻击(技能)伤害万分率
|
| | | if (skillInfo.effectValue.TryGetValue(4005, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4005, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (Random.Range(0, 10000) < _effectValue.value2)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | // 4035 增加技能伤害万分率
|
| | | if (skillInfo.effectValue.TryGetValue(4035, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4035, out _effectValue, out _skillInfo))
|
| | | {
|
| | | bool _isValid = true;
|
| | | var _mapConfig = MapConfig.Get(PlayerDatas.Instance.baseData.MapID);
|
| | |
| | | }
|
| | |
|
| | | // 4011 暴击时增加技能伤害
|
| | | if (skillInfo.effectValue.TryGetValue(4011, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4011, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (_isCrit)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | // 4015 目标处于XX状态提高技能伤害
|
| | | if (skillInfo.effectValue.TryGetValue(4015, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4015, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (target.ActorInfo.GetStatusCount((byte)_effectValue.value2, attacker.ServerInstID) > 0)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | // 4025 攻击附加真实伤害
|
| | | if (skillInfo.effectValue.TryGetValue(4025, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4025, out _effectValue, out _skillInfo))
|
| | | {
|
| | | _aIceAtk += _effectValue.value1;
|
| | |
|
| | |
| | | #region 暴击伤害增加
|
| | |
|
| | | // 4007 暴击时增加暴击值, 增加暴击值万分率, 虚要判断自己身上是否有配置的buff
|
| | | if (skillInfo.effectValue.TryGetValue(4007, out _effectValue))
|
| | | if (attacker.SkillMgr.TryGetPassiveEffectValue(4007, out _effectValue, out _skillInfo))
|
| | | {
|
| | | bool _condition = true;
|
| | |
|
| | |
| | | if (_chkDistSqrt < _chkRange * _chkRange) |
| | | { |
| | | int _hurtValue = (int)(m_Config.floodPercent * Constants.F_DELTA * m_HurtClientList[i].HurtHP); |
| | | |
| | | AttackHandler.HandlerAttackTarget(m_Owner, _target, _hurtValue, m_HurtClientList[i].AttackType, m_InitInfo.skillId, m_InitInfo.configId, m_Config, _target.ActorInfo.serverDie); |
| | | int _realHurtValue = (int)((_target.ActorInfo.RealHp - m_HurtClientList[i].CurHP) * (m_Config.floodPercent * Constants.F_DELTA)); |
| | | AttackHandler.HandlerAttackTarget(m_Owner, _target, _hurtValue, _realHurtValue, m_HurtClientList[i].AttackType, m_InitInfo.skillId, m_InitInfo.configId, m_Config, _target.ActorInfo.serverDie); |
| | | |
| | | m_HasHitTargetIDList.Add(m_HurtClientList[i].clientInstID); |
| | | m_IdToLastHitTime[_target.ClientInstID] = Time.time; |
| | |
| | | if (_chkDistSqrt < _chkRange * _chkRange) |
| | | { |
| | | int _hurtValue = (int)(m_Config.floodPercent * Constants.F_DELTA * m_HurtServerList[i].HurtHP); |
| | | int _realHurtValue = (int)((_target.ActorInfo.RealHp - m_HurtClientList[i].CurHP) * (m_Config.floodPercent * Constants.F_DELTA)); |
| | | |
| | | AttackHandler.HandlerAttackTarget(m_Owner, _target, _hurtValue, m_HurtServerList[i].AttackType, m_InitInfo.skillId, m_InitInfo.configId, m_Config, _target.ActorInfo.serverDie); |
| | | AttackHandler.HandlerAttackTarget(m_Owner, _target, _hurtValue, _realHurtValue, m_HurtServerList[i].AttackType, m_InitInfo.skillId, m_InitInfo.configId, m_Config, _target.ActorInfo.serverDie); |
| | | |
| | | m_HasHitTargetIDList.Add(m_HurtServerList[i].clientInstID); |
| | | m_IdToLastHitTime[_target.ClientInstID] = Time.time; |
| | |
| | | m_PassiveSkill = new List<int>();
|
| | | }
|
| | |
|
| | | public bool TryGetPassiveEffectValue(int id, out SkillHelper.EffectValue effectValue)
|
| | | public bool TryGetPassiveEffectValue(int id, out SkillHelper.EffectValue effectValue,
|
| | | out SkillHelper.SkillInfo skill)
|
| | | {
|
| | | SkillHelper.SkillInfo _skill;
|
| | | foreach (var _id in m_PassiveSkill)
|
| | |
| | | _skill = SkillHelper.Instance.Get(_id);
|
| | | if (_skill.effectValue.TryGetValue(id, out effectValue))
|
| | | {
|
| | | skill = _skill;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | effectValue = default(SkillHelper.EffectValue);
|
| | | skill = null;
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | GActorFight _target = null;
|
| | | int _hurtTotalValue = 0;
|
| | | int _realHurtValue = 0;
|
| | |
|
| | | m_NpcPosList.Clear();
|
| | |
|
| | |
| | | }
|
| | |
|
| | | _hurtTotalValue = (int)(m_CacheSkill.hurtServerList[i].HurtHP * _floodPercent);
|
| | |
|
| | | _realHurtValue = (int)((_target.ActorInfo.RealHp - m_CacheSkill.hurtServerList[i].CurHP) * _floodPercent);
|
| | | AttackHandler.HandlerAttackTarget(_fight,
|
| | | _target,
|
| | | _hurtTotalValue,
|
| | | _realHurtValue,
|
| | | m_CacheSkill.hurtServerList[i].AttackType,
|
| | | m_CacheSkill.id,
|
| | | id,
|
| | |
| | | }
|
| | |
|
| | | _hurtTotalValue = Mathf.CeilToInt(m_CacheSkill.hurtClientList[i].HurtHP * _floodPercent);
|
| | | _realHurtValue = (int)((_target.ActorInfo.RealHp - m_CacheSkill.hurtClientList[i].CurHP) * _floodPercent);
|
| | |
|
| | | AttackHandler.HandlerAttackTarget(_fight,
|
| | | _target,
|
| | | _hurtTotalValue,
|
| | | _realHurtValue,
|
| | | m_CacheSkill.hurtClientList[i].AttackType,
|
| | | m_CacheSkill.id,
|
| | | id,
|
| | |
| | | }
|
| | |
|
| | | _hurtTotalValue = (int)(m_CacheSkill.hurtClntFightNpcList[i].HurtHP * _floodPercent);
|
| | | _realHurtValue = (int)((_target.ActorInfo.RealHp - m_CacheSkill.hurtClntFightNpcList[i].CurHP) * _floodPercent);
|
| | |
|
| | | AttackHandler.HandlerAttackTarget(_fight, _target, _hurtTotalValue,
|
| | | AttackHandler.HandlerAttackTarget(_fight, _target, _hurtTotalValue, _realHurtValue,
|
| | | m_CacheSkill.hurtClntFightNpcList[i].AttackType,
|
| | | m_CacheSkill.id, id, _sweepHit,
|
| | | _target.ActorInfo.serverDie && m_IsLastHitFrame);
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public bool CanAttack(uint sid, int skillSeries)
|
| | | public bool CanAttack(uint sid, SkillConfig _config)
|
| | | {
|
| | | var _actorFight = GAMgr.Instance.GetBySID(sid) as GActorFight;
|
| | | SkillHelper.EffectValue _effectValue;
|
| | | SkillHelper.SkillInfo _skillInfo;
|
| | |
|
| | | if (_actorFight.SkillMgr.TryGetPassiveEffectValue(4093, out _effectValue, out _skillInfo))
|
| | | {
|
| | | if (_skillInfo.config.ExAttr1 == _config.SkillID)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | | List<Status_Base> _list = null;
|
| | | if (m_StatusDict.TryGetValue(sid, out _list))
|
| | | {
|
| | | for (int i = 0; i < _list.Count; ++i)
|
| | | {
|
| | | if (!_list[i].CanAttack(skillSeries))
|
| | | if (!_list[i].CanAttack(_config.SkillOfSeries))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | RuntimeAnimatorController _controller = null; |
| | | if (m_LoadDefaultRes) |
| | | { |
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func(); |
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Func(); |
| | | } |
| | | else |
| | | { |
| | |
| | | private float m_LimitDistance;
|
| | | private float m_AddPer;
|
| | |
|
| | | public void StartBeatBack(uint attacker, int configID, Vector3 direction, HurtAttackType atkType = HurtAttackType.Normal)
|
| | | public void StartBeatBack(uint attacker, int configID, Vector3 direction, HurtAttackType atkType = HurtAttackType.Normal, float ExtDis = 0f)
|
| | | {
|
| | | SoBodyControl _config = ScriptableObjectLoader.LoadSoBodyControl(configID);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | m_AttackerSID = attacker;
|
| | | m_LimitDistance = _config.limitDistance;
|
| | | m_LimitDistance = _config.limitDistance + ExtDis;
|
| | | m_PushOrPull = _config.pushOrPull;
|
| | |
|
| | | if (!m_PushOrPull)
|
| | |
| | | {
|
| | | if (this is GA_Pet)
|
| | | {
|
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Pet();
|
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Pet();
|
| | | }
|
| | | else
|
| | | {
|
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
|
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Fight();
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | RuntimeAnimatorController _controller = null;
|
| | | if (m_SheepIsDefaultNpc)
|
| | | {
|
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Fight();
|
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Fight();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | RuntimeAnimatorController _controller = null;
|
| | | if (m_LoadDefaultRes)
|
| | | {
|
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Func();
|
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Func();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | RuntimeAnimatorController _controller = null;
|
| | | if (m_LoadDefaultHorse)
|
| | | {
|
| | | _controller = InstanceResourcesLoader.LoadDefaultMobAnimatorController_Horse();
|
| | | _controller = AnimatorControllerLoader.LoadDefaultMobAnimatorController_Horse();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private void HandleAutoFight()
|
| | | {
|
| | | DungeonModel _dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(StatusMgr); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 23, 5, 5); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 24, 5, 5); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Request", _m_Request); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsInvincible", _m_IsInvincible); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsInvisible", _m_IsInvisible); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetSkillEffectValue", _m_TryGetSkillEffectValue); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBurning", _m_IsBurning); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ZhongJiDict", _g_get_ZhongJiDict); |
| | |
| | | |
| | | { |
| | | uint _sid = LuaAPI.xlua_touint(L, 2); |
| | | int _skillSeries = LuaAPI.xlua_tointeger(L, 3); |
| | | SkillConfig __config = (SkillConfig)translator.GetObject(L, 3, typeof(SkillConfig)); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.CanAttack( _sid, _skillSeries ); |
| | | bool gen_ret = gen_to_be_invoked.CanAttack( _sid, __config ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsBurning(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | StatusMgr gen_to_be_invoked = (StatusMgr)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 3&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) |
| | | { |
| | | uint _targetSID = LuaAPI.xlua_touint(L, 2); |
| | | uint _attackSID = LuaAPI.xlua_touint(L, 3); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsBurning( _targetSID, _attackSID ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | if(gen_param_count == 2&& LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) |
| | | { |
| | | uint _targetSID = LuaAPI.xlua_touint(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsBurning( _targetSID ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to StatusMgr.IsBurning!"); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 453eacef8d1aca54d94a552482bebc20 |
| | | timeCreated: 1557818434 |
| | | timeCreated: 1558494859 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | translator.DelayWrapLoader(typeof(TreasurePrivilegeConfig), TreasurePrivilegeConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(TreasureRefineConfig), TreasureRefineConfigWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(TreasureSkillConfig), TreasureSkillConfigWrap.__Register); |
| | | |
| | |
| | | [SerializeField] Transform m_ContainerTreasure;
|
| | | [SerializeField] Image m_Icon;
|
| | | [SerializeField] ScreenMoveTo m_ScreenMoveTo;
|
| | | [SerializeField] Button m_ViewSkill;
|
| | |
|
| | | [SerializeField] Transform m_ContainerDemonDungeon;
|
| | | [SerializeField] PropertyBehaviour[] m_DemonPropertys;
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_ViewSkill.AddListener(ViewSkill);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | m_Icon.SetSprite(config.Icon);
|
| | | }
|
| | |
|
| | | private void ViewSkill()
|
| | | {
|
| | | HumanTreasureSkillDetailWin.treasureId = treasureId;
|
| | | WindowCenter.Instance.Open<HumanTreasureSkillDetailWin>();
|
| | | }
|
| | |
|
| | | void DisplayDemonTreasureDungeon()
|
| | | {
|
| | | TreasureDungeon treasureDungeon;
|
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Text.RegularExpressions;
|
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | |
|
| | | public bool reikiPointPromoteSymbol { get; set; }
|
| | |
|
| | | public int reikiPointAutoAddLevel { get; private set; }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(101, 10103); |
| | |
|
| | | public event Action onCacheFreePointRefresh;
|
| | |
| | | reikiRootGetWays = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical4);
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("LVUPAddPoint");
|
| | |
|
| | | var match = Regex.Match(funcConfig.Numerical1, @"\(([0-9]+)\,[0-9]+\)");
|
| | | if (match != null)
|
| | | {
|
| | | reikiPointAutoAddLevel = int.Parse(match.Groups[1].Value);
|
| | | }
|
| | |
|
| | | freeResetLevel = int.Parse(funcConfig.Numerical4);
|
| | | resetCostItemId = int.Parse(funcConfig.Numerical5);
|
| | |
|
| | |
| | | }
|
| | |
|
| | | _price = (ulong)(model.MoneyNumber * count);
|
| | | |
| | | if (MoneyIsEnough(model.MoneyType, _price))
|
| | | {
|
| | | |
| | | C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
|
| | | buyShop.NPCID = 0;
|
| | | buyShop.BuyItemIndex = (ushort)model.ID;
|
| | | buyShop.BuyCount = (ushort)count;
|
| | | GameNetSystem.Instance.SendInfo(buyShop);
|
| | |
|
| | | GameNetSystem.Instance.SendInfo(buyShop); |
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | DebugEx.Log("GetBuyResult");
|
| | | StoreConfig tagStore = StoreConfig.Get((int)result.ItemIndex);
|
| | | |
| | | if (tagStore != null)
|
| | | {
|
| | | ItemConfig chinModel = ItemConfig.Get(GetReplaceId(tagStore.ID, tagStore.ItemID));
|
| | |
| | |
|
| | | public enum StoreFunc
|
| | | {
|
| | | WeekStore = 1, //1:每周限购
|
| | | DayStore = 1, //1:每天限购
|
| | | CommonStore = 2, //2:常用道具
|
| | | GrowStrongerStore = 3, //3:成长变强
|
| | | BindStore = 4, //4:绑玉商城
|
| | |
| | | {
|
| | | public class StoreWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButton m_DayStoreTitle;
|
| | | [SerializeField] FunctionButton m_WeekStoreTitle;
|
| | | [SerializeField] FunctionButton m_CommonStoreTitle;
|
| | | [SerializeField] FunctionButton m_GrowStrongerStoreTitle;
|
| | | [SerializeField] FunctionButton m_BindStoreTitle;
|
| | | //[SerializeField] FunctionButton m_BindStoreTitle;
|
| | | [SerializeField] FunctionButton m_IntegralStoreTitle;
|
| | | [SerializeField] FunctionButtonGroup m_FuncBtnGroup;
|
| | | [SerializeField] Button m_LeftBtn;
|
| | |
| | | m_ShopCtrl.OnRefreshCell += RefreshShopCell;
|
| | | m_ShopCtrl.lockType = EnhanceLockType.KeepVertical;
|
| | |
|
| | | m_DayStoreTitle.SetListener(OpenDayStore);
|
| | | m_WeekStoreTitle.SetListener(OpenMysteryStore);
|
| | | m_CommonStoreTitle.SetListener(OpenCommonStore);
|
| | | m_GrowStrongerStoreTitle.SetListener(OpenStrengthStore);
|
| | | m_BindStoreTitle.SetListener(OpenBindGoldStore);
|
| | | //m_BindStoreTitle.SetListener(OpenBindGoldStore);
|
| | | m_IntegralStoreTitle.SetListener(OpenIntegralStore);
|
| | | m_AssistBtn.SetListener(ViewAssistRecorders);
|
| | | m_RefreshCommodities.SetListener(RefreshCommondities);
|
| | |
| | | {
|
| | | if (model.storeFunc1Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = m_WeekStoreTitle.order;
|
| | | functionOrder = m_DayStoreTitle.order;
|
| | | }
|
| | | else if (model.storeFunc2Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = m_CommonStoreTitle.order;
|
| | | functionOrder = m_WeekStoreTitle.order;
|
| | | }
|
| | | else if (model.storeFunc3Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = m_GrowStrongerStoreTitle.order;
|
| | | functionOrder = m_CommonStoreTitle.order;
|
| | | }
|
| | | else if (model.storeFunc4Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = m_BindStoreTitle.order;
|
| | | functionOrder = m_GrowStrongerStoreTitle.order;
|
| | | }
|
| | | else if (model.storeFunc5Point.state == RedPointState.Simple)
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.CloseAllRedpoint(StoreFunc.MysteryStore);
|
| | | model.storeFuncType = StoreFunc.MysteryStore;
|
| | | model.CloseAllRedpoint(StoreFunc.DayStore);
|
| | | model.storeFuncType = StoreFunc.DayStore;
|
| | | model.RefreshBuyShopLimitEvent -= OnCreate;
|
| | | model.mysteryShopRefreshEvent -= OnCreate;
|
| | | GlobalTimeEvent.Instance.secondEvent -= UpdateRefreshTime;
|
| | |
| | | functionOrder = m_IntegralStoreTitle.order;
|
| | | }
|
| | |
|
| | | private void OpenBindGoldStore()
|
| | | {
|
| | | model.CloseAllRedpoint(StoreFunc.BindStore);
|
| | | model.storeFuncType = StoreFunc.BindStore;
|
| | | OnCreate();
|
| | | UpdateRefreshTime();
|
| | | functionOrder = m_BindStoreTitle.order;
|
| | | }
|
| | | //private void OpenBindGoldStore()
|
| | | //{
|
| | | // model.CloseAllRedpoint(StoreFunc.BindStore);
|
| | | // model.storeFuncType = StoreFunc.BindStore;
|
| | | // OnCreate();
|
| | | // UpdateRefreshTime();
|
| | | // functionOrder = m_BindStoreTitle.order;
|
| | | //}
|
| | |
|
| | | private void OpenStrengthStore()
|
| | | {
|
| | |
| | | functionOrder = m_WeekStoreTitle.order;
|
| | | }
|
| | |
|
| | | private void OpenDayStore()
|
| | | {
|
| | | model.CloseAllRedpoint(StoreFunc.DayStore);
|
| | | model.storeFuncType = StoreFunc.DayStore;
|
| | | OnCreate();
|
| | | UpdateRefreshTime();
|
| | | functionOrder = m_DayStoreTitle.order;
|
| | | }
|
| | |
|
| | | private void ViewAssistRecorders()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DungeonAssitCheckIn);
|
| | |
| | | [SerializeField] Text m_AddedEffect;
|
| | | [SerializeField] Button m_UnlockTreasureBtn;
|
| | | [SerializeField] PositionTween m_SkillTween;
|
| | | [SerializeField] PositionTween m_RightTween;
|
| | | [SerializeField] Text m_ReikiEffect;
|
| | | [SerializeField] Text m_PlayerLevel;
|
| | | [SerializeField] Text m_ReikiPoint;
|
| | |
|
| | | TreasureFindHostModel findHostModel
|
| | | {
|
| | |
| | | {
|
| | | return ModelCenter.Instance.GetModel<TreasureFindHostModel>();
|
| | | }
|
| | | }
|
| | |
|
| | | ReikiRootModel reikiRootModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); }
|
| | | }
|
| | |
|
| | | private bool show = false;
|
| | |
| | | m_UnlockTreasureBtn.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_SkillTween.gameObject.SetActive(treasureId != 305);
|
| | | m_RightTween.gameObject.SetActive(treasureId == 305);
|
| | |
|
| | | switch (treasureId)
|
| | | {
|
| | | case 302:
|
| | |
| | | case 305:
|
| | | m_GotoBtnText.text = Language.Get("FairyTreasureGot");
|
| | | m_ContainerLocked.gameObject.SetActive(false);
|
| | | m_AddedEffect.text = Language.Get("FairyTreasure_12", model.treasureAddReikiPoint.y);
|
| | | m_ReikiEffect.text = Language.Get("FairyTreasure_12", model.treasureAddReikiPoint.y);
|
| | | m_PlayerLevel.text = Language.Get("FairyTreasure_13", PlayerDatas.Instance.baseData.LV);
|
| | |
|
| | | var reikiPoint = 0;
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.LV > reikiRootModel.reikiPointAutoAddLevel)
|
| | | {
|
| | | reikiPoint = (PlayerDatas.Instance.baseData.LV - reikiRootModel.reikiPointAutoAddLevel + 1) * model.treasureAddReikiPoint.y;
|
| | | }
|
| | |
|
| | | if (treasure.state != TreasureState.Collected)
|
| | | {
|
| | | m_ReikiPoint.text = Language.Get("FairyTreasure_14", reikiPoint);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ReikiPoint.text = Language.Get("FairyTreasure_15", reikiPoint);
|
| | | }
|
| | |
|
| | | break;
|
| | | case 306:
|
| | | case 307:
|
| | |
| | | m_SkillTween.SetEndState();
|
| | | }
|
| | |
|
| | | if (_tween && m_RightTween.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_RightTween.Play();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RightTween.SetEndState();
|
| | | }
|
| | |
|
| | | var _fightPower = model.GetTreasureFightPower(_treasureId);
|
| | | m_FightPower.text = _fightPower.ToString();
|
| | | m_ContainerFight.gameObject.SetActive(_fightPower > 0 && treasure.state == TreasureState.Collected);
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, May 22, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class HumanTreasureSkillDetailWin : Window
|
| | | {
|
| | | [SerializeField] RectTransform m_Container;
|
| | | [SerializeField] Image m_SkillDetailIcon;
|
| | | [SerializeField] Text m_SkillDetailName;
|
| | | [SerializeField] Text m_SkillCoolDown;
|
| | | [SerializeField] Button m_Preview;
|
| | | [SerializeField] Text m_SkillDescription;
|
| | |
|
| | | public static int treasureId = 0;
|
| | |
|
| | | public static event Action<bool> onPreviewTreasureSkill;
|
| | |
|
| | | TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Preview.SetListener(Preview);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | |
|
| | | if (WindowCenter.Instance.IsOpen<TreasureBaseWin>())
|
| | | {
|
| | | m_Container.anchoredPosition = new Vector3(530, -500, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Container.anchoredPosition = new Vector3(536, -300, 0);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(treasureId, out treasure))
|
| | | {
|
| | | var skillId = treasure.skillId;
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | m_SkillDetailIcon.SetSprite(skillConfig.IconName);
|
| | | m_SkillDetailName.text = skillConfig.SkillName;
|
| | | m_SkillDescription.text = skillConfig.Description;
|
| | | m_SkillCoolDown.text = skillConfig.CoolDownTime == 0 ? string.Empty :
|
| | | Language.Get("L1065", skillConfig.CoolDownTime / 1000);
|
| | | }
|
| | | }
|
| | |
|
| | | private void Preview()
|
| | | {
|
| | | if (onPreviewTreasureSkill != null)
|
| | | {
|
| | | onPreviewTreasureSkill(true);
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = false;
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(false);
|
| | |
|
| | | UI3DHeroSkillShow.Instance.ShowTreasureSkill(treasureId, () =>
|
| | | {
|
| | | if (onPreviewTreasureSkill != null)
|
| | | {
|
| | | onPreviewTreasureSkill(false);
|
| | | }
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = true;
|
| | | if (!UI3DTreasureSelectStage.Instance.IsOpen)
|
| | | {
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(true);
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| File was renamed from Core/GameEngine/Model/TelPartialConfig/tagTreasureRefineConfig.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9a2b30aee1c13c24486fcbb5398f1051 |
| | | timeCreated: 1510025892 |
| | | guid: 23bd9c8f96920b9448f0993f5603e871 |
| | | timeCreated: 1558510794 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | [SerializeField] UIEffect m_EffectInduction;
|
| | | [SerializeField] UIEffect m_EffectInduction1;
|
| | |
|
| | | [SerializeField] Transform m_ContainerSkillDetial;
|
| | | [SerializeField] Image m_SkillDetailIcon;
|
| | | [SerializeField] Text m_SkillDetailName;
|
| | | [SerializeField] Text m_SkillCoolDown;
|
| | | [SerializeField] Button m_Preview;
|
| | | [SerializeField] Text m_SkillDescription;
|
| | | |
| | |
|
| | | [SerializeField] ScrollerController m_TaskController;
|
| | |
|
| | | bool animationStep = false;
|
| | |
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Challenge.AddListener(Challenge);
|
| | | m_Preview.SetListener(Preview);
|
| | | m_ViewDetail.AddListener(ViewDetail);
|
| | |
|
| | | m_TaskController.OnRefreshCell += OnRefreshCell;
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_ContainerSkillDetial.gameObject.SetActive(false);
|
| | |
|
| | | animationStep = false;
|
| | |
|
| | | TreasureBaseWin.allowSelectTreasure += AllowSelectTreasure;
|
| | | model.treasureSelectedEvent += TreasureSelectedEvent;
|
| | | model.onInductionTaskComplete += OnInductionTaskComplete;
|
| | | HumanTreasureSkillDetailWin.onPreviewTreasureSkill += OnPreviewTreasureSkill;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | | TreasureBaseWin.allowSelectTreasure -= AllowSelectTreasure;
|
| | | model.treasureSelectedEvent -= TreasureSelectedEvent;
|
| | | model.onInductionTaskComplete -= OnInductionTaskComplete;
|
| | | HumanTreasureSkillDetailWin.onPreviewTreasureSkill -= OnPreviewTreasureSkill;
|
| | |
|
| | | StopAllCoroutines();
|
| | | }
|
| | |
| | | m_Container.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | void DisplaySkillDetail()
|
| | | {
|
| | | if (!m_ContainerSkillDetial.gameObject.activeSelf)
|
| | | {
|
| | | m_ContainerSkillDetial.gameObject.SetActive(true);
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(model.selectedTreasure, out treasure))
|
| | | {
|
| | | var skillId = treasure.skillId;
|
| | | var skillConfig = SkillConfig.Get(skillId);
|
| | | m_SkillDetailIcon.SetSprite(skillConfig.IconName);
|
| | | m_SkillDetailName.text = skillConfig.SkillName;
|
| | | m_SkillDescription.text = skillConfig.Description;
|
| | | m_SkillCoolDown.text = skillConfig.CoolDownTime == 0 ? string.Empty :
|
| | | Language.Get("L1065", skillConfig.CoolDownTime / 1000);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnTweenComplete()
|
| | | {
|
| | | animationStep = false;
|
| | |
| | | m_PositionTween1.SetEndState();
|
| | | m_PositionTween2.SetEndState();
|
| | | m_Container.gameObject.SetActive(true);
|
| | | m_ContainerSkillDetial.gameObject.SetActive(false);
|
| | | UI3DTreasureSelectStage.Instance.SetEndState();
|
| | | Display();
|
| | | }
|
| | |
|
| | | private void OnPreviewTreasureSkill(bool state)
|
| | | {
|
| | | m_ContainerDisplay.gameObject.SetActive(!state);
|
| | |
|
| | | if (state)
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.CloseRenderCamera();
|
| | | }
|
| | | else
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.OpenRenderCamera();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnInductionTaskComplete(int id)
|
| | |
| | |
|
| | | private void ViewDetail()
|
| | | {
|
| | | DisplaySkillDetail();
|
| | | HumanTreasureSkillDetailWin.treasureId = model.selectedTreasure;
|
| | | WindowCenter.Instance.Open<HumanTreasureSkillDetailWin>();
|
| | | }
|
| | |
|
| | | private bool AllowSelectTreasure(int treasureId)
|
| | |
| | | }
|
| | | taskCell.Display(cell.index, animation, displayTime);
|
| | | }
|
| | | }
|
| | |
|
| | | private void Preview()
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.CloseRenderCamera();
|
| | | m_ContainerDisplay.gameObject.SetActive(false);
|
| | | var baseWin = WindowCenter.Instance.Get<TreasureBaseWin>();
|
| | | if (baseWin != null)
|
| | | {
|
| | | baseWin.DisplayContainer(false);
|
| | | }
|
| | | UI3DHeroSkillShow.Instance.ShowTreasureSkill(model.selectedTreasure, () =>
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.OpenRenderCamera();
|
| | | m_ContainerDisplay.gameObject.SetActive(true);
|
| | | baseWin.DisplayContainer(true);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | model.selectedTreasure = UI3DTreasureSelectStage.Instance.selectTreasure;
|
| | | }
|
| | | }
|
| | |
|
| | | HumanTreasureSkillDetailWin.onPreviewTreasureSkill += OnPreviewTreasureSkill;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | UI3DTreasureSelectStage.Instance.OnCameraBackComplete -= OnCameraBackComplete;
|
| | | m_DragSelect.onDragComplete -= OnDragComplete;
|
| | | model.treasureSelectedEvent -= TreasureSelectedEvent;
|
| | | HumanTreasureSkillDetailWin.onPreviewTreasureSkill -= OnPreviewTreasureSkill;
|
| | |
|
| | | if (!backToSelectWindow)
|
| | | {
|
| | |
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void OnPreviewTreasureSkill(bool state)
|
| | | {
|
| | | DisplayContainer(!state);
|
| | | }
|
| | |
|
| | | private void TreasureSelectedEvent(int treasureId)
|
| | | {
|
| | |
| | | if (NewBieCenter.Instance.inGuiding
|
| | | || WindowCenter.Instance.IsOpen<TreasureSoulActiveWin>()
|
| | | || WindowCenter.Instance.IsOpen<DemonTreasurePropertyWin>()
|
| | | || WindowCenter.Instance.IsOpen<ItemTipWin>())
|
| | | || WindowCenter.Instance.IsOpen<ItemTipWin>()
|
| | | || WindowCenter.Instance.IsOpen<HumanTreasureSkillDetailWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | |
| | | public void NotifyToggleOn(FunctionButton button) |
| | | { |
| | | |
| | | if (button.state == TitleBtnState.Click) |
| | | { |
| | | currentOrder = button.order; |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | if(!functionButtons.ContainsKey(orders[i]))
|
| | | {
|
| | | Debug.LogFormat("<color=#ff0000ff>{0} {1}</color>", orders[i],button.name);
|
| | | } |
| | | var functionButton = functionButtons[orders[i]]; |
| | | if (functionButton != button && functionButton.state != TitleBtnState.Locked) |
| | | { |
| | |
| | |
|
| | | private void ShowHeroSkill(int _skillId, string _clip)
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.showCamera.enabled = false;
|
| | | if (UI3DTreasureSelectStage.Instance.IsOpen)
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.showCamera.enabled = false;
|
| | | }
|
| | |
|
| | | cacheSkillId = _skillId;
|
| | |
|
| | |
| | |
|
| | | public void StopShow()
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.showCamera.enabled = true;
|
| | | if (UI3DTreasureSelectStage.Instance.IsOpen)
|
| | | {
|
| | | UI3DTreasureSelectStage.Instance.showCamera.enabled = true;
|
| | | }
|
| | | m_ShowCamera.gameObject.SetActive(false);
|
| | | m_HeroSkillCompletet = null;
|
| | | m_HeroShow.Dispose();
|
| | |
| | | normalTasks.Add(new ConfigInitTask("TreasureDungeonConfig", () => { TreasureDungeonConfig.Init(); }, () => { return TreasureDungeonConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureFindHostConfig", () => { TreasureFindHostConfig.Init(); }, () => { return TreasureFindHostConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasurePrivilegeConfig", () => { TreasurePrivilegeConfig.Init(); }, () => { return TreasurePrivilegeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureRefineConfig", () => { TreasureRefineConfig.Init(); }, () => { return TreasureRefineConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureSkillConfig", () => { TreasureSkillConfig.Init(); }, () => { return TreasureSkillConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TreasureUpConfig", () => { TreasureUpConfig.Init(); }, () => { return TreasureUpConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("TrialRewardsConfig", () => { TrialRewardsConfig.Init(); }, () => { return TrialRewardsConfig.inited; })); |