Commit a1cebbd1 authored by mercury233's avatar mercury233 Committed by GitHub

Merge pull request #2 from purerosefallen/update_query_mer

Update Query
parents 3e2184b9 eb9fc79f
...@@ -699,17 +699,6 @@ public static class BinaryExtensions ...@@ -699,17 +699,6 @@ public static class BinaryExtensions
{ {
l2 = r.ReadInt32(); l2 = r.ReadInt32();
} }
if (((flag & (int)Query.Level) != 0) || ((flag & (int)Query.Rank) != 0))
{
if (l1 > l2)
{
data.Level = l1;
}
else
{
data.Level = l2;
}
}
if ((flag & (int)Query.Attribute) != 0) if ((flag & (int)Query.Attribute) != 0)
data.Attribute = r.ReadInt32(); data.Attribute = r.ReadInt32();
...@@ -725,8 +714,8 @@ public static class BinaryExtensions ...@@ -725,8 +714,8 @@ public static class BinaryExtensions
r.ReadInt32(); r.ReadInt32();
if ((flag & (int)Query.Reason) != 0) if ((flag & (int)Query.Reason) != 0)
r.ReadInt32(); r.ReadInt32();
//if ((flag & (int)Query.ReasonCard) != 0) if ((flag & (int)Query.ReasonCard) != 0)
// r.ReadInt32(); r.ReadInt32();
if ((flag & (int)Query.EquipCard) != 0) if ((flag & (int)Query.EquipCard) != 0)
{ {
cardToRefresh.addTarget(Program.I().ocgcore.GCS_cardGet(r.ReadGPS(), false)); cardToRefresh.addTarget(Program.I().ocgcore.GCS_cardGet(r.ReadGPS(), false));
...@@ -772,6 +761,26 @@ public static class BinaryExtensions ...@@ -772,6 +761,26 @@ public static class BinaryExtensions
data.LScale = r.ReadInt32(); data.LScale = r.ReadInt32();
if ((flag & (int)Query.RScale) != 0) if ((flag & (int)Query.RScale) != 0)
data.RScale = r.ReadInt32(); data.RScale = r.ReadInt32();
int l3 = 0;
if ((flag & (int)Query.Link) != 0)
{
l3 = r.ReadInt32(); //link value
data.rDefense = r.ReadInt32(); //link marker
}
if (((flag & (int)Query.Level) != 0) || ((flag & (int)Query.Rank) != 0) || ((flag & (int)Query.Link) != 0))
{
if (l1 > l2)
{
data.Level = l1;
}
else
{
data.Level = l2;
}
if(l3 > data.Level)
data.Level = l3;
}
cardToRefresh.set_data(data); cardToRefresh.set_data(data);
// //
} }
...@@ -875,4 +884,4 @@ public class TcpClientWithTimeout ...@@ -875,4 +884,4 @@ public class TcpClientWithTimeout
exception = ex; exception = ex;
} }
} }
} }
\ No newline at end of file
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
Owner = 0x40000, Owner = 0x40000,
Status = 0x80000, Status = 0x80000,
LScale = 0x200000, LScale = 0x200000,
RScale = 0x400000 RScale = 0x400000,
Link = 0x800000
} }
} }
\ No newline at end of file
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