Commit b98dc68d authored by mercury233's avatar mercury233

fix new setcode in CardData of ocgcore

parent f0626a36
......@@ -11,6 +11,7 @@ Assets/AssetStoreTools*
/.vs/
.idea
.vsconfig
/.vscode/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
......
......@@ -459,7 +459,7 @@ public class GameStringHelper
return re;
}
public static string getSetName(long Setcode)
public static string getSetName(ulong Setcode)
{
var setcodes = new int[4];
for(var j = 0; j < 4; j++)
......
......@@ -213,7 +213,10 @@ namespace Percy
{
public int Code;
public int Alias;
public long Setcode;
public UInt64 Setcode;
public UInt64 _Setcode1;
public UInt64 _Setcode2;
public UInt64 _Setcode3;
public int Type;
public int Level;
public int Attribute;
......
......@@ -9,7 +9,7 @@ namespace YGOSharp
public int Id;
public int Ot;
public int Alias;
public long Setcode;
public ulong Setcode;
public int Type;
public int Level;
......@@ -118,7 +118,7 @@ namespace YGOSharp
this.Id = (int)reader.GetInt64(0);
this.Ot = reader.GetInt32(1);
this.Alias = (int)reader.GetInt64(2);
this.Setcode = reader.GetInt64(3);
this.Setcode = (ulong)reader.GetInt64(3);
this.Type = (int)reader.GetInt64(4);
this.Attack = reader.GetInt32(5);
this.Defense = reader.GetInt32(6);
......
......@@ -438,12 +438,12 @@ namespace YGOSharp
!= ((int) CardType.Monster + (int) CardType.Token));
}
public static bool IfSetCard(int setCodeToAnalyse, long setCodeFromCard)
public static bool IfSetCard(int setCodeToAnalyse, ulong setCodeFromCard)
{
bool res = false;
int settype = setCodeToAnalyse & 0xfff;
int setsubtype = setCodeToAnalyse & 0xf000;
long sc = setCodeFromCard;
uint settype = (uint)setCodeToAnalyse & 0xfff;
uint setsubtype = (uint)setCodeToAnalyse & 0xf000;
ulong sc = setCodeFromCard;
while (sc != 0)
{
if ((sc & 0xfff) == settype && (sc & 0xf000 & setsubtype) == setsubtype)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment