Skip to content

Commit c5e7a00

Browse files
fixes
1 parent 93723ad commit c5e7a00

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Models/CustomCard.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class CustomCard
5151
public IceCubeIdentifier iceCubeId;
5252
public TailIdentifier tailId;
5353

54-
public CustomCard(string name)
54+
public CustomCard(string name, List<AbilityIdentifier> abilityId=null, EvolveIdentifier evolveId=null, IceCubeIdentifier iceCubeId=null, TailIdentifier tailId=null)
5555
{
5656
this.name = name;
5757
CustomCard.cards.Add(this);
@@ -60,7 +60,7 @@ public CustomCard(string name)
6060
List<AbilityIdentifier> toRemove = new List<AbilityIdentifier>();
6161
if (this.abilityId is not null)
6262
{
63-
foreach (AbilityIdentifier id in this.abilityId)
63+
foreach (AbilityIdentifier id in abilityId)
6464
{
6565
if (id.id != 0)
6666
{
@@ -72,27 +72,27 @@ public CustomCard(string name)
7272
this.abilityId.Remove(id);
7373
}
7474
}
75-
if (this.abilityId is not null && this.abilityId.Count > 0)
75+
if (abilityId is not null && this.abilityId.Count > 0)
7676
{
77-
CustomCard.abilityIds[CustomCard.cards.Count - 1] = this.abilityId;
77+
CustomCard.abilityIds[CustomCard.cards.Count - 1] = abilityId;
7878
}
7979

8080
// Handle EvolveIdentifier
81-
if (this.evolveId is not null)
81+
if (evolveId is not null)
8282
{
83-
CustomCard.evolveIds[CustomCard.cards.Count - 1] = this.evolveId;
83+
CustomCard.evolveIds[CustomCard.cards.Count - 1] = evolveId;
8484
}
8585

8686
// Handle IceCubeIdentifier
87-
if (this.iceCubeId is not null)
87+
if (iceCubeId is not null)
8888
{
89-
CustomCard.iceCubeIds[CustomCard.cards.Count - 1] = this.iceCubeId;
89+
CustomCard.iceCubeIds[CustomCard.cards.Count - 1] = iceCubeId;
9090
}
9191

9292
// Handle TailIdentifier
93-
if (this.tailId is not null)
93+
if (tailId is not null)
9494
{
95-
CustomCard.tailIds[CustomCard.cards.Count - 1] = this.tailId;
95+
CustomCard.tailIds[CustomCard.cards.Count - 1] = tailId;
9696
}
9797
}
9898

Plugin.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ private void SetEvolveIdentifiers()
136136
EvolveIdentifier id = item.Value;
137137
if (id.Evolution != null)
138138
{
139-
NewCard.cards[item.Key].evolveParams = id.Evolution;
139+
CustomCard.cards[item.Key].evolveParams = id.Evolution;
140140
}
141141
else
142142
{
143-
Plugin.Log.LogWarning($"Evolution card {id} not found for card {NewCard.cards[item.Key]}");
143+
Plugin.Log.LogWarning($"Evolution card {id} not found for card {CustomCard.cards[item.Key]}");
144144
}
145145
}
146146
}
@@ -165,11 +165,11 @@ private void SetIceCubeIdentifiers()
165165
IceCubeIdentifier id = item.Value;
166166
if (id.IceCube != null)
167167
{
168-
NewCard.cards[item.Key].iceCubeParams = id.IceCube;
168+
CustomCard.cards[item.Key].iceCubeParams = id.IceCube;
169169
}
170170
else
171171
{
172-
Plugin.Log.LogWarning($"IceCube card {id} not found for card {NewCard.cards[item.Key]}");
172+
Plugin.Log.LogWarning($"IceCube card {id} not found for card {CustomCard.cards[item.Key]}");
173173
}
174174
}
175175
}
@@ -194,11 +194,11 @@ private void SetTailIdentifiers()
194194
TailIdentifier id = item.Value;
195195
if (id.Tail != null)
196196
{
197-
NewCard.cards[item.Key].tailParams = id.Tail;
197+
CustomCard.cards[item.Key].tailParams = id.Tail;
198198
}
199199
else
200200
{
201-
Plugin.Log.LogWarning($"Tail card {id} not found for card {NewCard.cards[item.Key]}");
201+
Plugin.Log.LogWarning($"Tail card {id} not found for card {CustomCard.cards[item.Key]}");
202202
}
203203
}
204204
}

0 commit comments

Comments
 (0)