| Core/GameEngine/Model/Player/Character/PlayerExtersionData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Core/GameEngine/Model/Player/PlayerDatas.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/GameActor/GActorPlayerBase.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Utility/EnumHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Utility/RuntimeLogUtility.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/Model/Player/Character/PlayerExtersionData.cs
@@ -1,7 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerExtersionData { @@ -58,4 +58,8 @@ public int NpcHurtAddPer;//对怪物伤害加成 188 public int FunalHurtPer;//对怪物伤害加成 189 public int talentPoint;//天赋点数 190 } public int godWeaponLV_1; public int godWeaponLV_2; public int godWeaponLV_3; public int godWeaponLV_4; } Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -742,6 +742,34 @@ case PlayerDataRefresh.CDBPlayerRefresh_TalentPoint: extersion.talentPoint = (int)value; break; case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_1: extersion.godWeaponLV_1 = (int)value; if (hero != null) { hero.SwitchGodWeapon(1, extersion.godWeaponLV_1); } break; case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_2: extersion.godWeaponLV_2 = (int)value; if (hero != null) { hero.SwitchGodWeapon(2, extersion.godWeaponLV_2); } break; case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_3: extersion.godWeaponLV_3 = (int)value; if (hero != null) { hero.SwitchGodWeapon(3, extersion.godWeaponLV_3); } break; case PlayerDataRefresh.CDBPlayerRefresh_GodWeaponLV_4: extersion.godWeaponLV_4 = (int)value; if (hero != null) { hero.SwitchGodWeapon(4, extersion.godWeaponLV_4); } break; } } Fight/GameActor/GActorPlayerBase.cs
@@ -327,6 +327,12 @@ } } foreach (var _effect in m_GodWeaponEffectDict.Values) { SFXPlayUtility.Instance.Release(_effect); } m_GodWeaponEffectDict.Clear(); UnloadSuitSFX(); ReleaseLifeBar(); ReleaseName(); @@ -2477,4 +2483,75 @@ } } } private Dictionary<int, SFXController> m_GodWeaponEffectDict = new Dictionary<int, SFXController>(); public void SwitchGodWeapon(int type, int level) { bool _showOrHide = true; GodWeaponEffectConfig _config = null; if (level <= 0) { _showOrHide = false; } else { _config = GodWeaponEffectConfig.Get(type, level); if (_config == null) { _showOrHide = false; } } SFXController _effect = null; if (m_GodWeaponEffectDict.TryGetValue(type, out _effect)) { if (_effect) { SFXPlayUtility.Instance.Release(_effect); m_GodWeaponEffectDict.Remove(type); } } if (_showOrHide) { Transform _bindBone = null; switch (type) { case 1: if (m_ClothesModel) { _bindBone = m_ClothesModel.transform.GetChildTransformDeeply("Bip001 Spine"); } break; case 2: if (m_WeaponModel != null) { _bindBone = m_WeaponModel.transform; } break; case 3: if (m_SecondaryModel != null) { _bindBone = m_SecondaryModel.transform; } break; case 4: if (m_ClothesModel != null) { _bindBone = m_ClothesModel.transform.GetChildTransformDeeply("Bip001 Neck"); } break; } if (_bindBone) { var _effectJson = LitJson.JsonMapper.ToObject(_config.effect); var _effectID = int.Parse(_effectJson[JobSetup.Job.ToString()].ToString()); _effect = SFXPlayUtility.Instance.PlayBattleEffect(_effectID, _bindBone); m_GodWeaponEffectDict[type] = _effect; } } } } Utility/EnumHelper.cs
@@ -567,6 +567,10 @@ CDBPlayerRefresh_NPCHurtAddPer,//对怪物伤害加成 188 FunalHurtPer = 189,// 最终伤害加成 CDBPlayerRefresh_TalentPoint = 190, CDBPlayerRefresh_GodWeaponLV_1 = 192, CDBPlayerRefresh_GodWeaponLV_2 = 193, CDBPlayerRefresh_GodWeaponLV_3 = 194, CDBPlayerRefresh_GodWeaponLV_4 = 195, }; /** 物品加成类型 */ Utility/RuntimeLogUtility.cs
@@ -178,7 +178,8 @@ public class RuntimeLogUtilityEditor : Editor { private Vector3 _navChkPos; private int _npcID; private int _param1; private int _param2; public override void OnInspectorGUI() { @@ -220,12 +221,12 @@ } } _npcID = EditorGUILayout.IntField("npcID", _npcID); _param1 = EditorGUILayout.IntField("param1", _param1); _param2 = EditorGUILayout.IntField("param2", _param2); if (GUILayout.Button("酷酷酷")) { var boss = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(60203001, E_ActorGroup.Enemy); boss.Pos = PlayerDatas.Instance.hero.Pos; PlayerDatas.Instance.hero.SwitchGodWeapon(_param1, _param2); } if (GUILayout.Button("直接重连"))