Commit 83d27676 authored by mercury233's avatar mercury233 Committed by nanahira

add Card.LinkMarker

parent 7e233019
...@@ -781,7 +781,7 @@ public static class BinaryExtensions ...@@ -781,7 +781,7 @@ public static class BinaryExtensions
if ((flag & (int)Query.Link) != 0) if ((flag & (int)Query.Link) != 0)
{ {
l3 = r.ReadInt32(); //link value l3 = r.ReadInt32(); //link value
data.rDefense = r.ReadInt32(); //link marker data.LinkMarker = r.ReadInt32();
} }
if (((flag & (int)Query.Level) != 0) || ((flag & (int)Query.Rank) != 0) || ((flag & (int)Query.Link) != 0)) if (((flag & (int)Query.Level) != 0) || ((flag & (int)Query.Rank) != 0) || ((flag & (int)Query.Link) != 0))
{ {
......
...@@ -1290,7 +1290,7 @@ public class gameCard : OCGobject ...@@ -1290,7 +1290,7 @@ public class gameCard : OCGobject
data.Level = 0; data.Level = 0;
for (int i = 0; i < 32; i++) for (int i = 0; i < 32; i++)
{ {
if ((data.rDefense & 1 << i) > 0) if ((data.LinkMarker & 1 << i) > 0)
{ {
data.Level++; data.Level++;
} }
......
...@@ -15,6 +15,7 @@ namespace YGOSharp ...@@ -15,6 +15,7 @@ namespace YGOSharp
public int Level; public int Level;
public int LScale; public int LScale;
public int RScale; public int RScale;
public int LinkMarker;
public int Attribute; public int Attribute;
public int Race; public int Race;
...@@ -47,6 +48,7 @@ namespace YGOSharp ...@@ -47,6 +48,7 @@ namespace YGOSharp
r.Level = Level; r.Level = Level;
r.LScale = LScale; r.LScale = LScale;
r.RScale = RScale; r.RScale = RScale;
r.LinkMarker = LinkMarker;
r.Attribute = Attribute; r.Attribute = Attribute;
r.Race = Race; r.Race = Race;
r.Attack = Attack; r.Attack = Attack;
...@@ -102,7 +104,7 @@ namespace YGOSharp ...@@ -102,7 +104,7 @@ namespace YGOSharp
public bool HasLinkMarker(CardLinkMarker dir) public bool HasLinkMarker(CardLinkMarker dir)
{ {
return (rDefense & (int)dir) != 0; return (LinkMarker & (int)dir) != 0;
} }
public bool IsExtraCard() public bool IsExtraCard()
...@@ -126,6 +128,7 @@ namespace YGOSharp ...@@ -126,6 +128,7 @@ namespace YGOSharp
this.Level = (int)Level_raw & 0xff; this.Level = (int)Level_raw & 0xff;
this.LScale = (int)((Level_raw >> 0x18) & 0xff); this.LScale = (int)((Level_raw >> 0x18) & 0xff);
this.RScale = (int)((Level_raw >> 0x10) & 0xff); this.RScale = (int)((Level_raw >> 0x10) & 0xff);
this.LinkMarker = this.Defense;
this.Race = reader.GetInt32(8); this.Race = reader.GetInt32(8);
this.Attribute = reader.GetInt32(9); this.Attribute = reader.GetInt32(9);
this.Category = reader.GetInt64(10); this.Category = reader.GetInt64(10);
......
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