Commit dd164def authored by hex's avatar hex

fix confirm decktop card mapping consistency

parent d323f7a9
...@@ -2471,20 +2471,12 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2471,20 +2471,12 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.ConfirmDecktop: case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
int countOfDeck = countLocation(player, CardLocation.Deck);
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
code = r.ReadInt32(); code = r.ReadInt32();
gps = r.ReadShortGPS(); gps = r.ReadShortGPS();
card = GCS_cardGet( gps.controller = (UInt32)player;
new GPS card = GCS_cardGet(gps, false);
{
controller = (UInt32)player,
location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(countOfDeck - 1 - i),
},
false
);
if (card != null) if (card != null)
{ {
card.set_code(code); card.set_code(code);
...@@ -4811,17 +4803,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4811,17 +4803,11 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.ConfirmDecktop: case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
int countOfDeck = countLocation(player, CardLocation.Deck);
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
code = r.ReadInt32(); code = r.ReadInt32();
gps = r.ReadShortGPS(); gps = r.ReadShortGPS();
gps = new GPS gps.controller = (UInt32)player;
{
controller = (UInt32)player,
location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(countOfDeck - 1 - i),
};
card = GCS_cardGet(gps, false); card = GCS_cardGet(gps, false);
if (card != null) if (card != null)
{ {
......
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