diff --git a/l2-unity/Assets/Scripts/Datatable/Json/Converter/L2SkillEffectEmitterConverter.cs b/l2-unity/Assets/Scripts/Datatable/Json/Converter/L2SkillEffectEmitterConverter.cs index ac05f29d5..a91229f29 100644 --- a/l2-unity/Assets/Scripts/Datatable/Json/Converter/L2SkillEffectEmitterConverter.cs +++ b/l2-unity/Assets/Scripts/Datatable/Json/Converter/L2SkillEffectEmitterConverter.cs @@ -44,32 +44,6 @@ private AttachOnType ParseAttachOnType(string attachOn) } return (AttachOnType)Enum.Parse(typeof(AttachOnType), attachOn.ToUpper()); - - // switch (attachOn) - // { - // case "AM_None": - // return AttachOnType.AM_None; - // case "AM_Location": - // return AttachOnType.AM_Location; - // case "AM_RH": - // return AttachOnType.AM_RH; - // case "AM_LH": - // return AttachOnType.AM_LH; - // case "AM_RA": - // return AttachOnType.AM_RA; - // case "AM_LA": - // return AttachOnType.AM_LA; - // case "AM_WING": - // return AttachOnType.AM_WING; - // case "AM_BoneSpecified": - // return AttachOnType.AM_BoneSpecified; - // case "AM_AliasSpecified": - // return AttachOnType.AM_AliasSpecified; - // case "AM_Trail": - // return AttachOnType.AM_Trail; - // default: - // return AttachOnType.AM_None; - // } } @@ -81,28 +55,6 @@ private EtcEffect ParseEtcEffect(string etcEffect) } return (EtcEffect)Enum.Parse(typeof(EtcEffect), etcEffect.ToUpper()); - - // switch (etcEffect) - // { - // case "EET_None": - // return EtcEffect.EET_None; - // case "EET_FireCracker": - // return EtcEffect.EET_FireCracker; - // case "EET_Soulshot": - // return EtcEffect.EET_Soulshot; - // case "EET_SpiritShot": - // return EtcEffect.EET_SpiritShot; - // case "EET_Cubic": - // return EtcEffect.EET_Cubic; - // case "EET_SoundCrystal": - // return EtcEffect.EET_SoundCrystal; - // case "EET_JewelShot": - // return EtcEffect.EET_JewelShot; - // case "EET_PetJewelShot": - // return EtcEffect.EET_PetJewelShot; - // default: - // return EtcEffect.EET_None; - // } } private EtcEffectInfo ParseEtcEffectInfo(string etcEffectInfo) @@ -113,32 +65,6 @@ private EtcEffectInfo ParseEtcEffectInfo(string etcEffectInfo) } return (EtcEffectInfo)Enum.Parse(typeof(EtcEffectInfo), etcEffectInfo.ToUpper()); - - // switch (etcEffectInfo) - // { - // case "EEP_None": - // return EtcEffectInfo.EEP_None; - // case "EEP_FireCrackerSmall": - // return EtcEffectInfo.EEP_FireCrackerSmall; - // case "EEP_FireCrackerMiddle": - // return EtcEffectInfo.EEP_FireCrackerMiddle; - // case "EEP_FireCrackerLarge": - // return EtcEffectInfo.EEP_FireCrackerLarge; - // case "EEP_GradeNone": - // return EtcEffectInfo.EEP_GradeNone; - // case "EEP_GradeD": - // return EtcEffectInfo.EEP_GradeD; - // case "EEP_GradeC": - // return EtcEffectInfo.EEP_GradeC; - // case "EEP_GradeB": - // return EtcEffectInfo.EEP_GradeB; - // case "EEP_GradeA": - // return EtcEffectInfo.EEP_GradeA; - // case "EEP_GradeS": - // return EtcEffectInfo.EEP_GradeS; - // default: - // return EtcEffectInfo.EEP_None; - // } } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) diff --git a/l2-unity/Assets/Scripts/Datatable/Json/SkillEffectTable.cs b/l2-unity/Assets/Scripts/Datatable/Json/SkillEffectTable.cs index e395614d7..9fc615969 100644 --- a/l2-unity/Assets/Scripts/Datatable/Json/SkillEffectTable.cs +++ b/l2-unity/Assets/Scripts/Datatable/Json/SkillEffectTable.cs @@ -32,16 +32,23 @@ public void CacheEffects() foreach (KeyValuePair kvp in SkillTable.Instance.Skills) { - if (SkillEffects.ContainsKey(kvp.Key)) + if (kvp.Value.EffectId == -1) { continue; } + if (SkillEffects.TryGetValue(kvp.Key, out L2SkillEffect value)) + { + kvp.Value.SkillEffect = value; + continue; + } + L2SkillEffect skillEffect = ParseEffectId(kvp.Value.EffectId); if (skillEffect != null) { SkillEffects.TryAdd(kvp.Value.EffectId, skillEffect); + kvp.Value.SkillEffect = skillEffect; } } } @@ -59,7 +66,6 @@ private L2SkillEffect ParseEffectId(int id) using (StreamReader reader = new StreamReader(dataPath)) { L2SkillEffect skillEffect = ParseL2SkillEffect(reader.ReadToEnd()); - GameManager.Instance.debugEffect = skillEffect; return skillEffect; } diff --git a/l2-unity/Assets/Scripts/Game/Manager/GameManager.cs b/l2-unity/Assets/Scripts/Game/Manager/GameManager.cs index 197af1f90..142f89182 100644 --- a/l2-unity/Assets/Scripts/Game/Manager/GameManager.cs +++ b/l2-unity/Assets/Scripts/Game/Manager/GameManager.cs @@ -19,8 +19,6 @@ public class GameManager : MonoBehaviour [SerializeField] private bool _autoLogin = false; [SerializeField] private Camera _loadingCamera; - [SerializeField] public L2SkillEffect debugEffect; - public bool AutoLogin { get { return _autoLogin; } } public GameState GameState