Skip to content

Commit

Permalink
classname
Browse files Browse the repository at this point in the history
  • Loading branch information
shnok committed Sep 27, 2024
1 parent e52065f commit cd1f3de
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ public class L2SkillEffectEmitterConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return objectType == typeof(L2SkillEffectEmitter);
return objectType == typeof(EffectEmitter);
}

public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
JObject jObject = JObject.Load(reader);

L2SkillEffectEmitter emitter = new L2SkillEffectEmitter
EffectEmitter emitter = new EffectEmitter
{
AttachOn = ParseAttachOnType(jObject["AttachOn"]?.ToString()),
SpawnOnTarget = jObject["bSpawnOnTarget"]?.ToString().ToLower() == "true",
Expand All @@ -29,7 +29,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist

if (jObject["PawnLightParam"] != null)
{
emitter.PawnLightParam = L2SkillEffectPawnLightParam.Parse(jObject["PawnLightParam"].ToString());
emitter.PawnLightParam = EffectPawnLightParam.Parse(jObject["PawnLightParam"].ToString());
}


Expand Down
2 changes: 1 addition & 1 deletion l2-unity/Assets/Scripts/Datatable/SkillTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static SkillTable Instance

public Dictionary<int, Skill> Skills { get; private set; }

public Dictionary<int, L2SkillEffectEmitter> SkillEffects { get; private set; }
public Dictionary<int, EffectEmitter> SkillEffects { get; private set; }

private bool _loadAll = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using UnityEngine;

[System.Serializable]
public class L2SkillEffectPawnLightParam
public class EffectPawnLightParam
{
[SerializeField] private EPawnLightType _pawnLightType;
[SerializeField] private ELightType _lightType;
Expand All @@ -20,9 +20,9 @@ public class L2SkillEffectPawnLightParam
public float LightRadius { get { return _lightRadius; } set { _lightRadius = value; } }
public ELightCoordSystem LightCoordSystem { get { return _lightCoordSystem; } set { _lightCoordSystem = value; } }

public static L2SkillEffectPawnLightParam Parse(string input)
public static EffectPawnLightParam Parse(string input)
{
L2SkillEffectPawnLightParam effect = new L2SkillEffectPawnLightParam();
EffectPawnLightParam effect = new EffectPawnLightParam();
input = input.Trim('(', ')');

string pattern = @"(\w+)=(\([^)]+\)|[^,]+)"; // TODO: Use this regex in system grp files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using UnityEngine;

[System.Serializable]
public class L2SkillEffectEmitter
public class EffectEmitter
{
[SerializeField] private AttachOnType _attachOn;
[SerializeField] private bool _spawnOnTarget;
Expand All @@ -13,7 +13,7 @@ public class L2SkillEffectEmitter
[SerializeField] private EtcEffect _etcEffect;
[SerializeField] private EtcEffectInfo _etcEffectInfo;
[SerializeField] private bool _pawnLight;
[SerializeField] private L2SkillEffectPawnLightParam _pawnLightParam;
[SerializeField] private EffectPawnLightParam _pawnLightParam;

public AttachOnType AttachOn { get { return _attachOn; } set { _attachOn = value; } }
public bool SpawnOnTarget { get { return _spawnOnTarget; } set { _spawnOnTarget = value; } }
Expand All @@ -25,6 +25,6 @@ public class L2SkillEffectEmitter
public EtcEffect EtcEffect { get { return _etcEffect; } set { _etcEffect = value; } }
public EtcEffectInfo EtcEffectInfo { get { return _etcEffectInfo; } set { _etcEffectInfo = value; } }
public bool PawnLight { get { return _pawnLight; } set { _pawnLight = value; } }
public L2SkillEffectPawnLightParam PawnLightParam { get { return _pawnLightParam; } set { _pawnLightParam = value; } }
public EffectPawnLightParam PawnLightParam { get { return _pawnLightParam; } set { _pawnLightParam = value; } }

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
public class L2SkillEffect
{
[SerializeField] private int _skillId;
[SerializeField] private List<L2SkillEffectEmitter> _castingActions;
[SerializeField] private List<L2SkillEffectEmitter> _shotActions;
[SerializeField] private List<EffectEmitter> _castingActions;
[SerializeField] private List<EffectEmitter> _shotActions;

public int SkillId { get { return _skillId; } set { _skillId = value; } }
public List<L2SkillEffectEmitter> CastingActions { get { return _castingActions; } set { _castingActions = value; } }
public List<L2SkillEffectEmitter> ShotActions { get { return _shotActions; } set { _shotActions = value; } }
public List<EffectEmitter> CastingActions { get { return _castingActions; } set { _castingActions = value; } }
public List<EffectEmitter> ShotActions { get { return _shotActions; } set { _shotActions = value; } }
}

0 comments on commit cd1f3de

Please sign in to comment.